Solved

iis7 want php to display errors

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

php
error_reporting(E_ALL);

does not display errors


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

Expert Comment

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

ini_set('display_errors', TRUE);
error_reporting(E_ALL);

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.
0
 

Author Comment

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

Expert Comment

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

You may be interested in
http://phpmanager.codeplex.com/

It's probably fixed by

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

http://forums.iis.net/t/1172537.aspx
0
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

by:rgb192
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'
0
 
LVL 58

Accepted Solution

by:
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.
0
 
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.

<?php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
trigger_error('Thud', E_USER_ERROR);

Open in new window

0
 

Author Closing Comment

by:rgb192
ID: 39793298
Cathal
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.
0

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