Page 1 of 1

PHP 5.3 support

PostPosted: Sat May 18, 2013 10:38 pm
by bluemoon4281
Hi everyone,
I recently noticed that my copy of nubuilder was unable to save certain changes to the database. While changes to nuBuilder (updates to forms, reports, etc.) saved to the database fine, changes to the actual data (e.g. updating a client's name) caused a HTTP 500 Internal server error (and did not show nuBuilder's own debug page--I was logged in as globaladmin).

I eventually tracked this down to a recent upgrade from PHP 5.2 to 5.3; if I downgrade the server environment, nuBuilder works correctly again. I do not wish to do this however, as PHP 5.2.x has many known vulnerabilities and is no longer receiving security patches. I also cannot find any details as to whether nuBuilder supports a specific version of PHP. On the installation page it only says what server software it requires, not the versions it has been tested to work with.

In the hope that nuBuilder now supported PHP 5.3, I ran the DB upgrades between my version (12.02.15) and the current (as of writing) v2.8.1-12.12.19-Build554. Unfortunately, while the upgrades were successful, they did not resolve my problem.

FEATURE REQUEST: Can a file, perhaps called VERSION, be included with all future releases of nuBuilder? It was difficult to determine which version of nuBuilder I was running as I took the version from the INSTALL file as the version I was running. I know the version can be inferred from the last modified date at the beginning of the PHP files, but a definitive version for the entire program would help.

Error_log file in /nu/productionnu2/ (only the lines generated by this error included). It looks as though the key problem is that nuBuilder requires register_globals to be enabled, which no longer exists in PHP 5.3 due to the security risk.
Error_log:
Code: Select all
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: third_arg_force_ref in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Deprecated:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: third_arg_force_ref in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Deprecated:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: magickwand: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: undefined symbol: third_arg_force_ref in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Warning:  PHP Startup: SourceGuardian: Unable to initialize module
Module compiled with module API=20060613
PHP    compiled with module API=20090626
These options need to match
in Unknown on line 0
[00-XXX-0000 00:00:00 removed] PHP Deprecated:  Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0


Thanks,
James

Re: PHP 5.3 support

PostPosted: Fri May 31, 2013 10:16 am
by massiws
James, sorry for delay.

NuBuilder should works fine with PHP 5.3, at least based on my experience.

Afer upgrade PHP, are you sure the requirements to run nuBuilder are satisfied? (see here: http://forums.nubuilder.com/viewtopic.php?f=3&t=8241&p=11813&hilit=requirements#p11813)
Have you get more information looking in the server log about errors encountered?

About the feature request: it has been added as of version 2.8.1 (see here: https://www.nubuilder.net/change.php?changelog_id=150cfb1f17e359).

Register_globals are deprecated in PHP 5.3, but exists.

Max

Re: PHP 5.3 support

PostPosted: Fri May 31, 2013 11:01 am
by mike
Hi James,

From looking at your log output, it appears that the PHP modules didn't get upgraded with the PHP core when you went from 5.2 to 5.3. This is most likely the cause of the nuBuilder not working correctly. If you upgrade all of PHP's modules to version compiled for PHP 5.3, it should work.

Regards,
Mike

Re: PHP 5.3 support

PostPosted: Sat Jun 01, 2013 6:19 pm
by bluemoon4281
Hi,
Max thanks for the info--good to know.

Thanks Mike; my site is hosted on HostGator who allow their users to use either PHP 5.2 or PHP 5.3, the latter being enabled through an override in .htaccess. I neglected to remove the custom php.ini which referenced modules in PHP 5.2. After renaming the file to php.ini.old (forcing use of HostGator's default php.ini file), nuBuilder is now working correctly.

Thanks both for your help,
James

Re: PHP 5.3 support

PostPosted: Sat Jun 01, 2013 10:09 pm
by massiws
.