Is there a PHP configuration setting that would prevent use of variable before it's set? -


i have following code:

<?php    if ($foo) {     echo $foo;   }  ?> 

however, page throwing 500 internal server error (i know means there's error being logged , page aborting prematurely) not have access error log (as host logging syslog).

i can fix doing following:

<?php    if (isset($foo) && $foo) {     echo $foo;   }  ?> 

but that's not question. there server setting kill page attempting use unset variable? afaik, logs 'notice', not enough kill page.

here first bit of phpinfo() output (disclaimer: have no windows + fastcgi setup experience) enter image description here

update added custom error handler , output $errno , $errstr. expected, e_notice (8) message 'undefined variable'. i'm guessing 500 internal error has how it's logging syslog.

implement custom error handler , can you'd (mostly)!


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -