php_handlers are not updated to PHP 5.4 after upgrade

Created:

2016-11-16 13:03:40 UTC

Modified:

2017-08-16 17:35:22 UTC

0

Was this article helpful?


Have more questions?

Submit a request

php_handlers are not updated to PHP 5.4 after upgrade

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 10.x for Linux

Symptoms

PHP handlers are showing old PHP version after Plesk upgrade to 11.5 and PHP upgrade to 5.4

Re-read fails:

~# /usr/local/psa/admin/sbin/php_handlers_control --reread
[Warning] removing handler `5.3' (module) due to errors in getting php version : can not get version from /usr/bin/php-cgi
[Warning] removing handler `5.3' (cgi) due to errors in getting php version : can not get version from /usr/bin/php-cgi

Cause

PHP 5.4 is incompatible with number of PHP 5.3 modules and directives, which are not removed upon upgrade, thus PHP binary is not reporting the version or suppressing all the output of php -v command.

Resolution

  1. Check conflicting packages and directives in the php_error.log or apache error_log and disable them:

    [11-Sep-2013 01:51:30 Europe/London] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imagick.so' - /usr/lib64/php/modules/imagick.so: undefined symbol: php_checkuid_ex in Unknown on line 0
    [11-Sep-2013 01:51:30 Europe/London] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/newrelic.so' - /usr/lib64/php/modules/newrelic.so: undefined symbol: php_end_ob_buffer in Unknown on line 0
    [11-Sep-2013 01:51:31 Europe/London] PHP Fatal error: Directive 'safe_mode' is no longer available in PHP in Unknown on line 0
    [11-Sep-2013 01:51:49 Europe/London] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imagick.so' - /usr/lib64/php/modules/imagick.so: undefined symbol: php_checkuid_ex in Unknown on line 0
    [11-Sep-2013 01:51:50 Europe/London] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/newrelic.so' - /usr/lib64/php/modules/newrelic.so: undefined symbol: php_end_ob_buffer in Unknown on line 0
    [11-Sep-2013 01:51:50 Europe/London] PHP Fatal error: Directive 'safe_mode' is no longer available in PHP in Unknown on line 0
  2. Disable the incompatible modules:

    # mv /etc/php.d/newrelic.ini{,.bak}
    # mv /etc/php.d/imagick.ini{,.bak}
  3. Remove or comment deprecated ' safe_mode ' directive in php.ini

  4. Reload PHP handlers:

    ~# /usr/local/psa/admin/sbin/php_handlers_control --reread
  5. Check if they are properly loaded:

    ~# /usr/local/psa/bin/php_handler --list
    id: display name: full version: version: type: cgi-bin: php.ini: custom:
    module 5.4.17 5.4.17 5.4 module /usr/bin/php-cgi /etc/php.ini false
    fastcgi 5.4.17 5.4.17 5.4 fastcgi /usr/bin/php-cgi /etc/php.ini false
    cgi 5.4.17 5.4.17 5.4
Have more questions? Submit a request
Please sign in to leave a comment.