From: [EMAIL PROTECTED] Operating system: Apache on RedHat Linux PHP version: 4.2.3 PHP Bug Type: *General Issues Bug description: fopen on no existing files generates unexpected output.
I planned to use the following function testing for a flag file 'offline_message.txt' to disable my application and contain an offline message. function isOffLine() { global $OffLineMessage; $OffLineMessage = "" ; $OffLineFilename = "offline_message.txt" ; if (!($fp = fopen($OffLineFilename, "r"))) { return false; } else { $OffLineMessage = file( $OffLineFilename ) ; return true; } } However bothe the fopen & file functions generates an unexpected and unwanted warning messages to the output stream. Warning: fopen("offline_message.txt", "r") - No such file or directory in /var/www/html/webmail/common.php on line 104 Warning: file("offline_message.txt") - No such file or directory in /var/www/html/webmail/common.php on line 105 -- Edit bug report at http://bugs.php.net/?id=21618&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21618&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21618&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21618&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21618&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21618&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21618&r=support Expected behavior: http://bugs.php.net/fix.php?id=21618&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21618&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21618&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21618&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21618&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21618&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21618&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21618&r=gnused