Saturday, January 9, 2010

[nslu2-linux] BUG: php core and php extensions are built with different thread-safety

 

Hi guys,

I think I have found a bug using cross built Optware packages from the oleg feed, probably other feeds has this trouble as well.

My main aim was to configure a web server with php and mysql and ran into several troubles, now the config looks like php-thttpd 2.25b-5.2.12-1, php 5.2.12-1, php-mysql 5.2.12-1, mysql 4.1.22-3 .

Web server is running fine, php codes are interpreted, but mysql connection is not working, even php reports the following error message:

Fatal error: Call to undefined function mysql_connect() in /opt/share/index.php on line 4

So I have checked phpinfo() and it loads the php.ini properly, even finds additional mysql.ini in /opt/etc/php.d, but mysql configuration is not present on the page. So the standard mysql_* functions are missing from the php api.

In php.log the following errors can be seen:

[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: bcmath: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: bz2: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: calendar: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: dba: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: dom: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: exif: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: ftp: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: openssl: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: shmop: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: sockets: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: sysvmsg: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: sysvsem: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: sysvshm: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: xml: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: xsl: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: zlib: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
[09-Jan-2010 14:40:12] PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20060613, debug=0, thread-safety=1
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0

It lists all built in php and the external mysql modul with errors that thread-safety flag is different on PHP core and the module itself.

Could someone please put up this trouble report to the nslu2 bugs for the developers, it will be a piece of cake for them, I believe. :)
Thanx!

Regards,
Károly

__._,_.___
.

__,_._,___

No comments:

Post a Comment