tags:

views:

2298

answers:

2

I just updated PHP 5.2.0 to 5.2.11 and now I am getting loads of errors when calling PHP :(

I downloaded source and used the same ./configure line from old phpinfo then did make install.

The errors I'm getting are below, anyone have any ideas how to sort out this mess please?

This is on RHEL 5.2

PHP Warning:  PHP Startup: dbase: 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: dom: 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: gd: 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: imap: 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: ldap: 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: mbstring: 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: mysql: 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: mysqli: 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: PDO: 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: pdo_mysql: 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: pdo_sqlite: 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: xmlreader: 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: xmlrpc: 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: xmlwriter: 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: Unable to load dynamic library '/usr/lib/php/modules/xsl.so' - /usr/lib/php/modules/xsl.so: undefined symbol: dom_node_class_entry in Unknown on line 0
+1  A: 

I'm going to wager that those modules were installed via pecl, as opposed to compiling them along with php. Do you have options like --with-pdo, --with-pdo-mysql in your ./configure line? If not, then all this stuff could have been installed (which includes compilation and linking against PHP) via pecl after the initial PHP compile.

What happens if you upgrade each via pecl?

pecl upgrade <modulename>
timdev
There was no --with-pdo etc in configure so I trued "pecl upgrade pdo" etc but pecl says for all of them "invalid or missing package file"I tried adding --with-pdo etc to configure line and re-compiling but that didn't work either.
Tim
pecl list(no packages installed from channel pecl.php.net)
Tim
Certainly sounds strange. What platform is this running on? Do you know how 5.2.0 was installed originally?
timdev
Red Hat Enterprise Linux 5.2. I think 5.2.0 was installed via yum update. That's still the latest version in repository though which is why I'm trying to do 5.2.11 manually.
Tim
That's probably the issue. yum just dumps precompiled binaries on the disk. You'll probably be best off by adding the right flags to ./configure, and then taking care to ensure that php.ini is loading the newly-compiled libs, not some random binaries that yum put somewhere. Sorry I can't be more specific, really.
timdev
OK thanks. Probably better if I stick with yum's version then. Do you know how to get rid of the 5.2.11 I've compiled?
Tim
To be honest, I'm not sure of the best way to handle that. It's probably bad that you overwrote what yum thinks is there. In the future, it's better to custom-compile your own things to some place like /usr/local, so they don't overwrite stuff that your package manager does.
timdev
A: 

Problem solved - just had to ditch a load of ini files in /etc/php.d

Maybe not the best solution, I'm not sure if I've now lost some functionality, but everything I need it to do works so it's fine.

Tim