Bandit Design » Our Design Our Portfolio Contact Us
Tutorials TumbleLog Our Thoughts
Quite often at Bandit Design while we're working on your project, we'll stumble upon interesting or humourous things -- so we thought why not share them with the world!
RSS iPhone Random Archive « Home

Bandit Design

This is a TumbleLog authored at the desks of Bandit Design. We're a small web and graphic design studio based in Wellington, New Zealand.

Visit Bandit Design ยป

2 years ago

PHP error_reporting not working?

If PHP is ignoring your error_reporting directives, try the following;

ini_set('error_reporting', E_ALL);
ini_set('display_startup_errors', 1);
ini_set("log_errors",1);
ini_set("display_errors",1);
ini_set("error_log", "/path/to/a/log/file/php_error.log"); // make sure this is chmodded to 0777 permissions

Still not working? Like it wasn’t for me? Well save yourself 20 hours debugging and make sure if you’re using include() or require() for the script you’re working in that you aren’t force suppressing all errors like this;

@include("/path/to/my/file/no_errors.php");

I put the @ sign because I wanted to supress any “file not found” errors, but without realising it, was forcing supression of ALL errors inside the script as well. GAH!

Loading...