ext/xml handlers currently broken?

php.internals

Jan Schneider

23 years ago
Hi! It looks like the xml_set_*_handler() functions are currently broken. Code that works perfectly with the PHP_4_3 branch fails with HEAD and produces messages like: Warning: xml_parse(): Unable to call handler startElement() in ... The affected code is nothing special: xml_parse($this->_parser, $this->_buffer, true); For any reason this call: result = call_user_function(EG(function_table), &parser->object, handler, retval, argc, argv TSRMLS_CC); in xml.c/xml_call_handler fails. Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Chris Vandomelen

23 years ago
> Hi! > > It looks like the xml_set_*_handler() functions are currently broken. > Code that works perfectly with the PHP_4_3 branch fails with HEAD and > produces messages like: > > Warning: xml_parse(): Unable to call handler startElement() in ... >
<snip> Will the attached patch fix the problem? It seems to be the appropriate fix, since all that appears to be wrong is the usage of the global function table instead of the object's function table. (I'd test it, but I've made my share of changes to ZE2 that are doubtful at best to be committed anyway...) Chris

Chris Vandomelen

23 years ago
> > Hi! > > > > It looks like the xml_set_*_handler() functions are currently broken. > > Code that works perfectly with the PHP_4_3 branch fails with HEAD and > > produces messages like: > > > > Warning: xml_parse(): Unable to call handler startElement() in ... > > > <snip> > > Will the attached patch fix the problem? It seems to be the appropriate > fix, since all that appears to be wrong is the usage of the global > function table instead of the object's function table. >
<snip> Never mind the first patch, try this one instead. (Forgot a '&' in the code, whee.) Chris

Jan Schneider

23 years ago
Quoting Chris Vandomelen <chrisv@revhosting.com>:
> > > Hi! > > > > > > It looks like the xml_set_*_handler() functions are currently broken. > > > Code that works perfectly with the PHP_4_3 branch fails with HEAD and > > > produces messages like: > > > > > > Warning: xml_parse(): Unable to call handler startElement() in ... > > > > > <snip> > > > > Will the attached patch fix the problem? It seems to be the appropriate > > fix, since all that appears to be wrong is the usage of the global > > function table instead of the object's function table. > > > <snip> > > Never mind the first patch, try this one instead. (Forgot a '&' in the > code, whee.)
It still doesn't work. Now the server even segfaults. Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Jan Schneider

23 years ago
Quoting Jan Schneider <jan@horde.org>:
> Quoting Chris Vandomelen <chrisv@revhosting.com>: > > > > > Hi! > > > > > > > > It looks like the xml_set_*_handler() functions are currently > broken. > > > > Code that works perfectly with the PHP_4_3 branch fails with HEAD > and > > > > produces messages like: > > > > > > > > Warning: xml_parse(): Unable to call handler startElement() in ... > > > > > > > <snip> > > > > > > Will the attached patch fix the problem? It seems to be the > appropriate > > > fix, since all that appears to be wrong is the usage of the global > > > function table instead of the object's function table. > > > > > <snip> > > > > Never mind the first patch, try this one instead. (Forgot a '&' in the > > code, whee.) > > It still doesn't work. Now the server even segfaults.
Is anybody still looking at this, or is this (not so important) extension unmaintained atm? Jan.
-- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

Chris Vandomelen

23 years ago
> Is anybody still looking at this, or is this (not so important) extension > unmaintained atm?
I find it to be relatively important (it's lightweight, if I want to build something on top of it (say, DOM1), I can do so, and if I just want to be told what's in the document, I can do that too. Granted, I've also taken the time to build a DOM1 interface entirely in PHP (so I'm slightly biased), and an XML-RPC engine around that.).. but in any case, it seems to be working correctly. chrisv@win2k: /usr/src/php5 $ sapi/cli/php -v PHP 5.0.0-dev (cli) (built: Apr 16 2003 10:49:35) Copyright (c) 1997-2003 The PHP Group Zend Engine v2.0.0-dev, Copyright (c) 1998-2003 Zend Technologies Chris