php.net |  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
Votes:7
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
38 + 38 = ?
Subscribe to this entry?

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


Patches

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

History

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:
5.3.10/5.3.11/5.3.12/5.3.13/5.3.14/5.3.15
5.4.0/5.4.1/5.4.2/5.4.3/5.4.4/5.4.5

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] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2016-08-08 16:15 UTC] cmb@php.net
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
closed.

Thanks for the patches, nonetheless! :-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 21:01:28 2024 UTC