On Wed, 2004-04-21 at 23:06, Sterling Hughes wrote: > Err, read back in the message. Specifically about "should reset the > generic error handler." If it doesn't reset it, that's a separate > issue.
see the attached patch. it fixes this problem for my test case. Does not completely shutdown the xmlParser between requests, but just fixes the error handling stuff. -Paul Querna
Index: ext/libxml/libxml.c
===================================================================
RCS file: /repository/php-src/ext/libxml/libxml.c,v
retrieving revision 1.16
diff -u -r1.16 libxml.c
--- ext/libxml/libxml.c 1 Mar 2004 12:09:22 -0000 1.16
+++ ext/libxml/libxml.c 22 Apr 2004 05:29:57 -0000
@@ -400,9 +400,6 @@
php_libxml_streams_IO_write,
php_libxml_streams_IO_close);
- /* report errors via handler rather than stderr */
- xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
-
zend_hash_init(&php_libxml_exports, 0, NULL, NULL, 1);
_php_libxml_initialized = 1;
@@ -411,8 +408,6 @@
PHP_LIBXML_API void php_libxml_shutdown() {
if (_php_libxml_initialized) {
- /* reset libxml generic error handling */
- xmlSetGenericErrorFunc(NULL, NULL);
xmlCleanupParser();
zend_hash_destroy(&php_libxml_exports);
_php_libxml_initialized = 0;
@@ -436,7 +431,10 @@
PHP_RINIT_FUNCTION(libxml)
{
- return SUCCESS;
+ /* report errors via handler rather than stderr */
+ xmlSetGenericErrorFunc(NULL, php_libxml_error_handler);
+
+ return SUCCESS;
}
@@ -450,6 +448,8 @@
PHP_RSHUTDOWN_FUNCTION(libxml)
{
+ /* reset libxml generic error handling */
+ xmlSetGenericErrorFunc(NULL, NULL);
smart_str_free(&LIBXML(error_buffer));
return SUCCESS;
}
signature.asc
Description: This is a digitally signed message part
