Skip to main content

user level PHP ini file How to set base ini file for whole account

Comments

6 comments

  • martin MHC
    CAUSE FOUND: Issue appears to be caused by updating/uploading changes to the root .htaccess file makes the WHM/Cpanel system apply the default PHP version (in this case 7.4). This is not recorded in the PHP Manager aspects of WHM which still erroneously states PHP 8.1 is active. The PHPinfo file states the actual version that is running.
    0
  • cPRex Jurassic Moderator
    cPanel uses the main .htaccess file to determine the PHP version for the domain, so if that is modified in an unintended way, it will cause this issue with the system.
    0
  • martin MHC
    cPanel uses the main .htaccess file to determine the PHP version for the domain, so if that is modified in an unintended way, it will cause this issue with the system.

    I have realised this now, but the WHM PHP manager doesn't update - still stating PHP8.1 was running on the account. Maybe this should be reported as a glitch to fix? ( using suPHP handler )
    0
  • cPRex Jurassic Moderator
    Can you explain the possible glitch a bit more? I'm not sure I'm following that.
    0
  • martin MHC
    Can you explain the possible glitch a bit more? I'm not sure I'm following that.

    Updating the root .htaccess on the account seems to silently change the account PHP version to the server default, rather than that defined by the PHP Manager settings in WHM. So the account becomes unstable / error logged due to this. Checking the multiPHP Manager in WHM this still shows the account has the PHP version previously set (8.1) but the account is actually running PHP 7.4 (server default). This is using the suPHP handler. Server default PHP version is 7.4 .
    0
  • cPRex Jurassic Moderator
    That sounds right to me. That's why there is the "do not edit" warnings inside the .htaccess code: # php -- BEGIN cPanel-generated handler, do not edit # Set the "ea-php80" package as the default "PHP" programming language. AddHandler application/x-httpd-ea-php80 .php .php8 .phtml # php -- END cPanel-generated handler, do not edit
    If things are adjusted in there, cPanel will get out of sync, as you have found.
    0

Please sign in to leave a comment.