[SOLVED] Invalid command 'php_admin_value' error after upgrade to Ubuntu 16.04.3

5 posts / 0 new
Last post
#1 Sat, 11/25/2017 - 16:24
massimo_512

[SOLVED] Invalid command 'php_admin_value' error after upgrade to Ubuntu 16.04.3

Hallo, I am trying to upgrade from ubuntu 14.04 to ubuntu 16.04.3.

I installed Virtualmin on a fresh 16.04.3 virtual machine (KVM on Cloudmin) and restored my virtual servers (15 servers + several sub-servers) from the old box. After restoration, I ran the re-check configuration and got the following error on some virtual servers/sub-servers:

AH00526: Syntax error on line 38 of /etc/apache2/sites-enabled/0-mysite-name.conf: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information.

I searched through the forum but could not find any working fix.

Any help will be appreciated.

Thanks

Wed, 11/29/2017 - 05:46
massimo_512

I think I solved the issue. The new box Ubuntu Linux 16.04.3 / Webmin 1.860 doesn't like the following lines in the /etc/apache2/sites-available/site.name.conf files. php_value = ... php_admin_value = ... All I had to do was to remove them. This is the commands I used:

Create a backup copy of files

mkdir ~/sites_available_backup cp -av /etc/apache2/sites-available/* ~/sites_available_backup

Remove problematic lines sed -i "/\b(php_value|php_admin_value)\b/d" /etc/apache2/sites-available/*

Fri, 12/01/2017 - 10:15
dentman

I'm having this problem as well. Restoring back ups results in the same error. This has to be a bug right? The whole installation process with virtualmin pro is automatic and restoring a back up server is a button push. Yet when checking my site I get a database error page and when rechecking configuration I get the : AH00526: Syntax error on line 38 of /etc/apache2/sites-enabled/0-mysite-name.conf: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration Action 'configtest' failed. The Apache error log may have more information. the line in question is: " php_admin_value engine off " ..... and if I understand it correctly that is supposed to be there. Hopefully someone can help. I'm dead in the water here? Can I get an earlier version of webmin/virtualmin until this gets sorted out?

Sun, 06/02/2019 - 09:37
kurtobando
kurtobando's picture

I have the name problem,

Jun 02 14:37:19 webcloud apachectl[2091]: AH00526: Syntax error on line 37 of /etc/apache2/sites-enabled/digitalbeards.asia.conf: Jun 02 14:37:19 webcloud apachectl[2091]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration Jun 02 14:37:19 webcloud apachectl[2091]: Action 'start' failed. Jun 02 14:37:19 webcloud apachectl[2091]: The Apache error log may have more information. Jun 02 14:37:19 webcloud systemd[1]: apache2.service: Control process exited, code=exited status=1 Jun 02 14:37:19 webcloud systemd[1]: apache2.service: Failed with result 'exit-code'. Jun 02 14:37:19 webcloud systemd[1]: Failed to start The Apache HTTP Server.

After I follow these https://helgeklein.com/blog/2018/11/enabling-http-2-in-apache-on-ubuntu-...

Sun, 06/02/2019 - 10:19
andreychek

Howdy,

The "php_admin_value" lines in the Apache config are specific to mod_php. That is, mod_php needs to be loaded for those to work.

If you're no longer using mod_php, you'd need to remove any reference to "php_admin_value" in the Apache config... those would typically be in the .conf files in /etc/apache2/sites-enabled.

Those can be commented out, and then once that's done, you'd need to restart Apache.

For anyone that's seen this issue after restoring an earlier backup -- the issue there is that newer Virtualmin versions don't enable mod_php by default, but the older installation may still have those lines in the Apache config. Removing those lines is one solution, though another option is to enable mod_php (I'd personally vote for the former option though, having mod_php isn't necessary and uses up a decent chunk of RAM).

-Eric