PHP Bugs and Errors
Running Apache + PHP + Accelerators under Windows 2003
Submitted by chris on September 19, 2006 - 20:54I have been getting some instability running Apache with PHP + Accelerators under Windows 2003. I will log my finds in this article. Visit regularly for updates. I ended up running 7 Apaches on a Windows 2003 Server to test all different kinds of configurations. Recently because it was becoming complex, I started logging my finds. This page is probably for the hardcore debugging type...
Mitigating factors:
- Most crash seem to happen because of load (with very low traffic you might
never experience problems).
- My PHP applications are very demanding. Especially Gallery2 which relies on
external libraries for processing images. Again other PHP applications might not
experience these problems.
-If you have issues with IIS, these finding might also be applicable.
auto_globals_jit
Submitted by chris on September 23, 2006 - 13:49APC - superglobals empty once script is cached
Turning "auto_globals_jit" off is a temporary solution
http://pecl.php.net/bugs/bug.php?id=4772
http://www.zend.com/zend/week/week220.php
auto_globals_jit = On
register_globals = Off
register_long_arrays = Off
register_argc_argv = Off
Sample ini files:
http://www.vbulletin.com/forum/showthread.php?t=166310
eAccelerator crash
Submitted by chris on August 16, 2006 - 09:32eAccelerator crash (Updated)
I've created an article to try to track what works and what doesn't: Running Apache + PHP + Accelerators under Windows 2003
After moving a site with some traffic to an Apache 2.2.x server, I have been getting multiple Apache crash per day. Before I was only getting these about once a week. Here is what the error looks like in the Apache error.log:
eAccelerator problem with PHP: Crash under Apache
Submitted by chris on May 22, 2006 - 22:06Once in a while under Apache 2.0.55 or 2.2.2, I
would get a crash with a line like the following in the log:
[7508] EACCELERATOR: PHP crashed on opline 48 of preg_replace() at
G:\DomZeus\sitebuddycom\wwwroot\modules\search.module:354
This mostly likely an eAccelerator bug (not 100% sure).
Meanwhile here is a solution to try to avoid it. Since in my case the error
happens regularly (once a day?) with the file search.module, I decided to tell
eAccelerator to stop trying to cache that file with:
APC problem with Gallery 2
Submitted by chris on May 22, 2006 - 22:16Under Apache 2.2.2 and 2.0.55 using APC (3.0.11-dev) I could not delete an image using Gallery2.
My temporary solution is to disable caching of Gallery2 classes in APC with:
apc.filters="-g2.*\.class"
PHP: @readfile('aURL') creates Apache crash
Submitted by chris on February 15, 2006 - 01:11Running Apache 2.0.55 or 2.2.0 under Windows with PHP 4.4.2 (the latest 4 version), I
get a crash when loading a simple PHP file containing (example file):
<?php
@readfile('http://aDomain/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title');
?>
Calling that same URL directly from a browser works fine.
Testing the same file under the latest CVS version of PHP4 (4.4.3?), it works
fine. So it must be a bug that was corrected.
It appears to be a bug specific to 4.4.2.
My problem here is that eAccelerator does not work on PHP4 past 4.4.2.
Apache: PHP 4 using mod_rewrite getting blank page
Submitted by chris on February 13, 2006 - 17:03Solution: Turned out that if I disable the Apache module "mod_status" it works just fine.
PHP4: php_gettext.dll does not load
Submitted by chris on February 10, 2006 - 18:04The solution under PHP4, for me, was to copy the file iconv.dll from the PHP folder "\Dlls" to my systems path (in my case, the folder containing httpd.exe). If your PHP installation folder is defined in your $PATH (like e:\PHP4) you could copy iconv.dll to e:\PHP4.
