cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Error reporting

N/A

PHP Error reporting

I was just wondering if anyone elses CGI account doesn't return errors for any PHP scripts with errors (usually missing ;...)

Mine seems to have stopped and instead of displaying 'error on line ..' just leaves the screen white.

Could this be something i have done? i don't use telnet but maybe its stopped or something..... argh, it is frustrating because i hosted it on a friends hosting account which returned a line error. So, is it Force9 or me?!

Thanks in advance!
4 REPLIES
N/A

PHP Error reporting

If you add
<?

ini_set("display_errors","On");
error_reporting (E_ERROR | E_WARNING | E_PARSE | !E_NOTICE);
?>

to the top of the PHP script, error reporting should come back. It is disabled by default on the CGI server.

More tips on debugging PHP can be found in this tutorial
N/A

PHP Error reporting

Quote
If you add
<?

ini_set("display_errors","On");
error_reporting (E_ERROR | E_WARNING | E_PARSE | !E_NOTICE);
?>

to the top of the PHP script, error reporting should come back. It is disabled by default on the CGI server.

More tips on debugging PHP can be found in this tutorial


thanks, ill look into it!

[EDIT]

I tried making a file with:

<?
ini_set ("upload_tmp_dir", "tmp");
ini_set("register_globals","On");
ini_set("display_errors","On");
error_reporting (E_ERROR | E_WARNING | E_PARSE | !E_NOTICE);

//ini_set("magic_quotes_gpc","Off");
//ini_set("magic_quotes_runtime","Off");

$i = 1;
echo $i
?>


Which works fine, so then i tried taking the semicolon away after the 1, hoping for an error report to appear. It didn't.

If someone could maybe try something similar as i hope it's just me doing something wrong!
N/A

PHP Error reporting

I don't actually have an account on the Force9 CGI server, so I can't try that out (I'm just a PAYG user here) but I'm trying on my PlusNet account and its not working...

I'll investigate, as it was originally me that discovered the display_errors method and it DID work at one point in time....

Oddly, the settings do take, and if I execute the script at the command line shell, then I get the errors - they just do not propogate to the browser.

Colin
N/A

PHP Error reporting

Quote
I don't actually have an account on the Force9 CGI server, so I can't try that out (I'm just a PAYG user here) but I'm trying on my PlusNet account and its not working...

I'll investigate, as it was originally me that discovered the display_errors method and it DID work at one point in time....

Oddly, the settings do take, and if I execute the script at the command line shell, then I get the errors - they just do not propogate to the browser.

Colin


i contacted Force9 who said that 'error_display' is not on and won't be activated until the redevelopment of the CGI accounts takes place at the beginning of '04 (they also said it can't be activated immediatley either... maybe he was suggesting that this method wouldn't work). Unfortunately, I have a deadline for the 2nd of Jan, but i have installed apache on my PC so i am able to get the coding done. PHEW!

Thanks for the help though!