ID: 40985 Comment by: daniel dot menard at bdsp dot tm dot fr Reported By: charlie at lemurconsulting dot com Status: No Feedback Bug Type: Reproducible crash Operating System: Windows XP PHP Version: 5.2.1 New Comment:
Charlie added the code suggested by [EMAIL PROTECTED] to the xapian extension, and it resolves the problems we encountered. The PHP Xapian extension now works nicely with all the php 5.x versions without any crash. Thanks a lot to tony2001 and fmk for the help they provided and for being so fast to answer. Previous Comments: ------------------------------------------------------------------------ [2007-04-11 01:00:01] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2007-04-03 22:06:13] [EMAIL PROTECTED] 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. ------------------------------------------------------------------------ [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