0

I've been given a Laravel 3.2 app that is working on production to move over to an IIS 7.5 server. I've set the production php.ini so that it works with 5.4.37 and can't get past a 500 error so that I can troubleshoot what needs to be done to get it to run.

Setting display_errors on display-startup_errors = on and the MSIE to turn off friendly warnings on the server I finally get some feedback:

 file_put_contents(C:\inetpub\wwwroot\HMarketing\storage\logs/2015-03-03.log): failed to open stream: Permission denied

It cannot write a log to larvel's log file. OK, googling I find that IIS uses a IIUSR role that should be given read writes.

I dig into Authentication for anonymous users and find it is set to "IUSR". That seems different than the MS help pages suggesting "IIUSR". However, this server is actively serving other production apps and checking other working apps' permissions I find they have the same "IUSR" set so perhaps there is an equivalent to IIUSR?

Being that I'm scrambling, learning IIS I'm at an impasse based on my Googles. What next step should I use to troubleshoot why I cannot get laravel to show its logs?

mcrypt is enabled
mb_string is enabled
sam452
  • 269
  • 1
  • 6
  • 15

2 Answers2

1

This may not be the right way to do this, but within Windows Explorer I got the properties of the storage folder, security tab and disabled the "inherit permissions". I then ADDED to the IUSR(site) user the ability to write to the folder. I hope this isn't a bad thing but it at least got me past this error. I would be happy if someone more knowledgeable than me pointed out the safest way to get past this error.

sam452
  • 269
  • 1
  • 6
  • 15
  • It din't work to me. After that change, IIS can't see logs directory inside of storage directory. – manuelpgs Aug 22 '19 at 19:10
  • For me these trick worked: I deleted the file storage/logs/laravel.log, then I left the system created it again after accessing the web app. – manuelpgs Aug 22 '19 at 19:25
0

For us the problem went away when we used the .\IIS_IUSRS group instead of the IUSR. Strangely the IUSR had worked before.

Martin
  • 101
  • 2