ID:               40985
 Updated by:       [EMAIL PROTECTED]
 Reported By:      charlie at lemurconsulting dot com
 Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Windows XP
 PHP Version:      5.2.1
 New Comment:

This seams to me like a problem outside of PHP. The xapian extension
create module globals but does not do any cleanup. Looks to me like it
can be solved with code like this:

PHP_MSHUTDOWN_FUNCTION(printer)
{
#ifdef ZTS
        ts_free_id(printer_globals_id);
#else
        php_printer_shutdown(&printer_globals TSRMLS_CC);
#endif
        UNREGISTER_INI_ENTRIES();
        return SUCCESS;
}

I have not tested anything, but just remembering the same type of
problem with the printer (and other) exntension in the past.


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

[2007-04-03 18:40:33] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip



------------------------------------------------------------------------

[2007-04-03 15:00:21] daniel dot menard at bdsp dot tm dot fr

The same bug appear with the cgi version.

The only known workaround for now is to patch php_cgi.c in the same
way, removing any call to tsrm_shutdown()

------------------------------------------------------------------------

[2007-04-03 14:00:47] charlie at lemurconsulting dot com

Description:
------------
While trying to make the Xapian (www.xapian.org) PHP bindings work on
Windows using Visual C++, we found that the CLI version of PHP would
crash when unloading the bindings. The bindings are written using SWIG.
PHP appears to be trying to unload resources when the crash occurs. The
crash does not occur on earlier versions of PHP i.e. 4.4.6

Reproduce code:
---------------
The following patch fixes the problem and has been used as a
workaround:
  Patch php_cli.c as follows by commenting out line 1283:
        #ifdef ZTS
        /*    tsrm_shutdown(); */
        #endif

Expected result:
----------------
No crash :)

Actual result:
--------------
n/a


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40985&edit=1

Reply via email to