Installing the Mcrypt extension for PHP on Mac OS X 10.5.8

How to install mcrypt? I am using Leopard 10.5.8 with PHP5.

+3
source share
3 answers

Ok, I just spent 1.5 hours trying to do it myself on 10.6.7

I believe the solution was as follows:

I installed php5-mcrypt + universalusing macports:

$ sudo macports php5-mcrypt +universal

then you cannot just put extension=mycrypt.soin the file php.ini, you have to put the direct path ie:

extension = /opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so

you see, php looks to /usr/local/lib/php/extensions/no-debug-non-zts-20090626/ be the difference i missed!

Then just restart apache with

$ sudo apachectl -k graceful

and then

$ php -m | grep mcrypt

to make sure of this.

Hope this helps someone!

+9
source
 # Edit macports.conf
cd /opt/local/etc/macports
sudo nano macports.conf
# Change the line ....
universal_archs ppc i386
# to ...
universal_archs ppc ppc64 i386 x86_64

# Get the MCRYPT Library
sudo port install mcrypt +universal 

: .

+5

, PHP.

PHP macports, :

sudo port install php5-mcrypt +universal

If you compiled your PHP, it is easiest to recompile it with:

--with-mcrypt=/path/to/mcrypt

(Not sure where the macros actually save it, since I don't use macports, but just compile my AMP stack (and most of the dependencies) from the source)

+3
source

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


All Articles