phpMyAdmin - mcrypt not loaded

XServe G5 with 10.5.8, running latest release of phpMyAdmin.

I installed phpMyAdmin, ran the configuration and am able to log into phpMyAdmin just fine, however even at the login screen for phpMyAdmin it shows "Cannot load mcrypt extension. Please check your PHP configuration." In the configuration setup, I saw nothing for enabling mcrypt. Did I miss something in there?

Have tried to install mcrypt separately but it errors with a "C compiler cannot create executables."

Hints or suggestions welcome!

Thanks!

-Douggo

Mac Pro (2X 3Ghz dual core); MacBook 2GHz C2D; G4 MDD Dual 867, Mac OS X (10.6.1), 20" Cinema Display; 30GB iPod Photo; iPhone; Airport Exteme

Posted on Nov 2, 2009 9:04 AM

Reply
11 replies

Nov 3, 2009 3:50 PM in response to pterobyte

Yes, didn't have XCode installed. That fixed the compiler error and I was able to get libmcrypt installed (at least I think it's installed).

The easiest way is to first install libmcrypt and then build the dynamically loaded mcrypt library for PHP


Any pointers on how to get that done? The installation instructions for mcrypt are not what I would call ..helpful. This is one of my first true ventures 'under the hood' and I'm a tad overwhelmed.

-Douggo

Nov 4, 2009 2:26 AM in response to Douggo

Try this as root (or issue sudo -s before):

---(You can skip this part if libmcrypt is already correctly installed and only build the dynamically loaded extension)---

mkdir -p /SourceCache

cd /SourceCache

curl -O http://surfnet.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8 .tar.gz

tar xzf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8

MACOSX DEPLOYMENTTARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind atload" ./configure --disable-dependency-tracking

make

make install

---(Now build dynamically loaded extension)---

cd /SourceCache

curl -O http://www.opensource.apple.com/source/apachemod_php/apache_modphp-44.2/php-5.2.8.tar.bz2

tar xjf php-5.2.8.tar.bz2

cd /SourceCache/php-5.2.8/ext/mcrypt

phpize

MACOSX DEPLOYMENTTARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind atload" ./configure

make

make install

---

When done, edit/create /etc/php.ini and add:
extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so

next issue:
sudo apachectl graceful

with a little luck you are all set.
HTH,
Alex

Nov 4, 2009 5:52 AM in response to pterobyte

Superb!! Thanks so much for that Alex!

There was one hiccup that I was able to suss out, in that the directory that stores the mcrypt.so extension has a different name than what you provided - it went into /usr/bin/php/extensions/no-debug-non-zts-20060613/ Once I saw that and changed the value in the php.ini file, all was good. phpMyAdmin now opens without warnings.

The delightful part in all of this is that I was able to accomplish this from home via ssh and some Screen Sharing to the server. One less thing that I have to do when I get to work this morning. 🙂

One last question: permissions on the php.ini file? Does it matter, or should they be in alignment with the other items in the /etc/ directory?

Thanks again, and the beer is on me if paths ever cross.

-Doug

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

phpMyAdmin - mcrypt not loaded

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.