#36255 [NEW]: fopen() does not work with batch files
| From: | tecklord at argocom dot cv dot ua | Date: | Thu, 02 Feb 2006 01:58:49 +0000 |
| Subject: | #36255 [NEW]: fopen() does not work with batch files | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-92809@lists.php.net to get a copy of this message | ||
From: tecklord at argocom dot cv dot ua
Operating system: Windows
PHP version: 4.4.2
PHP Bug Type: URL related
Bug description: fopen() does not work with batch files
Description:
------------
There is a problem in use of fopen() function in a batch file when
requesting remote URI. It`s impossible to fetch any data via HTTP even if
allow_url_fopen is set to On in php.ini. With local files fopen() seems to
work correctly. Ex.
C:\PHP\php.exe -c "F:\php.ini" -f "F:\test.php"
C:\PHP>php.exe -v
PHP 4.4.2 (cgi-fcgi) (built: Jan 13 2006 13:53:43)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
the same code works correctly with
F:\backup_php>php.exe -v
PHP 4.4.0 (cgi-fcgi) (built: Jul 11 2005 16:13:04)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
Reproduce code:
---------------
$url = "http://www.google.com";
$fp = fopen($url, 'r');
if ($fp):
echo "yes";
fclose($fp);
else:
echo "No";
endif;
Expected result:
----------------
"Yes" on the screen :)
Actual result:
--------------
There is no output at all, even with error_reporting = E_ALL in php.ini
--
Edit bug report at http://bugs.php.net/?id=36255&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36255&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36255&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36255&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36255&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36255&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36255&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36255&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36255&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36255&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36255&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36255&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36255&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36255&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36255&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36255&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36255&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36255&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36255&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36255&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36255&r=mysqlcfg