Help Finding Errors (PHP error messages off)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help Finding Errors (PHP error messages off)

    Heres A Little Script To enable You to find Errors When Php error messages are turned off

    (when you just see a blank screen)


    PHP Code:
    <?php
     
    /*
     save as error.php
     usage: type in your browser http://domain.com/error.php?page=index.php
     replace domain.com with your domain
     and index.php with the page you wish to find errors on
     */
     
    $page $_GET["page"];
     
    error_reporting *(E_ALL);
     
    ini_set ('display_errors'true);
     include(
    "$page");
     
    ?>
    :p
    Last edited by something else; 24.05.09, 01:16. Reason: Where Do The Stars Come From? lol

    #2
    1) Never register globals on
    2) If you have php error messages off....* it prevents hackers from crashing your sql to get field names etc they need to inject sql*
    3) penguins can fly but only if you give them a can of redbull*
    4) forget number 3*

    Comment


      #3
      also a handy tip for people who get this error message:

      Parse error: syntax error, unexpected $end

      normal due failing to close paragraph properly with correct symbol eg: ) or }

      You Can Get around this by going to your php.ini and enable short tag opening

      short_open_tag = On

      This should help prevent this from happening

      __________________

      Your Pretty When Im Drunk! And Im Pretty Fcking Drunk
      Last edited by something else; 05.06.09, 05:40. Reason: Wouldnt be the first time i gave a dog a bone lol

      Comment

      Working...
      X