6

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.

My phpinfo() shows: Windows Server 2003, PHP 5.3.6, log_errors = On, error_log = C:\\errorphp.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).

I have:

  1. restarted IIS after every php.ini change
  2. granted the IUSR_XXXXX User Modify permissions on the folder AND the file
  3. tried leaving the directory blank and letting PHP create the file
  4. had a headache.

Any help is much appreciated.

references:

2 Answers 2

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)

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

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

Go figure.

Sign up to request clarification or add additional context in comments.

4 Comments

this doesn't seem like a good solution to me anyway. On an error test page my server now returns 500 (Internal Server Error).
marquito, you should set your fastcgi settings error reporting to "IgnoreAndReturn200" which would let the PHP handle the error.
@marquito, How did you manage to find out that it is due to fastcgi.logging = 1?
man... that was 3 years ago. As long as I can remember correctly, I know that because I was changing configs one by one to see what was effective.
0

Have you

  • checked your error_reporting level
  • tried setting a log file inside the document root (incl. permission to write) to see if any restrictions apply?

2 Comments

have not tried that, but I have tried something else, which was to set fastcgi.logging = 1. And it just worked. I wasn't aware I'd have to change this in order to have the logging working.
but thanks, Müller. My solution ain't good, though, as it makes the server return an HTTP 500 (Internal Server Error) now instead of a blank page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.