Solved

iis7 want php to display errors

Posted on 2014-01-18
7
536 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 109

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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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 109

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

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.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

813 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

15 Experts available now in Live!

Get 1:1 Help Now