Page 1 of 1

Call to undefined function: mcrypt_module_open()

Posted: Thu Dec 29, 2005 6:09 pm
by rolo
I recently upgraded to php 4.4.1 from ART's rpms (via yum)

I was certain that it came bundled with mcrypt -that's why I installed it in the first place-, but I'm getting this error:

Code: Select all

Fatal error: Call to undefined function: mcrypt_module_open() in /var/www/vhosts/domain.com/httpdocs/scripts_v2/v5functions_crypt.php on line 42
I checked in phpinfo()'s output and I don't see mcrypt anywhere except in the configure command ('--with-mcrypt=shared').
Maybe this doesn't help at all, but I noticed that the configure command for PHP in the server where this script is currently working, says '--with-mcrypt=/usr/local' and I DO see mcrypt further down in phpinfo().

Is there another update I should do?

Thanks,
Rolo

Posted: Fri Dec 30, 2005 4:13 am
by Danny
The ./Configure line of Scott is correct, i ever compile mysql and other libs as shared.

You need make a:

Code: Select all

yum install php-mcrypt
For example the package for Fedora Core 2 is named:

php-mcrypt-4.4.1-1.rhfc2.art.i386.rpm

Posted: Fri Dec 30, 2005 10:40 am
by rolo
Danny,

What you sugested worked like a charm! Thanks!
Just so I know, what exactly was going on?

If understood correctly you can compile PHP with room for extra libraries but only if they are actually installed in the host machine. Is this right?

Thanks again.
Rolo

Posted: Fri Dec 30, 2005 7:21 pm
by Danny
rolo wrote:Danny,

If understood correctly you can compile PHP with room for extra libraries but only if they are actually installed in the host machine. Is this right?

Thanks again.
Rolo
Yes is correct, and i read in many php forums that is more optimous if you compile mysql as shared (i dont understand why :) ).

Excuse my broken English

Posted: Fri Dec 30, 2005 8:10 pm
by scott
This is to make php more efficient, if you build those libraries into the main php module, you end up using considerably more memory in php. It also makes it possible to update those modules without having to update all of php, something I do fairly often.

Posted: Sat Dec 31, 2005 12:56 pm
by Danny
scott wrote:This is to make php more efficient, if you build those libraries into the main php module, you end up using considerably more memory in php. It also makes it possible to update those modules without having to update all of php, something I do fairly often.
Thanks for the clarification Scott and happy new year

Posted: Tue Jan 03, 2006 11:13 am
by scott
On the other hand it also makes it a pain in the ass sometimes :P Happy New Year!