Re: CAUTION: call_user_function side-effects...

From: Date: Thu, 07 Oct 1999 13:05:05 +0000
Subject: Re: CAUTION: call_user_function side-effects...
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-5282@lists.php.net to get a copy of this message
That does make sense, although I'm not sure how you create the parameters within the XML module. Andi At 02:30 PM 10/7/99 +0200, Thies C. Arntzen wrote:
i just found/fixed the problem! see latest diff of xml.c problem is that after call_user_func one should *not* _dtor the parameters without checking their refcount first! i think this might be a prioblem with any all to call_user_func in the php4 sources! tc On Wed, 29 Sep 1999, Andi Gutmans wrote: We don't have XML compiled in here so it's a bit hard for us to debug. A little bugglet we did notice is in xml_set_handler() you access (*data)->value.str.len before you do convert_to_string_ex(). So if it wasn't a string you would die there. This obviously has nothing to do with your problem though :) Andi At 07:35 PM 9/29/99 +0200, Thies C. Arntzen wrote:
andi, zeev, i've verified the stuff below with the current CVS and the problem is still there - i don't think (could be wrong) that the problem is in the xml-module if you have some time (i know you don't), please have a look at it. thanx, tc
Thies C. Arntzen                 "One Big-Mac, Small Fries and a Coke!"
Digital Collections             Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93                              20097 Hamburg / Germany
---------- Forwarded message ---------- Date: Tue, 28 Sep 1999 20:04:39 +0200 From: Stefano Bagnara <bago@datasail.net> To: Jade Meskill <jmeskill@libertydistribution.com>,
     Php4beta <php4beta@lists.php.net>
Subject: Re: [PHP4BETA] XML-RPC not working... Same problem for me: check this code: this code give illegal offset type : uncommenting the commented out line (with the "$tgname") it worx with php4 too.. so.. check your code for the tagname variable e put it into quotes. this should solve your problem. <? $level = 0; $tagname = array(); function XMLFstart($parser, $tgname, $attrs) { $GLOBALS['level']++; $GLOBALS['tagname'][$GLOBALS['level']] = $tgname; # $GLOBALS['tagname'][$GLOBALS['level']] = "$tgname"; print('&lt;'.$GLOBALS['tagname'][$GLOBALS['level']].'&gt;'); } function XMLFend($parser, $tgname) { $GLOBALS['level']--; print('&lt;/'.$GLOBALS['tagname'][$GLOBALS['level']].'&gt;'); } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "XMLFstart", "XMLFend"); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_parse($xml_parser, '<A><B></B></A>'); xml_parser_free($xml_parser); ?> ----- Original Message ----- From: Jade Meskill <jmeskill@libertydistribution.com> To: Php4beta <php4beta@lists.php.net> Sent: Tuesday, September 28, 1999 6:46 PM Subject: [PHP4BETA] XML-RPC not working...
I am trying to test XML-RPC and I was wondering if anyone else out
there
is
having the same problem I am having... PHP from latest CVS
compiles just
fine, (even with the new Zend patches) but I am getting these
errors when
I
try to exectute anything using the xmlrpc.inc file... from apache error_log [Tue Sep 28 09:37:13 1999] Script: '/home/httpd/html/test/server.php' --------------------------------------- SAPI.c(197) : Block 0x080E8980 status: Beginning: Overrun (magic=0x2ABF8890, expected=0x7312F8DC)
      End: Unknown
--------------------------------------- zend_hash.c(100) : Freeing 0x080F5268 (20 bytes), script=/home/httpd/html/test/server.php Last leak repeated 1 time zend_API.c(192) : Freeing 0x080F5208 (44 bytes), script=/home/httpd/html/test/server.php Last leak repeated 1 time *Note* I was recieving this error before the patches to Zend (just to
avoid
confusion)... Here is what PHP is telling me... Warning: Illegal offset type in xmlrpc.inc on line 353 Warning: Illegal offset type in xmlrpc.inc on line 355 Warning: Illegal offset type in xmlrpc.inc on line 356 Warning: Illegal offset type in xmlrpc.inc on line 357 Warning: Illegal offset type in xmlrpc.inc on line 358 Warning: Illegal offset type in xmlrpc.inc on line 371 and so on and so forth... here is some of the offending code... $_xh=array(); function parseResponse($data="") { global $_xh,$xmlrpcerr,$xmlrpcstr; global $xmlrpc_defencoding; $parser = xml_parser_create($xmlrpc_defencoding); $_xh[$parser]=array(); $_xh[$parser]['st']=""; $_xh[$parser]['cm']=0; $_xh[$parser]['isf']=0; $_xh[$parser]['ac']=""; xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($parser, "xmlrpc_se", "xmlrpc_ee"); xml_set_character_data_handler($parser, "xmlrpc_cd"); xml_set_default_handler($parser, "xmlrpc_dh"); $xmlrpc_value=new xmlrpcval; Is XML-RPC doing something that is now illegal, or is there a
problem with
XML or the SAPI.c file? Thanks in advance. Jade Meskill Software Developer Liberty Distribution Company Email : jmeskill@libertydistribution.com -- PHP 4 Beta
-- PHP 4 Beta -- PHP 4 Beta
--- Andi Gutmans <andi@zend.com> http://www.zend.com/
Thies C. Arntzen                 "One Big-Mac, Small Fries and a Coke!"
Digital Collections             Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93                              20097 Hamburg / Germany
--- Andi Gutmans <andi@zend.com> http://www.zend.com/

« previous php.version4 (#5282) next »