Bug #69294 [Fbk->NoF]: function readfile return a 404 file

From: Date: Sun, 05 Apr 2015 04:22:26 +0000
Subject: Bug #69294 [Fbk->NoF]: function readfile return a 404 file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191823@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69294&edit=1 ID: 69294 Updated by: php-bugs@lists.php.net Reported by: apple at ipple dot net Summary: function readfile return a 404 file -Status: Feedback +Status: No Feedback Type: Bug Package: Filesystem function related Operating System: centos6 PHP Version: 5.4.39 Private report: N 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 "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2015-03-25 03:11:09] requinix@php.net 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. Works for me. var_dump(readfile("http://example.com/filename.txt")); Warning: readfile(http://example.com/filename.txt): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in - on line 3 bool(false) Oh, and don't submit bug reports with code that uses error suppression. ------------------------------------------------------------------------ [2015-03-25 02:39:43] apple at ipple dot net Description: ------------ when readfile a remote file does not exist, it return the 404 file. don't return false. PHP 5.4.14 (cli) CentOS Test script: --------------- if(!@readfile("http://example.com/filename.txt")){ dheader("location: http://www.test.com/file/somefile.txt"); } Expected result: ---------------- return false php 5.2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69294&edit=1

« previous php.bugs (#191823) next »