Question: Unable to start Apache on a Plesk server: Invalid command 'php_admin_value'
Applicable to:Symptoms- The Apache service fails to start or the command "plesk repair web" fails to complete:
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.
CauseApache 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.
Resolution1.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:
#<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