问题原文
原帖链接 · 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.
/etc/httpd/conf.modules.d/10-php.conf
LoadModule php5_module modules/libphp5.so
/etc/httpd/conf.modules.d/00-mpm.conf
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
