Link to home
Start Free TrialLog in
Avatar of jmoriarty
jmoriarty

asked on

PHP Error Reporting under IIS 6.0

Hello,

I'm having an issue getting errors to output to the browser with PHP under IIS 6.0 on Windows Server 2003. I've set the php.ini file in the Windows directory by uncommenting:

error_reporting  =  E_ALL
dispaly_errors = On

And I've also tried setting the values at runtime in my scripts with:

ini_set('display_errors', 0)
ERROR_REPORTING(E_ALL);

But I'm unable to throw any errors. I'm basically using an includes statement in a script to a file that doesn't exist, but the script still executes error free; no suppression directives, etc used anywhere.  Thinking it's an IIS thing since I never ran into this under Apache.

Any insight would be greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of AdiF
AdiF

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 jmoriarty
jmoriarty

ASKER

Hi AdiF,

Interestingly, no, the script outputs nothing when an error is present, even if I do something simple like the attached code snippet. If I remove the require statement, the echo output's fine however.  No internal server either though, just a blank, white screen.

PHP is configured as an ISAPI module, and I did restart IIS after each change. I restarted again just now to triple check, same affect.

Double checked phpinfo(); and it is pulling from the C:\Windows .ini, so we're okay there, and startup errors are actually on. display_startup_errors = On

 no errors are logged, either. error_logging = On in .ini, and
error_log = "C:/PHP/logs/err.log" directive set as well.

Strange, eh?

<?php
 
require("filedoesnotexist.php");  
 
// Get the current include path settings from php config file
$path = ini_get('include_path');
echo $path
 
?>

Open in new window

Found the problem - I was completely misreading the phpinfo() output. The loaded config file was actually in another directory. D'oh.

Thanks for the help either way.

...*snickers*  :)  hehehe.  troubleshooting is a pain-- finding out you've overlooked a troubleshooting candidate is even more annoying :P

no problem!