|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-02-02 02:58 UTC] tecklord at argocom dot cv dot ua
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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
Add error_reporting(E_ALL) and ini_set("display_errors", 1); in the beginning of test.php.