php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38269 fopen wrapper doesn't fail on invalid hostname with curlwrappers enabled
Submitted: 2006-07-31 14:46 UTC Modified: 2006-08-01 13:28 UTC
From: blueshade at wave460 dot net Assigned:
Status: Closed Package: Streams related
PHP Version: 5.1.4 OS: debian sarge on linux 2.4.27
Private report: No CVE-ID: None
 [2006-07-31 14:46 UTC] blueshade at wave460 dot net
Description:
------------
when compiled with "--with-curlwrappers", php 5.1.4 fails to fail an fopen request when you provide it with a uri containing an invalid host name, when recompiled without "--with-curlwrappers", it fails as expected...

this results in php invalidly returing a valid fopen resource even if the remote host is unreachable (e.g. because of a network problem)


Reproduce code:
---------------
<?

$file = fopen('http://non.existent.host', 'rb');

print_r($file);
echo "\n";

?>


Expected result:
----------------
it should display a warning (if enabled) and return "false" in $file

Actual result:
--------------
with "--with-curlwrappers", it returns "Resource id #5" in $file and doesn't warn of an error whatsoever

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-01 13:28 UTC] tony2001@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 09:01:32 2024 UTC