user223954
user223954

Reputation: 19

errors are not displaying in PHP script

I have tried with these code:

error_reporting(E_ALL^E_NOTICE);

ini_set("display_startup_errors","on");
ini_set("track_errors","on");
ini_set("error_reporting","E_ALL^E_NOTICE");

But still errors are not appearing on my script.It just displaying only blank white screen when any error occur.Please guide me.

Upvotes: 0

Views: 204

Answers (3)

jlb
jlb

Reputation: 20010

how about:

ini_set('display_errors', 1);

?

Upvotes: 1

DisgruntledGoat
DisgruntledGoat

Reputation: 72570

Is this on your own server? Or shared hosting etc? It's likely that error reporting is turned off at the server level. (The reason is usually 'security' but I don't see how it's really a security issue.)

Either edit your server config (php.ini) if you have access to it, or contact your host. They may be able to provide access to error logs.

Upvotes: 0

Pekka
Pekka

Reputation: 449753

It could be that your provider has set PHP errors not to be output, but logged internally. I have experienced this before. In that case, a custom error handler may help you. Before, though, make sure you have no @s in front of any statements and log_errors is on. Also run a phpinfo() to double-check whether all reporting settings are activated.

Also, a completely blank page could be a structural parse error. Check with a simple error-inducing statement like

ecxho("hello world");  

first.

Upvotes: 1

Related Questions