From: heyjohnlim at yahoo dot com Operating system: Windows 2000 PHP version: 4.3.1 PHP Bug Type: Scripting Engine problem Bug description: Stack overflow with IIS, ISAPI
Hello, I am testing some complicated scripts that use many classes and objects and that connects to mysql. The scripts work fine on Windows with IIS CGI and on Linux with Apache 1.3. However it crashes with IIS, ISAPI with PHP has encountered a Stack Overflow Tracing the code, it appears to crash in two different places in two different scripts. The crashes are consistently reproducible. (1) Once while including a file(!) and (2) When the script calls an object's method (the method is never executed, so it is during the method invocation). There is some faint connection between the two crashes. The key code is a factory class that creates an object that looks something like this, and is where the first crash occurs: function GetEditor() { static $editor; if (empty($editor)) { include_once('editor.inc.php'); ## crashes here $editor = new editor(); } return $editor; } The second crash occurs when calling the editor object returned by GetEditor(). $editor->Render(); ## crashes here... One suspicion was perhaps some extension was not thread-safe. I then removed all extensions from my php.ini and restarted IIS. Only the pre-compiled extensions from the standard PHP Windows distribution such as mysql were installed, and also Zend Optimizer. It still crashed. Because i suspected the problem might be mysql, so i switched to querying mssql instead. The problem still occurs at the same places. It is difficult for me to create a simple script to reproduce the problem, because the bug only happens in my very complicated script. - John Lim -- Edit bug report at http://bugs.php.net/?id=22950&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=22950&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=22950&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=22950&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=22950&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=22950&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=22950&r=support Expected behavior: http://bugs.php.net/fix.php?id=22950&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=22950&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=22950&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=22950&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22950&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=22950&r=dst IIS Stability: http://bugs.php.net/fix.php?id=22950&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=22950&r=gnused