Where Are Php Error Messages?

windows

Guest
I'm writing PHP scripts, uploading them to the TCH server and then executing them online. When I have any sort of PHP error my browser displays a totally blank page, no error messages. Where can I find the PHP error messages? I've tried my error logs and also looking at the source for the web page. But there's nothing there. Any suggestions? Hopefully this is an easy question. Thanks!<!--content-->
Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.)<br /><br />php_flag display_errors on <br />php_value error_reporting 7<!--content-->
Welcome to the forums, KL21! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/thumbup1.gif" style="vertical-align:middle" emoid=":thumbup1:" border="0" alt="thumbup1.gif" /><!--content-->
Welcome to the forums, KL21 <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><!--content-->
Welcome to the forums, KL21.<br /><br />Another way to get the error messages to display in the resulting page is to use the <a href="http://php.net/error_reporting" target="_blank">error_reporting()</a> function.<!--content-->
Thanks, the .htaccess file worked. This makes life SO much easier!<!--content-->
Welcome to the forums! See how helpful the family is here? I even learned something on this one!<!--content-->
WooooHoooo! Happy to hear you got it working.<!--content-->
<img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /> Welcome to the forums, KL21 <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--content-->
Welcome to the forums and your new home, KL21!<!--content-->
<!--QuoteBegin-TCH-Rob+May 29 2005, 01:07 PM--><div class='quotetop'>QUOTE(TCH-Rob @ May 29 2005, 01:07 PM)</div><div class='quotemain'><!--QuoteEBegin-->Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.)<br /><br />php_flag display_errors on <br />php_value error_reporting 7<br /><div align="right"><a href="http://www.totalchoicehosting.com/forums/index.php?act=findpost&pid=132679"><img src='http://www.totalchoicehosting.com/forums/style_images/1/post_snapback.gif' alt='*' border='0' /></a></div><!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />Why is it that error_reporting(E_ALL) doesn't report all errors, yet using that .htaccess file does?<!--content-->
I'm just guessing here, but I think that if the error reporting level is set in your script, and the script has severe errors in it that prevent the script from running, PHP never gets to execute your error_reporting() function so it can tell you what's wrong.<br /><br />When the error reporting level set in the .htaccess file, PHP reads the .htaccess file first before looking at your script and will set the error reporting level even if the PHP script is complete jibberish. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
Sounds about right. Thanks.<!--content-->
 
Back
Top