Mcrypt error issue when upgrading to Mac OSX Sierra

After switching to Mac OSX Sierra from El Capitan, as soon as I started php, it refuses to start any php project that was previously installed on my system. That after studying these problems on the Internet, I came up with these options ... After running the following commands:

cd /etc/apache2/
sudo mv httpd.conf httpd.conf.sierra
sudo mv httpd.conf~previous httpd.conf

cd ..
sudo cp php.ini-previous php.ini

sudo apachectl restart

I made my php project like a charm. But now I am facing another problem. This is a php mcrypt extension error. When I start the php project (laravel 4.2 project), the project does not work and shows me an error - "PHP mcrypt extension is required!" Please help me with this .. My mcrypt line of the php.ini file looks like this:

; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20121212/"
; extension_dl = On
extension=mcrypt.so
; On windows:
; extension_dir = "ext"

Can you tell me what is wrong with my system.

+4
4

... mcrypt ( ) ...

, libmcrypt php (php 5.6 - OSX Sierra) (. ).

mysql ( :(), .err /usr/local/mysql/data​​strong > mysql - .

MySQL

sudo /usr/local/mysql/support-files/mysql.server restart

, Mac OSX - .!!: D

+3
brew install homebrew/php/php70-mcrypt
+1

You need to install dynamic extensions.

This line is your problem:

; extension_dl = On

You need to remove the ";"

0
source

In my case, I did this to work with the following steps:

  • Installed XAMPP with PHP 7.0
  • In bash file

    the following is added:
     export PATH=/Applications/XAMPP/xamppfiles/bin/:$PATH
    

The order is really important, as it will find php 7.0 in front of the system (5.6).

0
source

Source: https://habr.com/ru/post/1655790/


All Articles