PHP Reference Book Blog

PHP Reference: Beginner to Intermediate PHP5

Sep-15-08

Display all PHP Errors and Warnings

posted by Mario Lurig

Every time I was debugging my pages I found myself searching around for this little chunk of code to display PHP errors. So, I put in the book so it was always nearby. Since people still search google endlessly, I thought I would provide it here as well. If you wish to see all the PHP errors and warnings in your script, include the following bit of code:

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

Now, continue to beat your head against your keyboard while you continue to hunt down your missing semicolon or closing parenthesis.

Similar Posts:

Share and Bookmark:
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Digg
  • Facebook
  • MySpace
  • Twitter
  • NewsVine
  • Tumblr
  1. Phil Said,

    Just what I was looking for :) thanks!

  2. Elliott Said,

    Thanks, helped a lot!
    T

Add A Comment