php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62239 Opcode cachers don't work correctly with mod_php and Apache 2.4.x
Submitted: 2012-06-06 08:19 UTC Modified: 2013-02-18 00:35 UTC
From: info at jandegrootict dot nl Assigned:
Status: No Feedback Package: Apache2 related
PHP Version: 5.3.13 OS: Linux 3.0
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at jandegrootict dot nl
New email:
PHP Version: OS:

 

 [2012-06-06 08:19 UTC] info at jandegrootict dot nl
Description:
------------
When compiling PHP 5.3.13 with Apache 2.4.2 (prefork MPM), opcode cachers like Xcache and APC seem to produce invalid code.
In case of APC, PHP will generate notices about "undefined variable: _SERVER". Besides that, both APC and Xcache will sometimes generate errors about not finding includes that were included from the current directory of a script.
Whenever I downgrade Apache to 2.2 and recompile PHP to use that version instead, the opcode cachers work fine as they should.

I haven't been able to find a reproducible test case, but I assume this comes from a change in Apache 2.4.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-06 08:22 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2012-06-06 08:22 UTC] rasmus@php.net
I don't see why the Apache version would affect APC. You will have to provide 
more details on this one.
 [2012-06-06 11:03 UTC] info at jandegrootict dot nl
-Status: Feedback +Status: Open
 [2012-06-06 11:03 UTC] info at jandegrootict dot nl
As we're talking about mod_php, changing the Apache version can give different results. I'll search further to find out if I can get a testcase that reproduces the problem, but so far I haven't found much about this.

Fact is that both APC and Xcache have nearly identical problems (not being able to find include files included with require('./include.php')), and given the fact that APC complains about missing _SERVER, I assume something goes wrong with passing information about the request between apache and mod_php when using Apache 2.4.2.

Note that either module works fine when running with Apache 2.2.22, and that I don't see any notice when disabling APC or Xcache when running with Apache 2.4.2.
 [2012-07-19 21:57 UTC] rasmus@php.net
Is this still a problem with current PHP 5.4.4 and current APC svn-trunk?
 [2012-07-19 21:57 UTC] rasmus@php.net
-Status: Open +Status: Feedback
 [2013-02-18 00:35 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jun 05 22:01:30 2024 UTC