Symptoms
A website reports an Apache Internal Server Error 500, and the Apache error log contains entries similar to the following:
[Tue Apr 27 00:15:10.724221 2021] [core:alert] [pid 88611:tid 47191295141632] [client 208.74.123.98:45406] /home/cpaneluser/public_html/.htaccess: php_value not allowed here, referer: http://www.domain.tld
[Tue Apr 27 00:15:10.724221 2021] [core:alert] [pid 88611] [client 208.74.123.98:50597] /home/cpaneluser/public_html/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
Description
This issue can be caused by an incorrect module specified on the php_value line. It can also be caused when suEXEC is configured on the server and there are php_value lines in .htaccess.
Workaround
If the module name is incorrect, the module name needs to be corrected. In the following example, the "posts_max_size" module name would have to be corrected to "post_max_size".
php_value posts_max_size 128M
If suEXEC is enabled, php_value lines need to be removed from the .htaccess file and placed in a php.ini file in the same directory.
Additional Information
We recommend editing the PHP settings with the MultiPHP INI Editor from cPanel or WHM:
How to set or increase PHP INI memory_limit or other values?