Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
1  
And remember googlers -- IUSR not II_IUSR :) –  Userpassword Aug 15 '12 at 15:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.