Call to undefined function: mcrypt_module_open()

Support/Development for PHP
rolo
New Forum User
New Forum User
Posts: 4
Joined: Wed Dec 28, 2005 11:57 pm

Call to undefined function: mcrypt_module_open()

Unread post 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
Danny
Forum User
Forum User
Posts: 59
Joined: Mon Apr 11, 2005 3:48 am

Unread post 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
rolo
New Forum User
New Forum User
Posts: 4
Joined: Wed Dec 28, 2005 11:57 pm

Unread post 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
Danny
Forum User
Forum User
Posts: 59
Joined: Mon Apr 11, 2005 3:48 am

Unread post 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
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post 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.
Danny
Forum User
Forum User
Posts: 59
Joined: Mon Apr 11, 2005 3:48 am

Unread post 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
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Unread post by scott »

On the other hand it also makes it a pain in the ass sometimes :P Happy New Year!
Post Reply