|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-02-17 11:50 UTC] cmb@php.net
[2021-02-17 11:53 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
Description: ------------ If the log file is read only on either Win or Linux error_log() still returns true as a success flag, even thought the log message was never written. It should return false I think if the log is not written. ?? Is this a cgi thing? Don't think so, because my win-7 php is Apache mod-php, and the linux-php is fastcgi. ...A meta bug: an error, in the error_log :-) Thanks. Test script: --------------- <?php // I'm not sure you need all this to demonstrate the problem, but this is what // I have set that might possibly relate to this issue: error_reporting(E_ALL); ini_set('display_errors' ,'On'); ini_set('log_errors' ,'On'); ini_set('error_log' ,'/php_errors.log'); ini_set('display_startup_errors' ,'On'); ini_set('ignore_repeated_errors' ,'Off'); ini_set('ignore_repeated_source' ,'off'); ini_set('log_errors_max_len' ,1024); var_dump(error_log('test')); // When php_errors.log is read only in windows, // or 444 in Linux this returns true but // should return false. What I want is if the // log fails that I can report it elsewhere. Expected result: ---------------- false Actual result: -------------- true