8

I am using an IIS 7.5 on Windows Server 2008 R2 together with PHP 5.5 NTS via FastCGI. Somehow my PHP does not want to log errors to a file. The file never gets created and when I create it manually, PHP does not write into it.

This is my php.ini (verified, that it's the one that gets loaded with phpinfo(); )

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
log_errors = On
error_log = "C:\inetpub\logs\php\php_errors.log"

The specified directory has write access for IIS_IUSRS, IUSR and even the AppPool User (yes I know its redundant, just to make sure). I even turned on display_errors to see if there is an error and it does display the error in my browser but PHP still doesn't want to write an error log.

Edit: [SOLVED]

I was using BasicAuthentication for my website and there the IIS impersonates the user you are logging in with. Therefore I just added my log on user account to the IIS_IUSRS group and now it works.

1 Answer 1

5

Adding this as a solution text so that it no longer appears on the Unanswered questions list. Answer is provided by question author in the edited question above:

Edit: [SOLVED]

I was using BasicAuthentication for my website and there the IIS impersonates the user you are logging in with. Therefore I just added my log on user account to the IIS_IUSRS group and now it works.

1
  • You need an upvote for it to be removed from that list.
    – Pacerier
    Aug 27, 2015 at 17:19

Your Answer

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

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