{"id":2313,"date":"2018-02-05T18:35:34","date_gmt":"2018-02-05T13:05:34","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=2313"},"modified":"2018-02-05T18:37:28","modified_gmt":"2018-02-05T13:07:28","slug":"install-mcrypt-php-macos-high-sierra-development-server","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/install-mcrypt-php-macos-high-sierra-development-server\/","title":{"rendered":"Install mcrypt for php on macos high sierra for a Development Server"},"content":{"rendered":"<p><strong>Date Posted: 05-02-2018<\/strong><\/p>\n<p>In this post, we will explain how to install mcrypt\u00a0for php\u00a0 on mac os high sierra for a Development Server.<\/p>\n<p>Step 1:\u00a0\u00a0Search the package:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">brew search mcrypt\r\n\r\n<\/pre>\n<p>Result:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">==&gt; Searching local taps... homebrew\/php\/php71-mcrypt mcrypt homebrew\/php\/php53-mcrypt\r\nhomebrew\/php\/php54-mcrypt homebrew\/php\/php55-mcrypt homebrew\/php\/php56-mcrypt homebrew\/php\/php70-mcrypt libtomcrypt<\/pre>\n<p>Step 2: Search my php version to know what can I need to install:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">php --version<\/pre>\n<p>Result:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies<\/pre>\n<p>Step 3:\u00a0Install the correct package, for me was 7.1.7 =&gt; homebrew\/php\/php71-mcrypt<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">brew install homebrew\/php\/php71-mcrypt\r\n<\/pre>\n<p>Step 4: Find the find &#8220;mcrypt.so&#8221; extension file<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">find \/usr\/ -type f -name \"mcrypt.so\"\r\n<\/pre>\n<p>Result:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">find: \/usr\/\/local\/Cellar\/php71-mcrypt\/7.1.13_19\/mcrypt.so<\/pre>\n<p>Step 5: Search the php.ini<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">php -i | grep 'Configuration File'\r\n<\/pre>\n<p>Result (if exist):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Configuration File (php.ini) Path =&gt; \/etc Loaded Configuration File =&gt; \/etc\/php.ini<\/pre>\n<p>Step 6: Add the next line at the end on \/etc\/php.ini (see the last step your correct path) the extension mcrypt.so<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">extension=\/usr\/local\/Cellar\/php71-mcrypt\/7.1.13_19\/mcrypt.so<\/pre>\n<p>If there is no\u00a0<strong>php.ini<\/strong>\u00a0file, \u00a0then you need to make one from php.ini.default\u00a0in the same location like so:\u00a0If the php.ini does not exist in etc folder please follow below steps.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sudo cp \/etc\/php.ini.default \/etc\/php.ini<\/pre>\n<p>Step 7: And allow write capability<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">sudo chmod u+w  \/etc\/php.ini\r\n<\/pre>\n<p>Step 8: Please find the\u00a0mcrypt.so path and add into php.ini file<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">Configuration File (php.ini) Path =&gt; \/etc Loaded Configuration File =&gt; \/etc\/php.ini<\/pre>\n<p>Step 9: Restart the apachectl<\/p>\n<p>That\u2019s it, create a php page with the function\u00a0<strong>phpinfo();\u00a0<\/strong>\u00a0to see if it loaded correctly.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Date Posted: 05-02-2018 In this post, we will explain how to install mcrypt\u00a0for php\u00a0 on mac os high sierra for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1021],"tags":[273],"class_list":["post-2313","post","type-post","status-publish","format-standard","hentry","category-mobile-flutter","tag-php","psol-cat-mobile-flutter"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-Bj","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2313"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2313\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}