Re: error messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tbt wrote:
Hi

I'm a newbie to php and i would like to know a way of viewing runtime errors
on the browser. Currently when an error occurs nothing is displayed on the
browser. Is there any way of viewing all error messages on the browser
itself.

Thanks

From what I read in your other posts, it sounds like you have a parse error in your script.

Even if you place the lines at the top of scripts as others have suggested, it will not fix your issue if your script has a parse error in it. This is because PHP pre-parses each script. But only after it is able to parse all the scripts, does it actually start running the script(s).

My suggestion is to use modify the php.ini file directly and change the values that the others have suggested or, if you're using Apache, use a .htaccess file with the values set to force(on startup) php to display errors.

This has bit me in the rear a few times myself.

So, in your php.ini file, set these:

display_errors = On
error_reporting  =  E_ALL

and if you have to use a .htaccess file, do this

php_value error_reporting E_ALL
php_value display_errors On

Doing a quit google search I found this.  It might be good reading for you.

	http://www.nyphp.org/phundamentals/ini.php

--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux