3

I'm trying to install php-mcrypt on a CentOS 5.4 but while the extensions appears to be installed, there's nothing about it when I do a phpinfo().

For example, you can see below that php-mcrypt appears to be installed properly:

[root@... ~]# rpm -qi php-mcrypt | grep Version
Version     : 5.1.6                             Vendor: CentOS
[root@... ~]# rpm -qi libmcrypt | grep Version
Version     : 2.5.8                             Vendor: CentOS

I've tried uninstalling and re-installing it with no luck. When I do a phpinfo(), it lists "/etc/php.d/mcrypt.ini" in the "additional ini files parsed" section, but there's no mention of the mcrypt extension anywhere else. The mcrypt.ini file contains the single line "extension=mcrypt.so" (not commented out).

When I run php -v I get the following:

PHP 5.2.6 (cli) (built: May  5 2008 10:32:59)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator

There's no errors related to not being able to load the extension (my PHP version is 5.2.6 but if you see the php-mcrypt version above, it says "5.1.6" I'm not sure if that's incorrect of it's just a coincidence, but I would have expected an error when running php if it the version of the extension was incorrect).

Obviously, I've restarted apache since installing mcrypt, but that doesn't make a difference either.

I can't think of anything else that I could be missing... does anybody have any ideas?

2 Answers 2

3

You're on the right track, the problem is the PHP package version vs. the php-mcrypt version---so you'll need to upgrade php-mcrypt to 5.2.6.

There's more detailed instructions on the 5.1.6->5.2.6 process at:

http://wiki.centos.org/HowTos/PHP_5.1_To_5.22

http://wiki.centos.org/HowTos/PHP_5.1_To_5.2#head-fe084db340a72a9b7b7fca8fcba57ef4e9a344851

1
  • Yes! This was it! The server is one I inherited and it looks like whoever was administering it before me must've upgraded PHP and forgot mcrypt or something... thanks! Feb 11, 2011 at 10:16
0

Try a "php -m" this will normally list the installed modules, but also display warnings/errors about modules it is having trouble with.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .