Red Hat Bugzilla – Bug 845508
httpd fails to start in worker mode with php installed but without php-zts installed
Last modified: 2012-08-16 11:06:56 EDT
Description of problem:
When user switch httpd to worker MPM mode while having installed php, php config tries to load php-zts module. Since php-zts subpackage is not required and it is even located in optional channel, it may easily happen that httpd won't start because of php:
# service httpd start
Starting httpd: httpd.worker: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 9 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5-zts.so into server: /etc/httpd/modules/libphp5-zts.so: cannot open shared object file: No such file or directory
I know that threaded variant of php is without modules and not recommended, but imho we should either always install php-zts with php or arrange configuration in a way which do not broke httpd in this case.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. install httpd, php, uninstall php-zts if installed
2. stop httpd, switch to worker in /etc/sysconfig/httpd, start httpd
httpd fails to start in worker mode, with php installed but php-zts not installed.
httpd starts, either with php-zts, or without php when php-zts not installed.
Installing -zts by default is not really desirable.
The described behaviour here is actually the desired behaviour; the server should fail to start up with a configuration error because it *is* a configuration error to try to run php + worker without php-zts installed. It can't work.