• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Apache handler missing for PHP in Plesk

AlexanderPolizu

New Pleskian
Hi Guys,

Is anyone aware of why the apache handler would be missing from the PHP handler? The account PHP settings will display only FastCGI as an option from the drop down menu. We have multiple PHP versions installed by the autoinstaller but non of them have apache handler as an option. Please check the attachment. Thanks.
 

Attachments

  • php.png
    php.png
    24.4 KB · Views: 24
Hi AlexanderPolizu,

first, pls. check your PHP - handlers for example with the CLI - command:

plesk bin php_handler --help

plesk bin php_handler --list

... or/and at: => Home > Tools & Settings > PHP Settings


Second, pls. be aware, that using the apache - module as PHP - handler is outdated and insecure these days and should be considered not to be used anymore. Pls. use "FastCGI" or "FPM" instead.


Since Plesk 12.5, the usage of the "Apache handler" is disabled by default. To enable this module on your server, pls. enable the apache - module "php5".


If the "Apache handler" is missing completely on your server, then the root cause can be the missing apache - module "mod_php" or/and the usage of "mpm-event", instead of "mpm-prefork" ( Pls. see: => Home > Tools & Settings > Apache Web Server )
 
Hi UFHH01,

Thank you for the response. Unfortunately I can't attach more screens for some reason to show the modules but php5 is enabled in the apache modules and mod_php with mpm-even are not listed there at all.

This is the output of plesk bin php_handler --list

# plesk bin php_handler --list
id: display name: full version: version: type: cgi-bin: php-cli: php.ini: custom: status:
cgi 5.3.23 by OS vendor 5.4.45 5.4 cgi /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
fastcgi 5.3.23 by OS vendor 5.4.45 5.4 fastcgi /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
module 5.3.23 by OS vendor 5.4.45 5.4 module /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
plesk-php53-cgi 5.3.29 5.3.29 5.3 cgi /opt/plesk/php/5.3/bin/php-cgi /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.3/etc/php.ini true disabled
plesk-php53-fastcgi 5.3.29 5.3.29 5.3 fastcgi /opt/plesk/php/5.3/bin/php-cgi /opt/plesk/php/5.3/bin/php /opt/plesk/php/5.3/etc/php.ini true enabled
plesk-php54-cgi 5.4.45 5.4.45 5.4 cgi /opt/plesk/php/5.4/bin/php-cgi /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true enabled
plesk-php54-fastcgi 5.4.45 5.4.45 5.4 fastcgi /opt/plesk/php/5.4/bin/php-cgi /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true enabled
plesk-php54-fpm 5.4.45 5.4.45 5.4 fpm /opt/plesk/php/5.4/sbin/php-fpm /opt/plesk/php/5.4/bin/php /opt/plesk/php/5.4/etc/php.ini true enabled
plesk-php55-cgi 5.5.38 5.5.38 5.5 cgi /opt/plesk/php/5.5/bin/php-cgi /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true disabled
plesk-php55-fastcgi 5.5.38 5.5.38 5.5 fastcgi /opt/plesk/php/5.5/bin/php-cgi /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true enabled
plesk-php55-fpm 5.5.38 5.5.38 5.5 fpm /opt/plesk/php/5.5/sbin/php-fpm /opt/plesk/php/5.5/bin/php /opt/plesk/php/5.5/etc/php.ini true enabled
plesk-php56-cgi 5.6.27 5.6.27 5.6 cgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true disabled
plesk-php56-fastcgi 5.6.27 5.6.27 5.6 fastcgi /opt/plesk/php/5.6/bin/php-cgi /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
plesk-php56-fpm 5.6.27 5.6.27 5.6 fpm /opt/plesk/php/5.6/sbin/php-fpm /opt/plesk/php/5.6/bin/php /opt/plesk/php/5.6/etc/php.ini true enabled
plesk-php70-cgi 7.0.12 7.0.12 7.0 cgi /opt/plesk/php/7.0/bin/php-cgi /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true disabled
plesk-php70-fastcgi 7.0.12 7.0.12 7.0 fastcgi /opt/plesk/php/7.0/bin/php-cgi /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true enabled
plesk-php70-fpm 7.0.12 7.0.12 7.0 fpm /opt/plesk/php/7.0/sbin/php-fpm /opt/plesk/php/7.0/bin/php /opt/plesk/php/7.0/etc/php.ini true enabled

PHP version 5.3.23 by OS vendor is actually the default 5.4.45 version because when we setup 5.3.23 from the domain PHP settings the PHP info will display version 5.4.45. We need apache handler for PHP 5.3.29 but it is missing from the drop down menu.
 
Hi AlexanderPolizu,

consider to update/change your DISPLAY - NAME "5.3.23 by OS vendor" with the current installed basic PHP version, to match display - name and version. ;)

Code:
plesk bin php_handler --update \
 -id "cgi" \
 -displayname "5.4.45 by OS vendor ( default )"
 
plesk bin php_handler --update \
 -id "fastcgi" \
 -displayname "5.4.45 by OS vendor ( default )"

plesk bin php_handler --update \
 -id "module" \
 -displayname "5.4.45 by OS vendor ( default )"

PHP version 5.3.23 by OS vendor is actually the default 5.4.45 version because when we setup 5.3.23 from the domain PHP settings the PHP info will display version 5.4.45. We need apache handler for PHP 5.3.29 but it is missing from the drop down menu.
Sorry, but you are not correctly informed about the "Apache handler" ( = Apache module ), which is based on the basic vendor - PHP - version on your server for your apache - webserver. It is ONLY available for your current vendor - PHP - version "5.4.45", which you can see here:

module 5.3.23 by OS vendor 5.4.45 5.4 module /usr/bin/php-cgi /usr/bin/php /etc/php.ini false enabled
... but ( !!! ), your settings here are incorrect, because the path don't match the current "php.ini" for your apache module. It should be ( for Ubuntu/Debain - based - systems ):

Code:
                  id:         display name:                    full version:  version:    type:                      cgi-bin:                    php-cli:                        php.ini:    custom:  status:

               module    5.4.45 by OS vendor ( default )          5.4.45       5.4        module                 /usr/bin/php-cgi                /usr/bin/php    /etc/php5/apache2/php.ini    false  enabled


Additional Plesk - PHP - versions don't have any "Apache handler" at all, because Plesk doesn't have such packages for it's PHP - versions. ;)
 
Back
Top