ID:               22950
 User updated by:  heyjohnlim at yahoo dot com
 Reported By:      heyjohnlim at yahoo dot com
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Windows 2000
 PHP Version:      4.3.1
 New Comment:

>The second crash occurs when calling the editor object
>returned by GetEditor().
>
>$editor->Render(); ## crashes here...

I did a print_r($editor) just before the Render() call and it looked
normal. I also called method_exists($editor,'Render') and it returned
1. So the $editor is still in a sane state just before it crashes.


Previous Comments:
------------------------------------------------------------------------

[2003-03-29 03:24:30] heyjohnlim at yahoo dot com

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 this bug report at http://bugs.php.net/?id=22950&edit=1

Reply via email to