Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ligonsker's avatar

How to debug why app is not working with different application pool on IIS?

Hello, I tried to change the application pool for my app from one to another and then I get an error 500.

But when I check Laravel logs, it's empty. I know the error comes from somewhere on the app level, because when I write phpinfo() at the top of the /public/index.php file, it works. So something in the new Application pool breaks the app, maybe permissions? But I am not sure where, because there's nothing in the logs

0 likes
2 replies
LaryAI's avatar
Level 58

When you switch to a new application pool, it's possible that the user account associated with the new pool doesn't have the necessary permissions to access certain files or directories.

To debug this issue, you can try enabling detailed error messages in IIS. To do this, follow these steps:

  1. Open IIS Manager
  2. Select your website
  3. Click on "Error Pages"
  4. Click on "Edit Feature Settings"
  5. Select "Detailed errors" and click "OK"

This will give you more information about the error that's occurring, which should help you pinpoint the issue.

If you're still having trouble, you can try using Process Monitor to see which files or directories are causing permission errors. To do this, follow these steps:

  1. Download and install Process Monitor from the Microsoft website
  2. Open Process Monitor
  3. Click on the "Filter" icon (looks like a funnel)
  4. Add a filter for "Result" "is" "ACCESS DENIED"
  5. Reproduce the error in your application
  6. Look for any entries in Process Monitor that match the filter criteria
  7. Check the "Path" column to see which file or directory is causing the permission error

Once you've identified the file or directory causing the issue, you can adjust the permissions accordingly.

If you're still having trouble, you can try enabling Laravel's debug mode by setting the APP_DEBUG environment variable to true in your .env file. This should give you more information about the error in Laravel's logs.

APP_DEBUG=true
1 like
Ligonsker's avatar

Update: that's funny, there were no logs, because the issue was that there were not enough permissions for the user to write to the logs file šŸ˜‚

Please or to participate in this conversation.