|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: blueshade at wave460 dot net
New email:
PHP Version: OS:


 [2006-07-31 14:46 UTC] blueshade at wave460 dot net
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('', 'rb');

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


Add a Patch

Pull Requests

Add a Pull Request


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

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 16:01:28 2024 UTC