iis7 want php to display errors

Posted on 2014-01-18
Last Modified: 2014-01-19
due to settings on a production iis7 windows server 2008


does not display errors

how to change the iis7 settings to display errors for a development website
Question by:rgb192
  • 3
  • 2
  • 2
LVL 108

Expert Comment

by:Ray Paseur
ID: 39791560
Try these PHP settings:

ini_set('display_errors', TRUE);

If that does not get what you want, contact your hosting provider and ask them to set things up so you can see errors.  You may also want to consider setting up an error log.

Author Comment

ID: 39791570
no support because dedicated server with no control panel, I hid the errors somehow
LVL 58

Expert Comment

ID: 39791588
What exactly are you getting? A blank page or is it ignoring the errors?

You may be interested in

It's probably fixed by

C:\windows\system32\inetsrv>appcmd.exe set config "<your site name>" -section:system.webServer/httpErrors /existingResponse:"PassThrough"
Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.


Author Comment

ID: 39791687
C:\windows\system32\inetsrv>appcmd.exe set config "<your site name>" -section:system.webServer/httpErrors /existingResponse:"PassThrough"  

I can not do the commands. Is there a button I could press in iis7 manager?

On a browser, I see '500 error'
LVL 58

Accepted Solution

Gary earned 250 total points
ID: 39791698
Just make sure you have Show friendly HTTP error disabled, Tools > Internet Options > Advanced and deselect the checkbox.
It maybe as simple as this.
In 'IIS manager' select your site in the left page tree, select Error Pages and click Edit Features and select detailed errors.
And remember the ini_set bit above.
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 39792074
no support because dedicated server with no control panel
That should not matter.  Please go back to this comment.  Copy the two lines of PHP code into a script that looks like this and run it to see what you get.  If you don't see an error message, get professional help with your setup.

ini_set('display_errors', TRUE);
trigger_error('Thud', E_USER_ERROR);

Open in new window


Author Closing Comment

ID: 39793298
detailed errors is what I asked for.
There were alot of 'details' but no relevant information about php error.

Ray's trigger error looked the same before and after 'detailed errors'.  I saw a real php error.

Thanks both.

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now