Linux Apache: Invalid command php_admin_value error perhaps misspelled or defined

Linux Apache: Invalid command php_admin_value error perhaps misspelled or defined

What to do if you get Invalid command php_admin_value error perhaps misspelled or defined in Linux Apache?

The full error is this one:

“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.
fail!”


Follow these steps in order to fix it:

First, install the missing package.
Run the command:
# sudo apt-get install libapache2-mod-php5

Activate the module in Apache.
Run the command:
# sudo a2enmod php5

Restart the apache server
Run the command:
# sudo /etc/init.d/apache2 restart

That is pretty much it, after you do all these steps, you will not experience this error anymore.

If you have other options about this error, please leave in the comments.

ONE COMMENT

  • Luciano says:11.03.2019

    Thank you! I forgot to enable php mod in my case.

Add a comment: