#38269 [Opn->Csd]: fopen wrapper doesn't fail on invalid hostname with curlwrappers enabled

From: Date: Tue, 01 Aug 2006 13:28:06 +0000
Subject: #38269 [Opn->Csd]: fopen wrapper doesn't fail on invalid hostname with curlwrappers enabled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100184@lists.php.net to get a copy of this message
ID: 38269 Updated by: tony2001@php.net Reported By: blueshade at wave460 dot net -Status: Open +Status: Closed Bug Type: Streams related Operating System: debian sarge on linux 2.4.27 PHP Version: 5.1.4 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2006-07-31 14:46:08] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38269&edit=1

« previous php.bugs (#100184) next »