ID:               38826
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Streams related
 Operating System: WinXP
 PHP Version:      5.1.6
 New Comment:

It's still not PHP problem, even if http:// wrapper works with HTTP/1.0
(which is apparently expected).
I don't think it's worth rewriting a part of streams API because of an
apache/win32 issue..


Previous Comments:
------------------------------------------------------------------------

[2006-09-15 10:23:03] [EMAIL PROTECTED]

Actually, 10 minutes later, I think I was a bit hasty in closing it. It
was when I realised that curl is optional and might not be there, so the
workaround does not come for free. 

What are the chances of getting file_get_contents to send an HTTP/1.1
request instead of HTTP/1.0?

------------------------------------------------------------------------

[2006-09-15 10:12:44] [EMAIL PROTECTED]

Ah that was a good idea of yours, using telnet. I had not thought of
that. That took PHP out of picture and shows that the issue is entirely
to do with Apache:

telnet localhost 80
GET /255as.file HTTP/1.0

gets:

HTTP/1.1 200 OK
Date: Fri, 15 Sep 2006 09:49:02 GMT
Server: Apache/2.0.59 (Win32) PHP/5.1.6
Last-Modified: Thu, 14 Sep 2006 14:17:59 GMT
ETag: "345e9-ff-9324eca6"
Accept-Ranges: bytes
Content-Length: 255
Connection: close
Content-Type: text/plain
X-Pad: avoid browser bug

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa


Connection to host lost.

C:\Documents and Settings\Administrator>

whereas:

telnet localhost 80
GET /256as.file HTTP/1.0

gets:

HTTP/1.1 200 OK
Date: Fri, 15 Sep 2006 09:50:14 GMT
Server: Apache/2.0.59 (Win32) PHP/5.1.6
Last-Modified: Thu, 14 Sep 2006 14:15:35 GMT
ETag: "345ea-100-8a8e1f11"
Accept-Ranges: bytes
Content-Length: 256
Connection: close
Content-Type: text/plain
X-Pad: avoid browser bug



Connection to host lost.

C:\Documents and Settings\Administrator>

This now explains why the results using curl are different - that is
using HTTP/1.1 on its GETs. Likewise Firefox. 

So, sorry to have troubled you, this is purely an Apache bug. The thing
that confused me was the access.log showing the GET as successful. I
will remember for the future how useful telnet is for debugging this. 

I will close this bug and either hunt down an Apache fix or work around
using curl. Thanks for your help.

------------------------------------------------------------------------

[2006-09-14 22:01:15] [EMAIL PROTECTED]

And the URL "http://localhost/256as.file"; does work for you in a
browser and using telnet, right?

------------------------------------------------------------------------

[2006-09-14 21:53:53] [EMAIL PROTECTED]

Yes, the var_dump going to your file remotely does:
string(256) "aaaaaaaaaaaaa......
It is your fle that I copied to make my 256as.file. 

But when I copy your file under my Apache and do file_get_contents to
it I get the empty string. 

So I can only suppose that it is somehow something to do with my local
5.1.6. PHP CLI talking to my local Apache with 5.1.6 underneath, on
WinXP.

------------------------------------------------------------------------

[2006-09-14 17:37:41] [EMAIL PROTECTED]

Does this work for you:
var_dump(file_get_contents("http://tony2001.phpclub.net/dev/tmp/info.xsd";));

?


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/38826

-- 
Edit this bug report at http://bugs.php.net/?id=38826&edit=1

Reply via email to