|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41983 Error Fetching http headers
Submitted: 2007-07-12 20:56 UTC Modified: 2017-03-31 14:03 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: ipso at snappymail dot ca Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.2.3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 - 3 = ?
Subscribe to this entry?
Further comment on this bug is unnecessary.
 [2007-07-12 20:56 UTC] ipso at snappymail dot ca
I'm trying to use a SOAP API on an embedded device, the device is responding to the SOAP request, however PHP is saying there is an error fetching headers.

Reproduce code:
SOAP Request:
POST /iWsService HTTP/1.1
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.3
Content-Type: text/xml; charset=utf-8
SOAPAction: "uri:zksoftware#GetDate"
Content-Length: 494
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:ns1="uri:zksoftware" xmlns:xsd="" xmlns:xsi="" xmlns:SOAP-ENC="" SOAP-ENV:encodingStyle=""><SOAP-ENV:Body><ns1:GetDate><ArgComKey xsi:type="xsd:string">0</ArgComKey></ns1:GetDate></SOAP-ENV:Body></SOAP-ENV:Envelope>

Response from SOAP Server:
HTTP/1.0 200 OK
Server: ZK Web Server
Pragma: no-cache
Cache-control: no-cache
Content-Type: text/xml
Connection: close

<?xml version="1.0" encoding="iso8859-1" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="">
<Row Date='2006-06-24' Time='14:24:11'></Row>

However PHP returns: [faultstring] => Error Fetching http headers

Expected result:
Expect PHP to parse the SOAP response properly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-13 08:06 UTC] arrakami at gmail dot com
I have the same problem and i would like to give some feedback too. But i can't find a way to capture the HTTP response. Any suggestions how i could do that? The soap server is 3rd party.
 [2007-07-13 08:34 UTC]
It seems like some kind of incompatibility between ext/soap and your soap or HTTP server. To fix the problem I need capture of HTTP response in binary form (including all special chars). Or give me a real PHP code that access buggy SOAP server so I'll able to reproduce it myself.
 [2007-07-13 15:40 UTC] ipso at snappymail dot ca
I emailed a TCP dump of the SOAP request/response to:
 [2007-07-19 16:27 UTC] ipso at snappymail dot ca
Just wanted to follow-up and make sure you got the email okay and have all the data you need to help track down the issue?

Thanks for looking into this.
 [2007-07-21 17:20 UTC] ipso at snappymail dot ca
I had someone look into this for me, apparently the device isn't sending the "\r\n" at the end of the header, but only "\n". 

So instead of:
if (strcmp(headerbuf, "\r\n") == 0) {

if (strcmp(headerbuf, "\r\n") == 0 || strcmp(headerbuf, "\n") == 0) {
 [2007-07-21 17:22 UTC] ipso at snappymail dot ca
Sorry, here is the file and line that needs changing:

 [2007-07-24 09:28 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2017-03-31 13:51 UTC] maarten dot segers at amplexor dot com
How has this been resolved? We still experience the "Error Fetching http headers" error using SoapClient.
 [2017-03-31 13:53 UTC] spam2 at rhsoft dot net
> How has this been resolved? 
> We still experience the "Error Fetching http headers" 
> error using SoapClient

PHP Version: 5.2.3

how about stop re-open *10 years* old bugreports at least without mentioning you PHP version and if it's below 7.0.0 you won't get any change
 [2017-03-31 14:02 UTC] maarten dot segers at amplexor dot com
PHP 7.0.15-1~dotdeb+8.1

There's a ton of blog posts out there on "Error Fetching http headers" with SoapClient but after ten years the only ticket fixing this cryptic message doesn't explain how.
 [2017-03-31 14:03 UTC]
-Block user comment: No +Block user comment: Yes
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 13:01:29 2024 UTC