View Full Version : PHP-Mcrypt
colin
24th February 2008, 21:33
Hi
I am trying to get PHP-Mcrypt installed on Centos 5 the only file i could find is libmcrypt. is this right or is there other files i need to download?
I thort there was a how to that covered this but cannot find it. Any help would be appreciated
Colin
Apache/2.2.3 (CentOS)
PHP 5.1.6
topdog
25th February 2008, 08:33
You can do this using yum and all dependencies will be resolved.
Use the rpmforge repo
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install libmcrypt
topdog
25th February 2008, 08:42
For other you can get the non stardard PHP module rpms here.
http://phprpms.sourceforge.net
colin
25th February 2008, 15:45
Thanks for the reply Topdog. I am using virtualmin to administer the server and according to this software it is installed but not enabled (needs dynamic loading:confused: :confused: :confused: ) I have tried adding extension=libmcrypt.so to php.ini but still nothing shows up in phpinfo(). I have restarted apache and even done a reboot. What am i doing wrong??
Colin
topdog
25th February 2008, 15:59
You need this instead
extension=mcrypt.so
colin
25th February 2008, 18:57
ok changed that and restarted but still nothing. When i get back to the server i will uninstall the package and reinstall. Should the code below also update the php.ini file or do i have to do that bit myself?
rpm -Uhv http://apt.sw.be/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum install libmcrypt
Thanks
Colin
topdog
25th February 2008, 20:22
That just installs the library you need to install the php extension which you can get from the site i linked.
If you install the rpm you do not need to modify anything as the rpm installs a file in /etc/php.d which loads the extension.
colin
1st March 2008, 23:10
Yhanks Topdog
Sorted!
tedyu
15th April 2009, 01:32
I installed mysql and mcrypt:
[tyu@vh20 lib]$ cat /etc/php.d/
dbase.ini mhash.ini mysql.ini pdo_mysql.ini
mcrypt.ini mysqli.ini pdo.ini pdo_sqlite.ini
But I still see:
[Sun Apr 12 12:07:37 2009] [error] [client 10.13.8.22] PHP Fatal error: Call to undefined function mysql_pconnect() in /home/wr_webroot/framework/Webroot/DAO/Dispatcher.php on line 43
Any idea ?
topdog
15th April 2009, 10:51
Did you restart apache ?
tedyu
15th April 2009, 16:26
Yes I did.
Ted
falko
15th April 2009, 19:20
You can create the following PHP file...
<?php
phpinfo();
?>
... and call it in a browser. Do you see MySQL enabled there?
tedyu
15th April 2009, 19:45
I restarted Apache.
First I saw:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0
So I symlinked /usr/lib/php/modules/mcrypt.so to /usr/local/lib/php/extensions/no-debug-non-zts-20060613
But then I saw:
PHP Warning: PHP Startup: mcrypt: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0
How do I install 20060613 mcrypt ?
topdog
16th April 2009, 10:40
It looks like your installed mcrypt was built from source as well as rpm and one is linked to a different php version
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.