Page 1 of 1

can't see errors

Posted: Mon Nov 20, 2006 1:38 am
by itsmani1

Code: Select all

echo "this is a test<BR />";
fooor(i$=1; $i<4; $i++)
{
 echo $i;
}
when i executes above code on my server it don't asks for the error, infect it don't show anything on the page. when i fix the syntax error it works fine.

any help

Posted: Mon Nov 20, 2006 1:50 am
by Luke
error display is probably disabled... are you on a shared host?

Posted: Mon Nov 20, 2006 2:03 am
by itsmani1
its a dedicated/virtual dedicated server
how can i i enable it?

what if i am on a shared server can i enable it?

thanks

Posted: Mon Nov 20, 2006 3:13 am
by patrikG

Posted: Mon Nov 20, 2006 5:02 am
by dibyendrah

Code: Select all

ini_set('error_reporting', E_ALL);
ini_set("display_errors", 1);
OR

Code: Select all

error_reporting(E_ALL);
To see all the php.ini values on the shared server, run

Code: Select all

<?php
print_r(ini_get_all());
?>

Cheers,
Dibyendra

Re: can't see errors

Posted: Mon Nov 20, 2006 9:16 am
by volka
Are you kidding?
itsmani1 wrote:echo "this is a test<BR />";
fooor(i$=1; $i<4; $i++)
{
echo $i;
}

Re: can't see errors

Posted: Mon Nov 20, 2006 11:09 am
by Luke
volka wrote:Are you kidding?
itsmani1 wrote:echo "this is a test<BR />";
fooor(i$=1; $i<4; $i++)
{
echo $i;
}
I'm pretty sure he was trying to produce an error... ?

Posted: Mon Nov 20, 2006 11:12 am
by RobertGonzalez
Fatal errors will still not show using ini_set('display_errors', 1) (as per the manual). You will need to enable display_errors in your ini file and restart your server in order to see your errors. Keep in mind that this a potential security risk on a production environment. For testing/development, I always set display_errors to On, but on a production system, it is always off for security.

Re: can't see errors

Posted: Mon Nov 20, 2006 11:30 am
by volka
The Ninja Space Goat wrote:
volka wrote:Are you kidding?
itsmani1 wrote:echo "this is a test<BR />";
fooor(i$=1; $i<4; $i++)
{
echo $i;
}
I'm pretty sure he was trying to produce an error... ?
oops, sorry. Was full of prejudices :oops: