PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Thu Dec 16, 2004 12:44 pm
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
rehfeld
Forum Regular
Posts: 741 Joined: Mon Oct 18, 2004 8:14 pm
Post
by rehfeld » Thu Dec 16, 2004 1:37 pm
error_reporting(E_ALL);
dont echo it
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Thu Dec 16, 2004 1:47 pm
Constant E_ALL has the value 2047. I'm echoing it to show that I have E_ALL already turned on.
rehfeld
Forum Regular
Posts: 741 Joined: Mon Oct 18, 2004 8:14 pm
Post
by rehfeld » Thu Dec 16, 2004 2:33 pm
oh ok
maybe display errors is turned off
ini_set('display_errors', 1);
MarK (CZ)
Forum Contributor
Posts: 239 Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:
Post
by MarK (CZ) » Thu Dec 16, 2004 3:16 pm
Ah, that was it! I thought there is only error_reporting. Thanks!
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Thu Dec 16, 2004 3:54 pm
Never hurts to take a look in your php.ini and become familiar with the options and what they affect