Skip to main content

PHP handler for PHP-FPM

Comments

5 comments

  • cPanelMichael
    Hello, PHP Handlers do not apply to PHP-FPM. Once you enable PHP-FPM for an account, that becomes it's handler and thus the default PHP handler you enable for a version of PHP no longer applies to that account. If you've enabled PHP-FPM for all accounts, then it doesn't matter what you configure as the PHP handler for a version of PHP, because the accounts will instead use PHP-FPM (no matter what's configured as the handler). Thank you.
    0
  • celiac101
    Thank you for that explination. So now my problem is that I have some applications that are in separate directories that need to run on PHP 5.6, instead of PHP 7. Before I used the code below in an .htaccess file to make that directory use PHP 5.6. Is there any way to do this now that I am on PHP-FPM ? # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php56" package as the default "PHP" programming language. AddType application/x-httpd-ea-php56 .php .php5 .phtml # php -- END cPanel-generated handler, do not edit
    0
  • cPanelMichael
    So now my problem is that I have some applications that are in separate directories that need to run on PHP 5.6, instead of PHP 7. Before I used the code below in an .htaccess file to make that directory use PHP 5.6. Is there any way to do this now that I am on PHP-FPM ?

    PHP-FPM is controlled through the Apache virtual host, so while it's possible to enable a different PHP version on a addon domain or subdomain, it's not configurable on a per-directory basis. You'd need to create a subdomain for that directory and access it via the subdomain in the address bar of your browser if that's the behavior you are seeking and you want to continue using PHP-FPM. Thank you.
    0
  • celiac101
    Would you happen to have an example of the code required in the Apache virtual host to make a virtual directory keep using PHP 5.6? For example, I have one folder that is in a subdomain without www, so it uses domain123.com instead of www.domain123.com. The example directory name off root is /advertising Please let me know.
    0
  • cPanelMichael
    Hello, We currently only support updating the PHP version on a per-domain or per-subdomain basis when PHP-FPM is enabled. You'd need to setup a separate subdomain for each application that requires it's own PHP version and assign it that specific version using the MultiPHP Manager option in cPanel or WHM. Thank you.
    0

Please sign in to leave a comment.