Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

All sites are down in Plesk: Syntax error on line 31 of /etc/httpd/conf.d/php.conf: Invalid command ‘php_value’

 
apachebackupmysqlosphp

Symptoms

  • Apache is in Failed state in Plesk, the following error is displayed in Plesk Home page:

    New configuration files for the Apache web server were not created due to the errors in configuration templates: AH00526: 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.

  • System PHP was installed manually from OS repositories using system package manager:

    # tail /var/log/yum.log
    Nov 11 02:47:19 Installed: libzip-0.10.1-8.el7.x86_64
    Nov 11 02:47:19 Installed: php-common-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: php-cli-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: php-pdo-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: t1lib-5.1.2-14.el7.x86_64
    Nov 11 02:47:20 Installed: php-gd-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: php-mysql-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: php-5.4.16-48.el7.x86_64
    Nov 11 02:47:20 Installed: php-ldap-5.4.16-48.el7.x86_64

    # history | grep php
    yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo

Cause

php package in OS repositories includes incorrect syntax in /etc/httpd/conf.d/php.conf: php_value parameters are included without <IfModule mod_php5.c> tags:

# tail -5 /etc/httpd/conf.d/php.conf
# Apache specific PHP configuration options
# those can be override in each configured vhost
#
php_value session.save_handler "files"
php_value session.save_path "/var/lib/php/session"

Resolution

  1. Connect to the server via SSH
  2. Create a backup of the configuration file:

    # cp /etc/httpd/conf.d/php.conf{,.orig}

  3. Edit /etc/httpd/conf.d/php.conffile in any text editor and edit the syntax to include the <IfModule mod_php5.c> tags:
    BEFORE:

    php_value session.save_handler "files"
    php_value session.save_path "/var/lib/php/session"

    AFTER:

    <IfModule mod_php5.c>
    php_value session.save_handler "files"
    php_value session.save_path    "/var/lib/php/session"
    </IfModule>

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »

Your Complete .htaccess Guide: Including .htaccess Basics and More

Read More »

NGINX vs Apache – Which Is the Best Web Server in 2024?

Read More »
Knowledge Base

Unable to reconfigure domain on Plesk server: Invalid parameter number: no parameters were bound

Read More »

How to update ionCube Loader to the latest version for 7.3 and 7.4 shipped by Plesk?

Read More »

Plesk error: Template processing failed. TemplateException

Read More »

Unable to open domain file manager in Plesk: Full path is undefined

Read More »

Hosting Wiki

  • Cross Site Request Forgery (CSRF)
  • Cross-Origin Resource Sharing (CORS)
  • Server Redundancy
  • Postfix
  • PostgreSQL
  • DDoS
  • Bare Metal Server
  • Backup
  • MySQL
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • SQL
  • Hosting Control Panel
  • Plesk
  • NoSQL Database
  • Apache Tomcat
  • Apache
  • Web Server
  • DNS Server
  • SSH
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family