I’ve just tried out the new feature to remove mod_php after being prompted on the dashboard when logging in to Virtualmin 7.0 (Great feature/idea btw).
The output of the script is as follows:
Removing LoadModule line ..
Removing php_value directives from virtual servers ..
.. updated 5 servers
Removing global php_value directives ..
Applying web server configuration ..
All seems OK and the websites continue working, however after the next restart Apache it fails to start with the following:
May 03 10:43:51 <HOSTNAME> systemd: Reloading The Apache HTTP Server.
May 03 10:43:52 <HOSTNAME> httpd: AH00526: Syntax error on line 395 of /etc/httpd/conf/httpd.conf:
May 03 10:43:52 <HOSTNAME> httpd: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
May 03 10:43:52 <HOSTNAME> systemd: httpd.service: control process exited, code=exited status=1
May 03 10:43:52 <HOSTNAME> systemd: Reload failed for The Apache HTTP Server.
Upon checking httpd.conf there is indeed still a number of lines such as:
php_admin_value engine Off
php_value memory_limit 32M
For various virtual hosts.
It appears that when the mod_php removal script says it is removing php_value settings, it does not actually do it.
I have tried this on three servers so far, all the same issue.
Manually removing php_* lines form httpd.conf resolves the issue.
I’m relatively new to server management, I did not understand how to apply this patch. (/etc/apache2/sites-available/*.conf on Ubuntu/Debian), do I have to edit each file in the folder or how do I go about this. Thanks.