ID: 47649 Updated by: johan...@php.net Reported By: marques at displague dot com -Status: Open +Status: Bogus Bug Type: SOAP related Operating System: linux PHP Version: 5.2.9 New Comment:
Do not file bugs when you have Zend extensions (zend_extension=) loaded. Examples are Zend Optimizer, Zend Debugger, Turck MM Cache, APC, Xdebug and ionCube loader. These extensions often modify engine behavior which is not related to PHP itself. Please report Zend issues to Zend. I have no way of testing Zend Debugger related issues. Previous Comments: ------------------------------------------------------------------------ [2009-03-16 17:04:38] marques at displague dot com Err - that last comment should have said "ZendDebuggerCookie" ------------------------------------------------------------------------ [2009-03-16 16:59:55] marques at displague dot com http://www.zend.com/support/knowledgebase.php?kbid=222 The KB item at the above URL shows that this method of debugging should be possible. In their example they send the client's start_debug, debug_port, debug_host, and debug_stop to the server instance as cookies. In the modern ZendDebugger used with the Eclipse/PDT, all but debug_stop (original_url, debug_port, start_debug, debug_start_session, debug_no_cache, debug_host, debug_session_id, send_sess_end) are sent on the query string (not as cookies). The only cookie sent is "ZendDebugger". In my example I copied all the client's request variables and the ZendDebugger cookie to the server instance. I believe this functionality has changed or broken since the time this Zend Knowledge Base article was written. ------------------------------------------------------------------------ [2009-03-13 16:04:48] marques at displague dot com Another interesting point about this example is that the client context specifies http header "Accept-Encoding:". The soap client ignores that and sends "Accept-Encoding: deflate, gzip". ------------------------------------------------------------------------ [2009-03-13 15:50:46] marques at displague dot com Description: ------------ In an attempt to supply a SoapServer the same ZendDebugger REQUEST and COOKIE variables used while debugging the client, the server responds inconsistently. Sometimes the server responds with a Content-size of 0 and other times a header isn't even returned. Reproduce code: --------------- http://pastebin.com/f2da44cb2 Expected result: ---------------- When the ZendDebugger cookie is omitted the soap service consistently returns the expected value. The same value should be returned when the ZendDebugger cookie is present. Additionally, debug and tracing options should be available to the ZendDebugger session. Response Array ( [name] => Me ) Soap Transaction Client POST //soapdebug.php?s=1 HTTP/1.1 Host: localhost Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.8 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://test-uri/#getAuthor" Content-Length: 385 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope> Server HTTP/1.1 200 OK Date: Fri, 13 Mar 2009 15:47:08 GMT Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8 X-Powered-By: PHP/5.2.8 Vary: Accept-Encoding Content-Length: 638 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://xml.apache.org/xml-soap" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthorResponse><return xsi:type="ns2:Map"><item><key xsi:type="xsd:string">name</key><value xsi:type="xsd:string">Me</value></item></return></ns1:getAuthorResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> Actual result: -------------- The SOAP service returns nothing (not even headers) or returns no document body but does return headers that include "Content-length: 0" Response Soap Transaction Client POST //soapdebug.php?s=1 HTTP/1.1 Host: localhost Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.8 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://test-uri/#getAuthor" Content-Length: 385 Cookie: ZendDebuggerCookie=192.168.61.32:10000:0||004|77742D65|1152; <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope> Server HTTP/1.1 200 OK Date: Fri, 13 Mar 2009 15:45:00 GMT Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8 X-Powered-By: PHP/5.2.8 Vary: Accept-Encoding Content-Length: 0 Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Content-Type: text/html Here is the result on an occurrence with no headers: SoapFault Error Fetching http headers #0 [internal function]: SoapClient->__doRequest('__call('getAuthor', Array) #2 /srv/www/test/html/soapdebug.php(57): SoapClient->getAuthor() #3 {main} Client POST //soapdebug.php?s=1 HTTP/1.1 Host: localhost Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.8 Content-Type: text/xml; charset=utf-8 SOAPAction: "http://test-uri/#getAuthor" Content-Length: 385 Cookie: ZendDebuggerCookie=192.168.61.32:10000:0||004|77742D65|1154; <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://test-uri/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope> Server ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47649&edit=1