Hello all,
I keep running into a problem with one of the PHP-based projects I'm working on. According to Eclipse, my code doesn't have any syntax errors, but whenever I try to run said code, I get a blank screen instead of a confirmation message.
I feel like I'd be able to figure out what the problem is, except no matter what method I try to turn on error reporting, nothing seems to work. Is this ability disabled on the toolserver for some reason, or are the methods described everywhere on the internet not the way to go in our particular case?
And right after I sent this, someone showed me what to do:
error_reporting(E_ALL); ini_set('display_errors', 'On');
Sorry for the emails, all!
---- User:Hersfold hersfoldwiki@gmail.com
On 12/9/2011 9:21 PM, Hersfold wrote:
Hello all,
I keep running into a problem with one of the PHP-based projects I'm working on. According to Eclipse, my code doesn't have any syntax errors, but whenever I try to run said code, I get a blank screen instead of a confirmation message.
I feel like I'd be able to figure out what the problem is, except no matter what method I try to turn on error reporting, nothing seems to work. Is this ability disabled on the toolserver for some reason, or are the methods described everywhere on the internet not the way to go in our particular case?
On 10 December 2011 03:27, Hersfold hersfoldwiki@gmail.com wrote:
And right after I sent this, someone showed me what to do:
error_reporting(E_ALL); ini_set('display_errors', 'On');
You should use error_reporting(-1) if you want *all* errors (-1 always is
the maximum reporting level). In older PHP versions, this is equal to E_ALL, but in newer ones it is equal to E_ALL | E_STRICT.
And don't forget to switch the errors off again once you are done debugging :-)
Merlijn
On Sat, Dec 10, 2011 at 5:06 PM, Merlijn van Deen valhallasw@arctus.nlwrote:
On 10 December 2011 03:27, Hersfold hersfoldwiki@gmail.com wrote:
And right after I sent this, someone showed me what to do:
error_reporting(E_ALL); ini_set('display_errors', 'On');
You should use error_reporting(-1) if you want *all* errors (-1 always is
the maximum reporting level). In older PHP versions, this is equal to E_ALL, but in newer ones it is equal to E_ALL | E_STRICT.
And don't forget to switch the errors off again once you are done debugging :-)
Merlijn
As of PHP 5.4.0 E_STRICT (new in 5.0.0) is part of E_ALL again.
- Krinkle
toolserver-l@lists.wikimedia.org