Hi, after a yum update, my php appears to be broken. Although PHP pages display properly, there is the following when you do a php -v

[root@hosting lib]# php -v PHP Warning: PHP Startup: fileinfo: 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 PHP Warning: PHP Startup: memcache: 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 PHP Warning: PHP Startup: readline: 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 PHP 5.2.9 (cli) (built: Mar 17 2009 16:54:24) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd.

Please advise what is broken. thank you.

Status: 
Closed (fixed)

Comments

Sounds like the "fileinfo" module is causing some trouble.

Where is your version of PHP coming from? And what does this command show:

rpm -qa | grep '^php'

The fileinfo module is likely being loaded from a .conf file in /etc/php.d -- you may want to try commenting out the line there that's telling it to load.

Thank you for the reply. This started when I wanted to load the Roundcube webmail program and it failed as it wanted PHP 5.2 or later. So, i used your 'bleeding edge' php - which installed just fine. So then did Roundcube, but then the trouble started.

The : rpm -qa | grep '^php' shows:

[root@hosting php.d]# rpm -qa | grep '^php'
php-pear-MDB2-2.4.1-2.el5.centos
php-pear-MDB2-Driver-mysql-1.4.1-3.el5.centos
php4-mbstring-4.4.8-1vm
php4-pgsql-4.4.8-1vm
php-cli-5.2.9-1.el5.vmbleed
php-tidy-5.2.9-1.el5.vmbleed
php-embedded-5.2.9-1.el5.vmbleed
php-pear-1.8.0-1.el5.vm
php-readline-5.1.6-15.el5.centos.1
php-pear-Net-SMTP-1.2.10-1.el5.centos
php-pear-Mail-Mime-1.4.0-1.el5.centos
php4-pear-4.4.8-1vm
php4-imap-4.4.8-1vm
php-pgsql-5.2.9-1.el5.vmbleed
php-bcmath-5.2.9-1.el5.vmbleed
php-xml-5.2.9-1.el5.vmbleed
php-pear-Auth-SASL-1.0.2-4.el5.centos
php-pear-Date-1.4.7-2.el5.centos
php4-mysql-4.4.8-1vm
php4-devel-4.4.8-1vm
php-mysql-5.2.9-1.el5.vmbleed
php-mssql-5.2.9-1.el5.vmbleed
php-gd-5.2.9-1.el5.vmbleed
php-pecl-apc-3.0.19-1.el5.vm
php-pear-Net-URL-1.0.15-1.el5.centos
php-pear-Log-1.9.13-1.el5.centos
php-pear-Net-Sieve-1.1.5-2.el5.centos
php4-gd-4.4.8-1vm
php4-ncurses-4.4.8-1vm
php4-xmlrpc-4.4.8-1vm
php-5.2.9-1.el5.vmbleed
php-mhash-5.2.9-1.el5.vmbleed
php-xmlrpc-5.2.9-1.el5.vmbleed
php-soap-5.2.9-1.el5.vmbleed
php-snmp-5.2.9-1.el5.vmbleed
php-imap-5.2.9-1.el5.vmbleed
php-devel-5.2.9-1.el5.vmbleed
php-pear-DB-1.7.13-1.el5.centos
php-pear-File-1.2.2-1.el5.centos
php4-ldap-4.4.8-1vm
php4-snmp-4.4.8-1vm
php-odbc-5.2.9-1.el5.vmbleed
php-mbstring-5.2.9-1.el5.vmbleed
php-mcrypt-5.2.9-1.el5.vmbleed
php-pear-Net-Socket-1.0.8-1.el5.centos
php-pear-HTTP-Request-1.4.2-1.el5.centos
php4-4.4.8-1vm
php4-domxml-4.4.8-1vm
php-pdo-5.2.9-1.el5.vmbleed
php-dba-5.2.9-1.el5.vmbleed
php-ncurses-5.2.9-1.el5.vmbleed
php-pecl-apc-debuginfo-3.0.19-1.el5.vm
php-pecl-Fileinfo-1.0.4-3.el5.centos
php-pear-Mail-1.1.14-1.el5.centos
php-pecl-memcache-2.2.3-1.el5_2
php4-odbc-4.4.8-1vm
php-common-5.2.9-1.el5.vmbleed
php-ldap-5.2.9-1.el5.vmbleed
php-pspell-5.2.9-1.el5.vmbleed
php-debuginfo-5.2.9-1.el5.vmbleed

The directory of /etc/php.d/ shows:

apc.ini     Fileinfo.ini  mbstring.ini  mysqli.ini         pdo.ini         pgsql.ini     tidy.ini       zip.ini
bcmath.ini  gd.ini        mcrypt.ini    mysql.ini          pdo_mysql.ini   pspell.ini    xmlreader.ini
dba.ini     imap.ini      memcache.ini  mysql.ini.rpmsave  pdo_odbc.ini    readline.ini  xmlrpc.ini
dbase.ini   json.ini      mhash.ini     ncurses.ini        pdo_pgsql.ini   snmp.ini      xmlwriter.ini
dom.ini     ldap.ini      mssql.ini     odbc.ini           pdo_sqlite.ini  soap.ini      xsl.ini

Yeah, it may be an issue with some modules you have installed expecting to see a different PHP version.

In those cases, I'm not sure they'll work with the bleeding edge repo. The fileinfo module above may be an example of that.

You may need to comment it out -- you can do that by editing the Fileinfo.ini file, and putting a ; mark in front of the "extension=" line.

Hi, thank you for the reply. There was only one extension in the Fileinfo.ini file - which I commented out as you suggested, restarted httpd - but the error still is there. When you do the php -v - :

[root@hosting php.d]# php -v PHP Warning: PHP Startup: memcache: 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 PHP Warning: PHP Startup: readline: 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 PHP 5.2.9 (cli) (built: Mar 17 2009 16:54:24) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd

please advise what to try next.

Well, note that the warning message has changed now.

Originally, the warning read "PHP Startup: fileinfo: Unable to initialize module ...".

Now, that mention of "fileinfo" has changed to "memcache":

"PHP Startup: memcache: Unable to initialize module..."

So the next step would be to comment out the memcache module.

Oh.. ok - thank you. Have now remarked out that one, then I got:

[root@hosting php.d]# php -v PHP Warning: PHP Startup: readline: 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 PHP 5.2.9 (cli) (built: Mar 17 2009 16:54:24) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with the ionCube PHP Loader v3.1.32, Copyright (c) 2002-2007, by ionCube Ltd.

so... have now done the readine.ini file - and now... all seems ok

What detrimental effect (if any) will this now have on my system please? Was this a 'workaround' that i will need to fix in another way please?

What detrimental effect (if any) will this now have on my system

It'll have no effect whatsoever if you aren't using the fileinfo, memcache, or readline modules :-)

The issue with using the bleeding edge repository is that PHP modules compiled against the standard CentOS 5.1.6 PHP version may not work correctly, as you're seeing.

If you don't need those modules, no problem at all, simply uncomment them or remove them altogether.

If you later discover you do require them, most of the ones you're having trouble with can be manually installed using PHP's pecl tool.

Thank you - please consider this thread now closed.

Automatically closed -- issue fixed for 2 weeks with no activity.