Submitted by paul.kelly on Mon, 11/01/2010 - 17:59
Whilst trying to run a cron task, I get the following error:
Output from command /usr/bin/php /home/domain/public_html/newsletters/admin/processqueue.php ..
PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20050922, debug=0, thread-safety=0 PHP compiled with module API=20060613, debug=0, thread-safety=0 These options need to match in Unknown on line 0 Invalid Request
The PHP version is 5.2.14, and all has been recently install from standard repositories.
I also appreciate that the cron command my be incorrect.
Status:
Active
Comments
Submitted by JamieCameron on Mon, 11/01/2010 - 18:04 Comment #1
This could be due to a PHP / module version mismatch.
What is the output from the following command on your system :
rpm -qa | grep php
Submitted by andreychek on Mon, 11/01/2010 - 18:05 Comment #2
Howdy -- that error suggests that the PHP module being loaded was compiled for a different PHP version than what's available on your server.
What output do you receive if you type:
rpm -qa | grep php
Submitted by paul.kelly on Mon, 11/01/2010 - 18:08 Comment #3
We get:
-bash-3.2# rpm -qa | grep php php-ioncube-loader-3.3.20-3.el5.art
php-pdo-5.2.14-2.el5.art
php-cli-5.2.14-2.el5.art
php-gd-5.2.14-2.el5.art
php-mysql-5.2.14-2.el5.art
php-snmp-5.2.14-2.el5.art
php-zend-optimizer-3.3.9-2.el5.art
php-5.2.14-2.el5.art
php-odbc-5.2.14-2.el5.art
php-mbstring-5.2.14-2.el5.art
php-imap-5.2.14-2.el5.art
wbm-php-pear-1.5-1
php-common-5.2.14-2.el5.art
php-pgsql-5.2.14-2.el5.art
php-xmlrpc-5.2.14-2.el5.art
php-devel-5.2.14-2.el5.art
php-pear-1.7.2-2.el5.art
php-mcrypt-5.1.6-15.el5.centos.1
Looks like mcrypt is out, however, as all was installed at the same time, how can they be out of sync?
Removing and reinstalling gets the same version
Submitted by JamieCameron on Mon, 11/01/2010 - 18:09 Comment #4
Not sure .. but you can fix it with
yum install php-mcrypt
Submitted by JamieCameron on Mon, 11/01/2010 - 18:15 Comment #5
Actually, where are those .art PHP packages come from? Did you add an additional RPM repository for PHP packages?
I would be interested to know what is in
/etc/yum.repos.d
on your system.Submitted by paul.kelly on Tue, 11/02/2010 - 03:20 Comment #6
CentOS-Base.repo CentOS-Media.repo virtualmin.repo webmin.repo
I have installed 2 packages that are not in the standard repo's, such as ioncube, but I am sure that was 'direct', not via yum.
Submitted by JamieCameron on Tue, 11/02/2010 - 11:15 Comment #7
Did you install some PHP packages manually?
Submitted by JamieCameron on Tue, 11/02/2010 - 11:15 Comment #8
Also, do you require a specific PHP version, like 5.2.x ?
Submitted by paul.kelly on Tue, 11/02/2010 - 11:23 Comment #9
I do not think I did, however, would installing something like ionloader have added in some dependencies?
I did a complete reload of the server a fe weeks ago to clean it up.
The only other package that comes to mind, that I installed, was imagemagic.
I am not running anything that specifically needs 5.2.x, that I am aware of.
Submitted by JamieCameron on Tue, 11/02/2010 - 12:30 Comment #10
What I would recommend is setting up our PHP 5.2 YUM repository as documented at :
http://www.virtualmin.com/documentation/id,virtualmin_bleeding_edge_pack...
then installing our PHP 5.2 packages with the command :
yum install php-5.2.14-1.vmbleed
Submitted by paul.kelly on Tue, 11/02/2010 - 12:41 Comment #11
I used this: rpm -ivh http://software.virtualmin.com/bleed/centos/5/i386/virtualmin-bleed-rele...
Then: yum install php-5.2.14-1.vmbleed
and got: No package php-5.2.14-1.vmbleed available.
I also did a yum clean all and repeated, with same result
Submitted by JamieCameron on Tue, 11/02/2010 - 12:55 Comment #12
What does the following output for you :
yum list | grep vmbleed
Submitted by paul.kelly on Tue, 11/02/2010 - 16:02 Comment #13
-bash-3.2# yum list | grep vmbleed
php-bcmath.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-dba.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-debuginfo.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-embedded.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-ldap.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-mcrypt.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-mhash.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-mssql.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-ncurses.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-pspell.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-soap.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-tidy.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed
php-xml.x86_64 5.2.14-1.el5.vmbleed virtualmin-bleed -bash-3.2#
Submitted by JamieCameron on Tue, 11/02/2010 - 16:14 Comment #14
Ok, in that case the command you want is :
yum install php-5.2.14-1.el5.vmbleed
Submitted by paul.kelly on Tue, 11/02/2010 - 16:27 Comment #15
aarrrggghhh
Package matching php-5.2.14-1.el5.vmbleed.x86_64 already installed. Checking for update.
Nothing to do
Submitted by JamieCameron on Tue, 11/02/2010 - 16:45 Comment #16
Damn, it looks like yum doesn't like that version because it thinks it is newer than the current one..
Can you tolerate a short down-time for your site during which PHP won't work? If so, you could remove all the PHP packages with a command like :
rpm -e --nodeps php-pdo php-cli php-gd php-mysql php-snmp php-zend-optimizer php php-odbc php-mbstring php-imap php-common php-pgsql php-xmlrpc php-devel php-pear php-mcrypt
And then re-install with :
yum install php-pdo php-cli php-gd php-mysql php-snmp php php-odbc php-mbstring php-imap php-common php-pgsql php-xmlrpc php-devel php-pear php-mcrypt
Submitted by JamieCameron on Tue, 11/02/2010 - 16:45 Comment #17
Also, if you do this be sure to restart Apache afterwards.