Solved

iis7 want php to display errors

Posted on 2014-01-18
7
539 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 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

OfficeMate Freezes on login or does not load after login credentials are input.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

685 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