ID: 6175
Updated by: cardinal
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *XML functions
Operating system:
PHP Version: 4.0 Latest CVS (02/04/2001)
Assigned To:
Comments:
It looks like the segfault has been fixed in CVS, can you check this on your end?
Instead of a segfault though, I'm getting errors for each attempted event handler
call:
Warning: Unable to call handler startElement() in bug.php on line 26
Warning: Unable to call handler endElement() in bug.php on line 26
and so on. If I move this block from the constructor to another method, it works.
$this->parser = xml_parser_create();
xml_set_object($this->parser, &$this);
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($this->parser, "startElement", "endElement");
xml_set_character_data_handler($this->parser, "defaultHandler");
Previous Comments:
---------------------------------------------------------------------------
[2001-04-02 23:47:51] [EMAIL PROTECTED]
Yes. If these lines are used in an object's constructor:
$this->parser = xml_parser_create();
xml_set_object($this->parser, $this);
xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, true);
xml_set_element_handler($this->parser, 'startElement', 'endElement');
xml_set_character_data_handler($this->parser, 'defaultHandler');
... Apache will segfault with the following backtrace:
#0 0x3 in ?? ()
#1 0x281e2391 in call_user_function_ex (function_table=0x80b9280,
object_pp=0x80ffcc0, function_name=0x8148dcc, retval_ptr_ptr=0xbfbfd14c,
param_count=2, params=0x81487ac, no_separation=1, symbol_table=0x0)
at zend_execute_API.c:397
#2 0x281e2111 in call_user_function (function_table=0x80b9280,
object_pp=0x80ffcc0, function_name=0x8148dcc, retval_ptr=0x80d570c,
param_count=2, params=0xbfbfd1e8) at zend_execute_API.c:325
#3 0x2828ad5c in xml_call_handler (parser=0x80ffc8c, handler=0x8148dcc,
argc=2, argv=0xbfbfd1e8) at xml.c:386
#4 0x2828b98d in _xml_characterDataHandler (userData=0x80ffc8c,
s=0xbfbfd257 "n ^-(f
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]