Page 1 of 1

Where are the errors?

Posted: Thu Dec 16, 2004 12:44 pm
by MarK (CZ)
I'm probably just stupid but I can't find our why there are no warnings / error reports in my scripts. It's probably just something stupid but it complicates my work.

Code: Select all

<?php

echo error_reporting();

echo "<br><br>Division by null: ";
$i = 10/0;

echo "<br><br>Non-existent function: ";
$var = NonExistentFunction("text");

?>
outputs:

Code: Select all

2047

Division by null: 

Non-existent function:
Thx for your time

Posted: Thu Dec 16, 2004 1:37 pm
by rehfeld
error_reporting(E_ALL);

dont echo it

Posted: Thu Dec 16, 2004 1:47 pm
by MarK (CZ)
Constant E_ALL has the value 2047. I'm echoing it to show that I have E_ALL already turned on.

Posted: Thu Dec 16, 2004 2:33 pm
by rehfeld
oh ok :)

maybe display errors is turned off

ini_set('display_errors', 1);

Posted: Thu Dec 16, 2004 3:16 pm
by MarK (CZ)
Ah, that was it! I thought there is only error_reporting. Thanks!

Posted: Thu Dec 16, 2004 3:54 pm
by John Cartwright
Never hurts to take a look in your php.ini and become familiar with the options and what they affect