Fight with empty pages or enable error reporting and debug

When users install scripts or play with functionality they can get 'white page'. Commonly page without content mean that something is wrong and you can not see errors, warnings or notices, because reports of this type disabled by php configuration.

Many times via support forums I said
"don't work" - isn't error report

minimum you need to describe

  • What you did?
  • What you got?
  • What you have expect to got?

So, if you got empty page help me to help you and try to process next instruction before report error.

First you need to discover how your php is configured (mod_php or CGI/FastCGI).
If you have not access to phpinfo page:

You will see table with PHP configuration options. You need to look for "Server API" option. It can be "CGI/FastCGI" or "Apache x.y Handler"(mod_php). For each option we have different way to enable error reporting.

CGI/FastCGI

  • Create file php.ini with content
    error_reporting = 6135
    html_errors = 1
    display_errors = 1
    display_startup_errors = 1 
  • upload this file to your webserver
  • try to get page with proble again

Apache x.y Handler"(mod_php)

  • Create file .htaccess with content
    php_value error_reporting 6135
    php_value html_errors 1
    php_value display_errors 1
    php_value display_startup_errors 1 
  • upload this file to your webserver
  • try to get page with proble again

If you have different "Server API"(NSAPI, ISAPI) try to process next instruction

Another "Server API"

  • open file php file produce empty page or problem and add next lines at the top
    ini_set('error_reporting', 6135);
    ini_set('html_errors', 1);
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1); 
  • upload changed file to your webserver
  • try to get page with proble again

Now, you need to see all generated errors. Provide they with your bug report.

Tags: