大网数据广告活动
服务器运维问答

Error Start Apache "php value"

· 52CE 我爱测

After updating my vps, I get the follow error: Failed to start apache : 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…

问题原文

原帖链接 · David E. · CC BY-SA 3.0

After updating my vps, I get the follow error:

Failed to start apache : 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 [FAILED]

Enable modules on PHP:

[PHP Modules] bz2 calendar Core ctype curl date dom ereg exif fileinfo filter ftp gd gettext gmp hash iconv imap intl ionCube Loader json libxml mbstring mcrypt mhash mysql mysqli openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar readline Reflection session shmop SimpleXML sockets SPL sqlite3 standard suhosin tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib [Zend Modules] the ionCube PHP Loader

Line relative to error:

php_value session.save_handler "files"

What does the error mean and how can I fix it?

社区高分解答

原帖链接 · dasharath masirkar · CC BY-SA 3.0

Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

The Apache httpd-2.4 can failed with above error if you by mistake configured it to use other mpm module than prefork (as only prefork mpm works fine with php on Linux (CentOs7/RHEL7). Correcting Apache httpd configuration to use prefork mpm will solve the issue.

  1. /etc/httpd/conf.modules.d/10-php.conf

    LoadModule php5_module modules/libphp5.so

  2. /etc/httpd/conf.modules.d/00-mpm.conf

    LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-06-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。