With the upgrade in systems, perhaps there’s a new php.ini that’s hiding the errors? Try adding error_reporting (E_ALL) to see if you get the php errors; I suppose you might need to also disable your custom handler. Your sample script uses a short opening tag. Try using <?php instead.
Other than that, I don’t know. Your script creates the expected errors on my local computer. I didn’t try it on a live server.
I didn’t add the code formatting so my text was unclear. Sorry for that. Add:
error_reporting (E_ALL);
at the top of your code to set error output to all…actually, you’ll want that for only debugging. It will output all sorts of warnings, messages, and errors and clutter your page from a user’s standpoint.
From the php help pages:
[CODE]<?php
// Turn off all error reporting
error_reporting(0); // or error_reporting(^E_ALL);
// Reporting E_NOTICE can be good too (to report uninitialized
// variables or catch variable name misspellings …)
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
// Report all PHP errors (bitwise 63 may be used in PHP 3)
error_reporting(E_ALL);
// Same as error_reporting(E_ALL);
ini_set(‘error_reporting’, E_ALL);
That doesn’t seem to work for me. I wonder if there’s any specific reason to not show any errors starting after the HSphere updates, because it seems pretty non-standard
edit:
.htaccess at the root with:
php_flag display_errors on
php_value error_reporting 1
Has anyone been successful in getting error handling to work? I’ve tried creating a php.ini with error_reporting(E_ALL); I have tried adding a variety of settings in the .htaccess file with no luck.
I’m no php expert but I’m very frustrated that I can’t get any errors to display!! It makes it very difficult to debug!
Create a file like debug.php and include the page that errors out. You must be able to see the error this way and without having error display enabled on your website (that may reveal sensitive information).
Where do you have the error_reporting() statement? It should be at or near the top. Can you post your PHP code here or as a text file on your site so I can take a peek?
BTW, I have no troubles getting programming errors to show up…in fact errors are sort of my specialty!