KL21 Posted May 29, 2005 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
TCH-Rob Posted May 29, 2005 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
borfast Posted May 29, 2005 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
KL21 Posted May 29, 2005 Author Posted May 29, 2005 Thanks, the .htaccess file worked. This makes life SO much easier! Quote
stevevan Posted May 29, 2005 Posted May 29, 2005 Welcome to the forums! See how helpful the family is here? I even learned something on this one! Quote
Deverill Posted May 30, 2005 Posted May 30, 2005 Welcome to the forums and your new home, KL21! Quote
section31 Posted July 29, 2005 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
TweezerMan Posted July 29, 2005 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
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.