Link to home
Start Free TrialLog in
Avatar of superdigitdave
superdigitdaveFlag for United States of America

asked on

No error ouput to page on parse error in PHP (IIS 6)

I have a very basic installation of PHP running on a windows 2003 server runing the latest version of IIS 6.  I followed one of the readily available installation guides and it has been working quite well.  The only problem is that when a parse error occurs the error is not sent to the web browser.  I am assume it is logged somewhere, but that does not do me too much good.  How can I enable error output to the broswer?

On an error the browser window is blank containing only very basic HTML code (must be the default for IIS or something):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

Any thoughts?
ASKER CERTIFIED SOLUTION
Avatar of Diablo84
Diablo84

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Diablo84
Diablo84

by the way if you make changes to you php.ini file you will have to restart IIS for the changes to take effect.
Also, look for code with @ in front ...

<?php

$fp = fopen('I don't exist and will cause an error','r);

?>

will cause an error, but ...

<?php

$fp = @fopen('I don't exist and will cause an error','r);

?>


will not.

Normally, the above line would look like ...

<?php

$fp = @fopen('I don't exist and will cause an error','r) or die('Could not open the non existant file.');

?>


Richard.