|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62267 Apache 2.4
Submitted: 2012-06-08 18:09 UTC Modified: 2016-08-08 16:15 UTC
Avg. Score:4.3 ± 0.9
Reproduced:6 of 6 (100.0%)
Same Version:4 (66.7%)
Same OS:5 (83.3%)
From: neweracracker at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Apache2 related
PHP Version: 5.3Git-2012-06-08 (snap) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: neweracracker at gmail dot com
New email:
PHP Version: OS:


 [2012-06-08 18:09 UTC] neweracracker at gmail dot com
I've implemented a patch for PHP 5.3 that enables Apache 2.4 support


php-5.4-apache-2.4.patch (last revision 2012-08-05 18:11 UTC by iomranic at gmail dot com)
php-5.4-apache-2.4 (last revision 2012-08-05 17:53 UTC by me at omranic dot com)
php5.3-apache24.diff (last revision 2012-06-08 18:09 UTC by neweracracker at gmail dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-05 17:51 UTC] iomranic at gmail dot com
Your patch allowed me to compile php5apache2_4.dll successfully, but Apache service failed to start with the following error(s) in event log:
>>> httpd.exe: Syntax error on line 175 of /path/to/httpd.conf: Module "sapi\\apache2handler\\mod_php5.c" is not compatible with this version.
>>> of Apache (found 20110619, need 20120211). Please contact the vendor for the correct version.	

After reviewing PHP's source code, I've reached a good solution which worked for me, compilation succeeded, and launching Apache 2.4 with PHP 5.4 module (Apache 2.4 Handler) succeeded as well. Solution attached as a patch file below. Note that I've removed Apache 2.3 support, and added both "Apache 2.4 Filter" & "Apache 2.4 Handler" support. I've removed unwanted "php_network.c" inclusion (that "neweracracker" added in his patch) from the patch as well, since I didn't see any need for it.
 [2012-08-05 18:04 UTC] iomranic at gmail dot com
This modified patch applicable for both branches 5.4 & 5.3
 [2012-08-05 19:59 UTC] neweracracker at gmail dot com
Hello, I had to include php_network.h in my patch because SAPIs for IPv6 enabled apache 2.4 wouldn't build without it.

I didn't tested PHP 5.4 yet regarding this. Only PHP 5.3.
 [2012-08-05 23:26 UTC] iomranic at gmail dot com
Well, I've tested my patch on all of the following PHP versions with successful positive results:

What's solved my issue was just one simple modification in your original patch:
Replace ||'sapi\\apache2handler');|| With ||'sapi\\apache2_4handler');||
Other modifications in my patch isn't mandatory.

Compiled & running successfully without any issues till now.
And to be honest, I didn't use Apache's IPv6 features & that's why I didn't care whether or not it's compiled & running or not.

P.S. If you can, please delete this patch (posted by mistake): php-5.4-apache-2.4 (last revision 2012-08-05 17:53 UTC)
 [2016-08-08 16:15 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-08-08 16:15 UTC]
php5apache2_4.dlls are shipped with the official TS PHP for
Windows builds at least as of PHP 5.5.0, so this ticket can be

Thanks for the patches, nonetheless! :-)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 09:03:37 2021 UTC