Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Blank screen when there's an error


Go to End


12 Posts   13799 Views

Avatar
barryvanveen

Community Member, 11 Posts

1 August 2010 at 10:45pm

Hi all,

I just had the same problem, and even though this is an old thread, I just want to add a posible solution. You can always view the apache error log under linux with "tail -f /var/log/apache2/error.log". I'm not sure if there is a similar file/command for mac or windows... This error log will show the error you are looking for, the custom error logging that Aug suggested is not really working for this problem.

Avatar
hp777

Community Member, 13 Posts

5 January 2011 at 1:58pm

On the mac open the console utility and select apache_error_log and or php_error.log

Avatar
Optic Blaze

Community Member, 190 Posts

12 September 2012 at 8:47pm

Hi there,

Had the same problem on a shared hosting platform where i was not able to edit php.ini.

Solved the problem by adding the following code to the .htaccess file:

php_flag display_errors on

A word of warning though...you might want to comment it out once you have debugged as it is more secure to not display errors in a live environment.

Avatar
merrick_sd

Community Member, 99 Posts

10 June 2016 at 1:15am

Edited: 10/06/2016 1:52am

so if you do all that...and you stiill get a white screen?

.htaccess

#show error to the public
php_flag display_startup_errors On
php_flag display_errors On
php_flag html_errors On

mysite _config.php

error_reporting(E_ALL);
ini_set("log_errors", "On");
ini_set("error_log", "/home/myuser/public_html/assets/silverstripe.log");
SS_Log::add_writer(new SS_LogEmailWriter('yesheregoesmy@devemailobviously'), SS_Log::ERR);

the strange thing is when i view source ..everything this there except the closing </html> which is in my page template. also the middle layout bit seems to be missing ..so i could start trawling through my layout page.ss and think may be its an include... but surely there is a way to never get the white screen...what if the logfile didn't have permission or it didn't exist ? whou you get a white screen:)

in the the php ini file on the server the errors are also on.
the site is in dev mode.

ss_environment.php

define('SS_ENVIRONMENT_TYPE', 'dev');

when i do dev build the only errors im seeing are


Warning strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.
GET /dev/build?flush=all&flushtoken=cc2947ef53d97c7fbbb2797e347ffdd1

Line 294 in /home/myuser/public_html/framework/control/HTTP.php

and composer.json the silvertrip version is

"silverstripe/cms": "3.4.*",
"silverstripe/framework": "3.4.*",

[\code]



Go to Top