ID: 38826 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Streams related Operating System: WinXP PHP Version: 5.1.6 New Comment:
Errr... I am not sure how seriously to take the response "[14 Sep 11:51am UTC] [EMAIL PROTECTED]", but here goes: 1. The reproduce code is: <?php echo file_get_contents('http://localhost/MyService/AddressBook/info.xsd'); ?> 2. I do not know how to supply a test script that does not rely on external resources since this problem occurs reading a URL and almost by definition a URL is an external resource. Previous Comments: ------------------------------------------------------------------------ [2006-09-14 11:51:33] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with <?php and ends with ?>, is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. ------------------------------------------------------------------------ [2006-09-14 11:47:43] [EMAIL PROTECTED] Description: ------------ I am using file_get_contents with a URL. If the file I want to get is 255 bytes I get it fine. If it is 256 bytes or more, up to some upper limit which is somewhere around 3.5K, I get an empty string. Although I have only illustrated it with file_get_contents(), from the circumstances in which I first noticed odd behaviour I think it also applies generally to files opened with fopen(). Incidentally, the right number of bytes are coming from the web server, as the apache access log shows it is delivering 256 bytes: 127.0.0.1 - - [14/Sep/2006:12:34:37 +0100] "GET /MyService/AddressBook/info.xsd HTTP/1.0" 200 256 Reproduce code: --------------- echo file_get_contents('http://localhost/MyService/AddressBook/info.xsd'); where the target file info.xsd is 256 bytes long Expected result: ---------------- the contents of the file Actual result: -------------- nothing - empty string ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38826&edit=1