FS#39214 - [apache] [php-apache] [php] broken in 2.4 (MPM?)

Attached to Project: Arch Linux
Opened by Pierre Durand (Pierrre) - Friday, 07 March 2014, 09:46 GMT
Last edited by Jan de Groot (JGC) - Friday, 07 March 2014, 11:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:
apache doesn't start with php

Additional info:
* package version(s): extra/apache 2.4.7-1, extra/php-apache 5.5.10-1, extra/php 5.5.10-1

Steps to reproduce:

- install apache (2.4), php-apache, and php
- add "LoadModule php5_module modules/libphp5.so" in "/etc/httpd/conf/httpd.conf"
- systemctl start httpd

error: Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 07 March 2014, 11:06 GMT
Reason for closing:  Not a bug
Comment by Bogomil (smirky) - Friday, 07 March 2014, 10:17 GMT
I'm also experiencing this problem with the same output showed by "systemctl status httpd" since I've upgraded to the 2.4 version of Apache. I'm making the new configuration slowly, step by step to make sure everything is working properly. PHP doesn't seem to do so far.
Comment by Pierre Durand (Pierrre) - Friday, 07 March 2014, 10:43 GMT
Don't close this issue! (#39107 is closed)
This problem is not fixed: no solution has been found.
Comment by Oleg aka Blake-R (Blake-R) - Friday, 07 March 2014, 10:55 GMT
Solution is switch event/worker mpm to well known oldschool prefork mpm.

Or change usage from mod_php to php-cgi with php-fpm or mod_fcgid.
Comment by Pierre Durand (Pierrre) - Friday, 07 March 2014, 10:58 GMT
Ok, how to use prefork mpm?

Was prefork mpm used in apache 2.2?
Comment by Jan de Groot (JGC) - Friday, 07 March 2014, 11:05 GMT
The default was mpm_prefork in 2.2, which you could switch to worker or itk by changing /etc/default/httpd. It was impossible to use worker + mod_php in 2.2 also.

AFAIK the new default is to use mpm_event in 2.4. This MPM will not work with mod_php if not compiled with ZTS enabled, but even if you compile with ZTS enabled, it's still not guaranteed to be threadsafe because of 3rd party modules loaded into PHP.

If you want to use mod_php, switch to prefork mpm. If you want to use worker or event, switch to mod_fastcgi with php-fpm or mod_fcgid if you want apache to manage the processes.

Loading...