PHP 在错误日志文件中 IIS6.1 加上写权限

这是一个标准服务器 Windows 2008 R2 从 PHP 5.3.6, 努力 IIS 6.1 (部件 7601: 服务包 1)

我的文件中有这些设置 PHP.ini:

error_reporting = E_ALL & ~E_DEPRECATED
log_errors = On
log_errors_max_len = 1024
error_log = C:/inetpub/temp/php_errors.log

也试过:

error_log = C:\inetpub\temp\php_errors.log
error_log = C:\inetpub\wwwroot\php_errors.log
error_log = C:\windows\temp\php_errors.log


phpinfo()

报告上面指出的正确值。

但我仍然无法从脚本中写入日志文件的代码 PHP. 我尝试过这个:

error_log("Database not available!", 0);

甚至这个:

asd();

也许这是权限的问题,因为我也无法写作任何东西 fwrite:

$fp = fopen('MyErrors.txt', 'a'); // this should go into the same directory
// as my script but it, too, is not writing
fwrite($fp, "Error Msg ". $emsg . "\n");
fclose($fp);

我设置了文件夹的权限,其中我编写错误的日志以及我尝试使用此信息录制文件的位置:
http://blog.chrismeller.com/en ... n-iis
但我仍然无法记录 php-errors.log 或者 MyErrors.txt 在我的系统中的任何时间。

有任何想法吗?
已邀请:

知食

赞同来自:

两件事情..

确保

log_errors = On

在你 php.ini

在途中推出引号

"C:\inetpub\temp\php_errors.log"

:)

要回复问题请先登录注册