Quantcast
Viewing all articles
Browse latest Browse all 10

PHP not writing to error log with error_log iunder IIS 7.5

Image may be NSFW.
Clik here to view.
Question

Morning All,

I have a PHP application which writes some custom stuff to the PHP error log via the ‘error_log’ function. I have recently set up this application on a Windows 7 box running IIS 7.5 and the logging is not going to the PHP error log. In fact nothing is going to the log. Can anyone shed any light? Set up is:

  • PHP 5.2.17
  • Using PHP Manager from with IIS.
  • PHP settings: display_errors=On, error_log=’C:Work…php_errors.log’, log_errors=on, error_reporting=E_ALL & !E_DEPRECATED

None of the calls I make to error_log end up in the log file. If I call an incorrect function (to force a real PHP error), it gets reported to the screen, but not to the file. This has all been working fine for years under IIS6.

I have added the following section to the web.config file in my virtual directory:

  • < httpErrors existingResponse=”PassThrough” />

but that didn’t make any difference, even with an IIS restart.

Anyone have any thoughts? I reckon its got to be IIS somehow getting in the way..

Cheers,
Al.

Image may be NSFW.
Clik here to view.
Answer

The problem eventually turned out to be access permissions for the folder where the error log was. I had to give the IUSR user write access to that folder.

Al.


Viewing all articles
Browse latest Browse all 10

Trending Articles