From: grangeway at blueyonder dot co dot uk Operating system: Windows PHP version: 5.0.3 PHP Bug Type: XMLRPC-EPI related Bug description: Xmlrpc 'infinite loop' issue in php5 for windows only
Description: ------------ The following code works fine in php 4.x for windows, appears to work fine in 4.x/5.x under linux, but in the distributed windows binarys, and also my own compilation, results in an infinite loop, in what appears to be xmlParseChunk. This issue only seems to occur if the xml header i.e. <?xml version='1.0'?> is not included in the response, and it's the windows build. Reproduce code: --------------- $foo = "<methodResponse> <params> <param> <value><string>Welcome</string></value> </param> </params> </methodResponse>"; var_dump($foo); var_dump(xmlrpc_decode($foo)); Expected result: ---------------- Result under freebsd: > php/bin/php test.php Content-type: text/html X-Powered-By: PHP/5.0.4-dev string(110) "<methodResponse> <params> <param> <value><string>Welcome</string></value> </param> </params> </methodResponse>" string(7) "Welcome" Actual result: -------------- inifinite loop: char * data=0x00a40528 is "<x></x>" php5ts_debug.dll!_xmlParseDocument() + 0x5c5 C php5ts_debug.dll!_xmlParseChunk() + 0xe5 C > php5ts_debug.dll!php_XML_Parse(_XML_Parser * parser=0x00a3f060, const unsigned char * data=0x00a40528, int data_len=7, int is_final=1) Line 481 + 0x18 C php5ts_debug.dll!xml_elem_parse_buf(const char * in_buf=0x00a40528, int len=7, _xml_input_options * options=0x0012f298, _xml_elem_error * error=0x0012f18c) Line 699 + 0x16 C php5ts_debug.dll!XMLRPC_REQUEST_FromXML(const char * in_buf=0x00a40528, int len=7, _xmlrpc_request_input_options * in_options=0x0012f298) Line 762 + 0x1c C php5ts_debug.dll!decode_request_worker(_zval_struct * xml_in=0x00a40440, _zval_struct * encoding_in=0x00000000, _zval_struct * method_name_out=0x00000000) Line 713 + 0x16 C php5ts_debug.dll!zif_xmlrpc_decode(int ht=1, _zval_struct * return_value=0x00a3f018, _zval_struct * this_ptr=0x00000000, int return_value_used=1, void * * * tsrm_ls=0x00912910) Line 778 + 0x31 C -- Edit bug report at http://bugs.php.net/?id=31989&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31989&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31989&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31989&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31989&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31989&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31989&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31989&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31989&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31989&r=support Expected behavior: http://bugs.php.net/fix.php?id=31989&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31989&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31989&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31989&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31989&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31989&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31989&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31989&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31989&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31989&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31989&r=mysqlcfg