Articles in this section

Unable to start Apache on a Plesk server: Invalid command 'php_admin_value'

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • The Apache service fails to start or the command "plesk repair web" fails to complete:

    CONFIG_TEXT: server.example.com httpd[13145]: AH00526: Syntax error on line 2 of /var/www/vhosts/system/example.com/conf/vhost.conf:
    server.example.com httpd[13145]: Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration

  • The same error message is shown on the Home page in Plesk.

  • The domain mentioned in the error message (in this example, example.com) has been migrated from a server with mod_php5 enabled.

Cause

Apache module mod_php5 is outdated and is disabled for security reasons.

Note: The issue may appear for different mod_php5 modules such as php_flag or php_admin_flag.

Resolution

  1. Connect to the Plesk via SSH.

  2. Open the file vhost_ssl.conf that appears in the error message in a text editor. In this example, we are using the vi editor:

    # vi /var/www/vhosts/system/example.com/conf/vhost_ssl.conf

  3. Comment out the string with php_admin_value directive by placing a # (hash) character at the beginning of each line:

    CONFIG_TEXT: #<Directory /home/httpd/vhosts/example.com/httpdocs>
    #php_admin_value open_basedir "/home/httpd/vhosts/example.com/httpdocs:/tmp"
    #</Directory>

  4. Save the changes and close the file.

  5. Repair web-server configuration using the command:

    # plesk repair web -y

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.