tags:

views:

512

answers:

2

How do I install mcrypt? I'm using Leopard 10.5.8 with PHP5.

+2  A: 
 # 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

Source: This page.

Zed
Follow the instructions; checking info.php -- no mcrypt. Ideas?
konzepz
Did php compile without warnings with mcrypt enabled?
Zed
In which stage? I'm not quite sure. If you'd tell me which command to run, it'll be very helpful.
konzepz
Well if you look at the linked page, below "Build and Install PHP". Commands to run are the lines in the orange box, not starting with hashmarks.
Zed
A: 

It depends on how you've installed PHP.

If you installed PHP via macports, you can:

sudo port install php5-mcrypt +universal

If you custom-compiled your PHP, it's probably easiest to just recompile with: --with-mcrypt=/path/to/mcrypt

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

timdev
I tried running 'sudo port install php5-mcrypt +universal" and got this: <code>Skipping org.macports.activate (mcrypt +universal) since this port is already active</code>But info.php shows nothing, and phpMyAdmin still claims mcrypt is nowhere around its sight.
konzepz