Hi,
In my .htaccess file, there is already a section of PHP, as below:
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
</IfModule>
# END cPanel-generated php ini directives, do not edit
Then when I try to change the PHP to 8.1 in WHM > MultiPHP Manager, I will get "Access Error". Then I go to cPanel and make the change, it works. But it do not remove the above section, instead, it appending a new section below the above one:
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
php_flag log_errors On
php_value error_reporting E_ALL
php_value error_log "/home/xxxx/public_html/customer/error_log"
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
php_flag log_errors On
php_value error_reporting E_ALL
php_value error_log "/home/xxxx/public_html/customer/error_log"
</IfModule>
# END cPanel-generated php ini directives, do not edit
I try to remove the first section for PHP 7.3 manually. But after some time, I find it back to .htaccess. So, how to eliminate this section?
In my .htaccess file, there is already a section of PHP, as below:
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
</IfModule>
# END cPanel-generated php ini directives, do not edit
Then when I try to change the PHP to 8.1 in WHM > MultiPHP Manager, I will get "Access Error". Then I go to cPanel and make the change, it works. But it do not remove the above section, instead, it appending a new section below the above one:
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php74” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
php_flag log_errors On
php_value error_reporting E_ALL
php_value error_log "/home/xxxx/public_html/customer/error_log"
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 90
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 512M
php_value post_max_size 4M
php_value session.gc_maxlifetime 2880
php_value upload_max_filesize 4M
php_flag zlib.output_compression Off
php_value session.save_path "/var/cpanel/php/sessions/ea-php74"
php_flag log_errors On
php_value error_reporting E_ALL
php_value error_log "/home/xxxx/public_html/customer/error_log"
</IfModule>
# END cPanel-generated php ini directives, do not edit
I try to remove the first section for PHP 7.3 manually. But after some time, I find it back to .htaccess. So, how to eliminate this section?
Last edited by a moderator: