PHP error_log: will not be written to the specified file

Running PHP under IIS on my Win XP Pro system. I cannot easily debug my scripts because PHP has to write an error log entry. Here are the relevant (I think) php.ini entries:

error_reporting = E_ALL & E_STRICT
display_errors = Off
log_errors = On
error_log = "c: /php5/log/php.log"

I used to have slashes running on Windows / DOS. In any case, he did not write to the php.log file in this directory. The log file is writable in IUSR_SERVERNAME, this directory is writable in IUSR_SERVERNAME, the parent directory is writable in IUSR_SERVERNAME. I'm sure I'm missing something stupid.

Any tips?

+3
source share
1 answer

php?

error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', "c:/php5/log/php.log");

: , ,

var_dump(E_ALL);
var_dump(E_STRICT);
var_dump(E_ALL | E_STRICT);
var_dump(E_ALL & E_STRICT);

: int (6143) int (2048) int (8191) int (0)

,

error_reporting  =  0

. | php.ini, .

+4

Source: https://habr.com/ru/post/1694557/


All Articles