#31628 [NEW]: fopen with URL fails when page requires authentication

From: Date: Thu, 20 Jan 2005 19:46:56 +0000
Subject: #31628 [NEW]: fopen with URL fails when page requires authentication
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-72538@lists.php.net to get a copy of this message
From: bbockholt at yahoo dot com Operating system: Linux PHP version: Irrelevant PHP Bug Type: URL related Bug description: fopen with URL fails when page requires authentication Description: ------------ If fopen on a URL returns a warning that says it succeeded, but the handle is bad, perhaps the URL requires authentication? Seems self-evident, but, you know...it stumped me for a bit. This is not a bug, but wasn't mentioned in the documentation or anywhere I looked. Reproduce code: --------------- fopen('http://www.somedom.com/auth/reqd.php', 'r'); Expected result: ---------------- The page content. Actual result: -------------- Warning: file("http://www.somedom.com/auth/reqd.php") - Success in /var/www/html/test/reqd.php on line 2 -- Edit bug report at http://bugs.php.net/?id=31628&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31628&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31628&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31628&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31628&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31628&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31628&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31628&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31628&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31628&r=support Expected behavior: http://bugs.php.net/fix.php?id=31628&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31628&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31628&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31628&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31628&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31628&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31628&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31628&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31628&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31628&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31628&r=mysqlcfg

« previous php.bugs (#72538) next »