KL21 Posted May 29, 2005 Share Posted May 29, 2005 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! Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted May 29, 2005 Share Posted May 29, 2005 Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.) php_flag display_errors on php_value error_reporting 7 Quote Link to comment Share on other sites More sharing options...
TweezerMan Posted May 29, 2005 Share Posted May 29, 2005 Welcome to the forums, KL21! Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted May 29, 2005 Share Posted May 29, 2005 Welcome to the forums, KL21 Quote Link to comment Share on other sites More sharing options...
borfast Posted May 29, 2005 Share Posted May 29, 2005 Welcome to the forums, KL21. Another way to get the error messages to display in the resulting page is to use the error_reporting() function. Quote Link to comment Share on other sites More sharing options...
KL21 Posted May 29, 2005 Author Share Posted May 29, 2005 Thanks, the .htaccess file worked. This makes life SO much easier! Quote Link to comment Share on other sites More sharing options...
stevevan Posted May 29, 2005 Share Posted May 29, 2005 Welcome to the forums! See how helpful the family is here? I even learned something on this one! Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted May 29, 2005 Share Posted May 29, 2005 WooooHoooo! Happy to hear you got it working. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted May 30, 2005 Share Posted May 30, 2005 Welcome to the forums, KL21 Quote Link to comment Share on other sites More sharing options...
Deverill Posted May 30, 2005 Share Posted May 30, 2005 Welcome to the forums and your new home, KL21! Quote Link to comment Share on other sites More sharing options...
section31 Posted July 29, 2005 Share Posted July 29, 2005 Add the following commands to your .htaccess file in the folder containing the php script (or create an .htaccess file if none exists.) php_flag display_errors on php_value error_reporting 7 <{POST_SNAPBACK}> Why is it that error_reporting(E_ALL) doesn't report all errors, yet using that .htaccess file does? Quote Link to comment Share on other sites More sharing options...
TweezerMan Posted July 29, 2005 Share Posted July 29, 2005 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. 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. Quote Link to comment Share on other sites More sharing options...
section31 Posted July 30, 2005 Share Posted July 30, 2005 Sounds about right. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.