1

For some reason on this particular script, which is a copy of a script I use in a lot of other places, I am not getting any PHP errors. It simply shows a blank page, and It took me a long long time to hunt down a missing semi-colon this morning. Why arn't errors showing up?

my PHP.INI for this sub-domain:

display_errors = On
short_open_tag = On
memory_limit = 32M
date.timezone = Europe/Paris

The code at the top of the page:

session_start();

error_reporting(E_ALL);
ini_set('display_errors', '1');

The Sub Domain is set to run PHP as an Apache Module Which is the same as every other domain I use.

So I am not sure why I am not getting errors displayed. Can anyone tell me?

EDIT: This is solved, because the errors I was producing were on the page where I had got the lines: error_reporting(E_ALL); ini_set('display_errors', '1'); written. When I put the error on to a seperate page and included it, I could see the error fine.

I guess that's why they use bootstrapping!

Chud37
  • 4,907
  • 13
  • 64
  • 116
  • check the error log report, on your hosting control panel. – Muhammad Jun 24 '13 at 12:02
  • possible duplicate of [error\_reporting(E\_ALL) does not produce error](http://stackoverflow.com/questions/16933606/error-reportinge-all-does-not-produce-error) – deceze Jun 24 '13 at 12:05

3 Answers3

1

You should set error_reporting to E_ALL in the php.ini as well: when a parse error occurs (such as a missing semicolon), your error_reporting(E_ALL) won't be used.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

You could try to change this lines to get more information from php:

 ; The display of errors which occur during PHP's startup sequence are handled
 ; separately from display_errors. PHP's default behavior is to suppress those
 ; errors from clients. Turning the display of startup errors on can be useful in
 ; debugging configuration problems. But, it's strongly recommended that you
 ; leave this setting off on production servers.

 display_startup_errors = On

 ; When PHP displays or logs an error, it has the capability of formatting the
 ; error message as HTML for easier reading. This directive controls whether
 ; the error message is formatted as HTML or not.
 ; Note: This directive is hardcoded to Off for the CLI SAPI

 html_errors = On
Michal Przybylowicz
  • 1,558
  • 3
  • 16
  • 22
0
error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
Saurabh Chandra Patel
  • 12,712
  • 6
  • 88
  • 78