However, there appears to be a bug in MultiPHP manager in that it does not do this if the .htaccess file is outside the public_html tree. (You need to watch out for this if you have sub-domains that map to somewhere outside of public_html).
Thus, the PHP version that MultiPHP manager thinks it has set is not necessarily the actual version that has been set in your .htaccess file. In other words...
- Always set your PHP version from your .htaccess file. MultiPHP manager might indicate that a different version of PHP is being used. That does not matter unless someone (e.g. a site administrator) actually tries to helpfully "Apply" the MultiPHP manager settings to your sub-domain, in which case, your .htaccess file might be altered without your knowledge. So...
- Admins with cpanel access should never use MultiPHP manager without verifying, afterwords, which edits (if any) it actually made to the relevant .htaccess file.
Code: Select all
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
If/when MultiPHP manager runs, its adds, to the end of your .htaccess file, the following text...
Code: Select all
# php -- BEGIN cPanel-generated handler, do not edit
# Set the "ea-php72" package as the default "PHP" programming language.
AddType application/x-httpd-ea-php72 .php .php7 .phtml
# php -- END cPanel-generated handler, do not edit
cPanel also offers a "MultiPHP editor" which is of very little use at all. It "purports" to generate PHP configuration code for for three files, .htaccess, php.ini and .user.ini. However ...
- The code for .htaccess does not take into account the fact that britiac3 does not run PHP as an Apache module. If you run .htaccess with the code suggested by the cPanel MultiPHP editor, our server will report 500 Internal Server Error.
- php.ini cannot be run from the location that cPanel writes to. (One has to suppose that the system's php.ini has already been configured correctly).
- Whilst there is something to be said for writing a comprehensive .user.ini file, Im not sure that that is what cPanel supplies. If you want to configure PHP at such a level of detail, you should (I assert) get hold of the system php.ini file and edit that. The online PHP manual will tell you which directives can be included where. See...
Info on .user.ini: http://php.net/manual/en/configuration. ... r-user.php
Info on directives: http://www.php.net/manual/en/ini.list.php
Info on scope: http://php.net/manual/en/configuration. ... .modes.php