[support] php-code in block is not executed...

Leonard den Ottolander.nl drupal at den.ottolander.nl
Wed Jan 19 11:11:28 UTC 2011


Hello Jarry,

On Tue, 2011-01-18 at 21:10 +0100, Jarry wrote:
> and after activating block I got white screen
> with some very nasty error message. It really scared me.

That'll teach you not to develop on live servers ;) . It helps if you
read and try to understand the error message. Most likely the code you
are loading contains errors which makes it unparsable and thus php bombs
out and shows you an empty page. Use
$ php -l <file>
on a command line to check your php files for syntax errors. 

While developing you can put
ini_set('display_errors', 1);
at the top of your php file. This will show all errors in the browser,
so you don't have to keep the http error log open. Make sure to remove
this statement when you transfer the file to the live site, because
sometimes these errors contain sensitive information that you do not
want to share with the rest of the world.

Setting
error_reporting(E_ALL);
also helps if the code that include your code set it to a lower level.

Regards,
Leonard.

-- 
mount -t life -o ro /dev/dna /genetic/research




More information about the support mailing list