Bug 845508

Summary: httpd fails to start in worker mode with php installed but without php-zts installed
Product: Red Hat Enterprise Linux 6 Reporter: David Kutálek <dkutalek>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-16 15:06:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Kutálek 2012-08-03 09:26:58 UTC
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
                                                           [FAILED]

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):

php-5.3.3-3.el6_2.8.x86_64
php-zts-5.3.3-3.el6_2.8.x86_64
httpd-2.2.15-15.el6_2.1.x86_64

How reproducible:

Always

Steps to Reproduce:
1. install httpd, php, uninstall php-zts if installed
2. stop httpd, switch to worker in /etc/sysconfig/httpd, start httpd
3.
  
Actual results:

httpd fails to start in worker mode, with php installed but php-zts not installed.

Expected results:

httpd starts, either with php-zts, or without php when php-zts not installed.

Additional info:

Comment 1 Joe Orton 2012-08-16 15:06:56 UTC
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.