Re: Novice Question - Viewing Errors

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

 



revDAVE wrote:
> I am just beginning to learn about PHP.
> 
> It seems as though if I make a code error... The PHP page will simply come
> up blank. ( Not too helpful for error checking) -  I would like to see some
> kind of report on the page as to what went wrong.
> 
>  I have tried adding various lines of code to my page - from the link below
> -  however I still get a blank page when errors occur...

if you make an syntax error then your script will never be run,
in which case the error reporting settings will never be set by your script.

if your on a local/dev machine try changing the relevant ini settings in php.ini

alternatively if you have the ability to use a .htaccess file (apache webserver)
the you can add the following 2 lines to set the error_reporting:

	php_value display_errors On
	php_value error_reporting 2048

(I wrote than off the top of my head - please check the manual for exact
ini setting names and values)

alternatively you could may 'tail' the relevant error_log (most often this is
the apache error log)

you can check what the current ini setting for something is using this:

echo ini_get("error_reporting");

> 
> display_errors(1);
> error_reporting (E_ALL);
> Etc........
> 
>  I have read that possibly the errors are being sent to kind of error log -
> rather than the page?
> 
> Q: How can I get the error reporting show up on the page so I can see it?
> 
> - - - - -
> From: PHP: Error Handling and Logging Functions - Manual
> Location: http://www.php.net/manual/en/ref.errorfunc.php
> - - - - -
> 
> XXXIII. Error Handling and Logging Functions
> 
> 
> 
> 
> --
> Thanks - RevDave
> CoolCat@xxxxxxxxxxxxxxxx
> [db-lists]
> 

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