How do I see errors when a php page has problems?

Here is the page I’m working on:

http://www.oil-testimonials.com/newVersion/login.php

Unless I’ve fixed the issue on my own, you should see a completely white page. Is there something I can do to turn on error reporting for php pages?

Thanks!

Try ini_set(‘error_reporting’,E_ALL);

As Rvan mentioned, or a more direct way (for only affecting the file you are working in), you could use

error_reporting(E_ALL);

Note: This would go at the top of the file you are working on.

If on the off-chance there are still no errors showing then try the following:


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


John_Betong, I tried your code suggestion and still no error page. I am running this website, for testing purposes, inside a directory off the root. Would that make a difference?

Thanks!

@busboy.

Try copying and pasting this code at the very top of the test file:



  if( 1 ) // 0 == FALSE, 1 == TRUE,
  {
    # Defines
    defined('jj' )    ? NULL : define( 'jj', '<br />' );
    defined('D_DATE') ? NULL : define('D_DATE',  date('d-m-Y', time()));
    defined('D_TIME') ? NULL : define('D_TIME',  date('H:i:s', time()));
    defined('d_long') ? NULL : define('d_long',  'l jS \\of F Y h:i:s');
    defined('D_LONG') ? NULL : define('D_LONG',  date( d_long,  time()));


    # Dates
    echo jj .ini_get('date.timezone');
    echo jj .D_DATE;
    echo jj .D_TIME;
    echo jj, D_LONG;
    echo jj;

    # File
    echo jj, __FILE__;
    echo jj, 'Last modified: ' , date( d_long, filemtime(__FILE__) );
    echo jj, 'filesize(): ' , filesize( __FILE__ ) . 'bytes';
    echo jj;

    # Test errors
    $x  = array();
    $x[]= ini_set( 'error_reporting',-1 );  # -1 is most agressive
    $x[]= ini_set( 'display_errors',  1 );  #  1 == TRUE

    echo  jj  .__LINE__ . ' : ' .$x[0];
    echo  jj  .__LINE__ . ' : ' .$x[0];
    echo  jj  .__LINE__ . ' : ' .$x[2];

    die;
  }


Still all I get is a blank white page. I wonder if this has anything to do with the fact that I use mod rewrite? Any other ideas?

Thanks!

How do I see errors when a php page has problems?
Here is the page I’m working on:

http://www.oil-testimonials.com/newVersion/login.php

Unless I’ve fixed the issue on my own, you should see a completely white page. Is there something I can do to turn on error reporting for php pages?

Thanks!

I checked the original link and it shows fine although there are a few minor HTML errors:

Sorry, I should have updated this thread, but instead of working inside a folder off the root, I decided to put the test project in a whole new domain. Here is the current page I’m working on that does not produce any error messages, even though I have copied and pasted in the various suggestions:

http://www.e-downline.net/essential-oils.php?tID=7047

Thanks!

That page has a 500 error

How did you find that out? Why don’t I get any text when errors are thrown? I used to, but now they don’t show any more. Is it a setting in php.ini or something?

Thanks!

I just clicked on your link - if you are still using mod rewrite what happens if you disable it?

I deleted everything in the .htaccess file and then saved. Then I attempted to reload the page. I still get nothing but a blank white page.

http://www.e-downline.net/essential-oils.php?tID=7047

Could be. Take a look this article:

Bless you tom8! I now have error reporting back on.

I’m glad I could help out. You did question about that setting and I just provided the link.