Solved

iis7 want php to display errors

Posted on 2014-01-18
7
540 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 110

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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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 110

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

751 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