|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 01:00:02 2025 UTC |
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.