Re: [PHP4BETA] XML-RPC not working...
| From: | Thies C. Arntzen | Date: | Thu, 07 Oct 1999 12:33:42 +0000 |
| Subject: | Re: [PHP4BETA] XML-RPC not working... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5278@lists.php.net to get a copy of this message | ||
there were a few problems - i *hope* that i just fixed the last one;-))
please try the *LATEST* cvs and report any problems!
tc
On Tue, 28 Sep 1999, Stefano Bagnara wrote:
> 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('<'.$GLOBALS['tagname'][$GLOBALS['level']].'>');
> }
>
> function XMLFend($parser, $tgname) {
> $GLOBALS['level']--;
>
> print('</'.$GLOBALS['tagname'][$GLOBALS['level']].'>');
> }
>
> $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
>
>
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