#23706 [Fbk->NoF]: fopen on a http url crashes php process
| From: | sniper@php.net | Date: | Sat, 24 May 2003 06:21:28 +0000 |
| Subject: | #23706 [Fbk->NoF]: fopen on a http url crashes php process | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40336@lists.php.net to get a copy of this message | ||
ID: 23706
Updated by: sniper@php.net
Reported By: rasmus dot watjen at rassie dot dk
-Status: Feedback
+Status: No Feedback
Bug Type: Reproducible crash
Operating System: windows 2000/xp
PHP Version: 4.3.1
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-05-19 17:23:39] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-05-19 16:30:29] rasmus dot watjen at rassie dot dk
Using the Windows 4.3.1 CGI binary under apache 1.3.27 and IIS 5.0, the
fopen function crashes when used with a HTTP URL that 404's and is more
than 30 characters in the path part of the URL. When the path part is
30 or less characters it doesn't seem to crash.
It has done this on two machines running Windows XP with Apache 1.3.27
and one machine running Windows 2000 with IIS5.
The following will crash the apache process handling the php script:
function readDataFromURL($url) {
$fp = @fopen($url, "rb");
if ($fp) {
$data = "";
$buffersize = 1024;
while (!feof($fp)) {
$thisdata = fread($fp, $buffersize);
$data .= $thisdata;
}
return $data;
} else {
return false;
}
}
$url = "http://127.0.0.1/asdfasdfasdfasdfasdfasdfasdfasd";
readDataFromURL($url);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23706&edit=1