Results 1 to 3 of 3

Thread: Apache2 : Invalid command 'php_value'

  1. #1
    Join Date
    Oct 2019

    Apache2 : Invalid command 'php_value'

    When i do
    service apache2 restart
    Job for apache2.service failed because the control process exited with error code.
    root@vmi296146:/etc/apache2/sites-enabled# service apache2 status
     apache2.service - The Apache HTTP Server
       Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
      Drop-In: /lib/systemd/system/apache2.service.d
       Active: failed (Result: exit-code) since Thu 2019-10-03 18:26:46 CEST; 22s ago
      Process: 10714 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
      Process: 10721 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
     Main PID: 10507 (code=exited, status=0/SUCCESS)
    Oct 03 18:26:46 systemd[1]: Starting The Apache HTTP Server...
    Oct 03 18:26:46 apachectl[10721]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/pterodactyl.conf:
    Oct 03 18:26:46 apachectl[10721]: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
    Oct 03 18:26:46 apachectl[10721]: Action 'start' failed.
    Oct 03 18:26:46 apachectl[10721]: The Apache error log may have more information.
    Oct 03 18:26:46 systemd[1]: apache2.service: Control process exited, code=exited status=1
    Oct 03 18:26:46 systemd[1]: apache2.service: Failed with result 'exit-code'.
    Oct 03 18:26:46 systemd[1]: Failed to start The Apache HTTP Server.
    Somebody can help me ?

  2. #2
    Join Date
    Nov 2008
    Metro Boston
    Kubuntu Development Release

    Re: Apache2 : Invalid command 'php_value'

    Did you install PHP as well as Apache? The "php_value" directive lets you set configuration values for PHP in the Apache configuration file.

    The easiest one-step method is to use "sudo apt install lamp-server^" which will install Apache, PHP, and also MySQL.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Sep 2011
    Behind you!
    Ubuntu 18.04 Bionic Beaver

    Re: Apache2 : Invalid command 'php_value'

    Assuming you are using Ubuntu Server 18.04:

    sudo apt install php7.2 libapache2-mod-php7.2
    That will install PHP and the Apache to PHP connector.

    Here are the steps I use when setting up an Apache web server.

    Last edited by LHammonds; 2 Weeks Ago at 08:13 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts