Invalid command ‘php_value’ and Syntax Error of php.conf

Receiving the following when trying to restart apache (httpd):

[root@localhost ~]# service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 31 of /etc/httpd/conf.d/php.conf:
Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

I found that in /etc/httpd/conf.d/php.conf the following directives for loading PHP modules was missing. You can resolve this issue by just adding the following to /etc/httpd/conf.d/php.conf:

<IfModule prefork.c>
  LoadModule php5_module modules/
<IfModule worker.c>
  LoadModule php5_module modules/

Now, restarting apache works without any problems.

You may also like...

2 Responses

  1. Guillaume says:


    Thanks, your tip just saved some time.
    I'm trying to install owncloud over an Archlinux for Arm on a Wandboard according to archlinux wiki.
    I just had to uncomment "LoadModule php5_module modules/" in /etc/httpd/conf.d/php.conf and it works.

    Thanks again,


  2. Subbu says:

    Thank you very much.. nice tip.

Leave a Reply

Your email address will not be published. Required fields are marked *