Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
mcccy005
Forum Contributor
Posts: 123 Joined: Sun May 28, 2006 7:08 pm
Post
by mcccy005 » Mon Apr 02, 2007 3:20 am
I've installed PHP 5.2.1 however I can't view any errors when they occur - php just shows a blank screen if there's any errors.
I've set the following in php.ini but it does nothing:
display_errors = On
error_reporting = E_ALL & E_NOTICE & E_Strict
Originally the above was display_errors = Off and error_reporting = E_ALL
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Mon Apr 02, 2007 4:18 am
Did you restart your server?
mcccy005
Forum Contributor
Posts: 123 Joined: Sun May 28, 2006 7:08 pm
Post
by mcccy005 » Mon Apr 02, 2007 4:43 am
WEll I did restart the computer a couple of times if that counts??
mentor
Forum Contributor
Posts: 100 Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan
Post
by mentor » Mon Apr 02, 2007 6:32 am
in phpinfo(), confirm the value of display_errors
dibyendrah
Forum Contributor
Posts: 491 Joined: Wed Oct 19, 2005 5:14 am
Location: Nepal
Contact:
Post
by dibyendrah » Mon Apr 02, 2007 6:35 am
try putting
at the top of the page.
Oren
DevNet Resident
Posts: 1640 Joined: Fri Apr 07, 2006 5:13 am
Location: Israel
Post
by Oren » Mon Apr 02, 2007 6:36 am
mcccy005 wrote: WEll I did restart the computer a couple of times if that counts??
Yes, it counts.
ryuuka
Forum Contributor
Posts: 128 Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands
Post
by ryuuka » Mon Apr 02, 2007 7:11 am
put this on top of your site just below the php opening
Code: Select all
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Apr 02, 2007 8:32 am
E_ALL & E_NOTICE & E_Strict
This evaluates to zero.
"E_ALL | E_STRICT" is what you want.
mcccy005
Forum Contributor
Posts: 123 Joined: Sun May 28, 2006 7:08 pm
Post
by mcccy005 » Tue Apr 03, 2007 6:17 am
Awesome; thanks feyd - that worked a treat.
Also; thanks ryuuka; your method worked also (although means I don't have to put it at the top of each page, but could come in handy for debugging when I put it onto someone elses server)
Thanks.