| Bug #43069 | SoapClient causes 505 HTTP Version not supported error message | ||||
|---|---|---|---|---|---|
| Submitted: | 22 Oct 2007 4:33pm UTC | Modified: | 1 Dec 2008 9:54am UTC | ||
| From: | sebastian dot habeker at roli dot com | Assigned to: | dmitry | ||
| Status: | Closed | Category: | SOAP related | ||
| Version: | 5.2.6 | OS: | Windows 2000 | ||
| Votes: | 17 | Avg. Score: | 4.2 ± 1.1 | Reproduced: | 14 of 14 (100.0%) |
| Same Version: | 8 (57.1%) | Same OS: | 5 (35.7%) | ||
[22 Oct 2007 4:33pm UTC] sebastian dot habeker at roli dot com
[12 Nov 2007 10:15am UTC] tony2001@php.net
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi
[15 Nov 2007 11:44am UTC] sebastian dot habeker at roli dot com
I downloaded http://snaps.php.net/win32/php5.2-win32-installer-latest.msi but still got the same problem. Is there anything else to configure, in the php.ini or as an option in the SoapClient constructor?
[25 Jan 2008 10:56am UTC] rob dot smith at gmx dot de
Same problem here. OS: Windows XP PHP: 5.2.6
[25 Mar 2008 8:49pm UTC] nick dot riggan at gmail dot com
I am having the same exact problem. I am running MSSQL 2005 also and have set up an endpoint. I can load in the browser without issues but not with the SOAP client in PHP. Has anyone solved this?
[31 Oct 2008 6:59am UTC] umerfarooq dot online at gmail dot com
I am using Rest Request/ response mechanism for web services and i am also getting this error.Is there any solution to this besides having to upgrade or change the php version.
[28 Nov 2008 7:27pm UTC] hradtke@php.net
The problem is in soap_xmlParseFile():
old_allow_url_fopen = PG(allow_url_fopen);
PG(allow_url_fopen) = 1;
ctxt = xmlCreateFileParserCtxt(filename);
PG(allow_url_fopen) = old_allow_url_fopen;
The code is trying to take advantage of the php's tcp wrapper
functionality around fopen calls so it can use xmlCreateFileParserCtxt()
with a URL. Unfortunately, the tcp wrapper functionality only supports
HTTP/1.0.
This may fixable by using xmlCreateURLParserCtxt() instead of
xmlCreateFileParserCtxt(). The documentation says it supports files and
URLs (source:
http://www.xmlsoft.org/html/libxml-parserInternals.html#xmlCreateURLPars
erCtxt).
I have no endpoint with which to test against this bug. Someone please
apply the following patch and test it or email me (hermanradtkePLZNOSPAM
at gmail dot com) the URL to an endpoint that only supports HTTP/1.1.
Patch: http://www.hermanradtke.com/php-43069-soap-client-http1_1.patch
[1 Dec 2008 9:54am UTC] dmitry@php.net
Fixed in CVS HEAD and PHP_5_3 (not in PHP_5_2).
Now ext/soap uses HTTP/1.1 by default, but it's possible to switch back
to HTTP/1.0 using stream context
$ctx = stream_context_create(array(
'http'=>array(
'protocol_version'=> 1.0,
)));
$soap = new SoapClient($wsdl,array("stream_context"=>$ctx));
