文件日志错误(PHP + IIS6 + FastCGI + Win2003服务器)

时间:2022-10-28 09:37:24

Though I have read lots of posts and pages concerning the issue (shown below), I guess I'm missing something here. The mais issue is: my PHP errors are not being logged to the file specified nor to the system event log.

虽然我读过很多关于这个问题的文章和页面(如下所示),但我想我在这里漏掉了一些东西。mais问题是:我的PHP错误没有记录到指定的文件或系统事件日志中。

My phpinfo() shows: Windows Server 2003, PHP 5.3.6, log_errors = On, error_log = C:\\errorphp.log

我的phpinfo()显示:Windows Server 2003, PHP 5.3.6, log_errors = On, error_log = C:\ error .log

I have tried both error_log = C:\Inetpub\logs\php.log and error_log = syslog in php.ini to no effect (either one at a time).

我已经尝试了error_log = C:\Inetpub logs\php。在php中,log和error_log = syslog。没有效果(一次一个)。

I have:

我有:

  1. restarted IIS after every php.ini change
  2. 在每个php之后重新启动IIS。ini变化
  3. granted the IUSR_XXXXX User Modify permissions on the folder AND the file
  4. 授予IUSR_XXXXX用户对文件夹和文件的修改权限
  5. tried leaving the directory blank and letting PHP create the file
  6. 尝试将目录留空,并让PHP创建文件
  7. had a headache.
  8. 有一个头痛。

Any help is much appreciated.

非常感谢您的帮助。

references:

引用:

2 个解决方案

#1


3  

In my case, setting

在我的例子中,设置

fastcgi.logging = 1

in php.ini solved the issue and I do have the log file working now (I left the file creation to php itself, my directory was blank)

在php中。ini解决了这个问题,我现在已经让日志文件工作(我将文件创建留给php本身,我的目录为空)

I'd never guess that as the php.ini itself states (right above the stated config)

我永远也猜不到这是php。ini声明(在声明的配置之上)

; Disable logging through FastCGI connection. PHP's default behavior is to enable this feature.

;通过FastCGI连接禁用日志记录。PHP的默认行为是启用这个特性。

Go figure.

图。

#2


0  

Have you

你有

  • checked your error_reporting level
  • 检查你的error_reporting水平
  • tried setting a log file inside the document root (incl. permission to write) to see if any restrictions apply?
  • 尝试在文档根目录中设置一个日志文件(包括写入权限),看看是否适用任何限制?

#1


3  

In my case, setting

在我的例子中,设置

fastcgi.logging = 1

in php.ini solved the issue and I do have the log file working now (I left the file creation to php itself, my directory was blank)

在php中。ini解决了这个问题,我现在已经让日志文件工作(我将文件创建留给php本身,我的目录为空)

I'd never guess that as the php.ini itself states (right above the stated config)

我永远也猜不到这是php。ini声明(在声明的配置之上)

; Disable logging through FastCGI connection. PHP's default behavior is to enable this feature.

;通过FastCGI连接禁用日志记录。PHP的默认行为是启用这个特性。

Go figure.

图。

#2


0  

Have you

你有

  • checked your error_reporting level
  • 检查你的error_reporting水平
  • tried setting a log file inside the document root (incl. permission to write) to see if any restrictions apply?
  • 尝试在文档根目录中设置一个日志文件(包括写入权限),看看是否适用任何限制?