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.

General Questions

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

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

Blank screen when there's an error


Go to End
Reply

11 Posts   5282 Views

Avatar
marblegravy

3 January 2010 at 12:55am Community Member, 19 Posts

OK, this is driving me bananas and I'm hoping this is a quirk not somethign we just have to put up with...

Basically, if there is a single error in anything in my site, I nothing shows up. The total content of the page when I go to view source is blank. Not even an html tag.

In _config.php I have dev mode turned on:

Director::set_environment_type("dev");


and I would have assumed that if there was an error, I would get an error message, not just nothing...

I am running MAMP Pro (1.8.3) on OS 10.5.8 and I get the blank screens in all browsers I try (safari, firefox, chrome).

I have read some things on here that have suggested it's a shortcoming of MAMP... is this true? Is there a workaround?

Avatar
zenmonkey

3 January 2010 at 7:32am Community Member, 528 Posts

I'm using MAMP non-pro and I find using the URL param ?isDev=1 works better for me, though I get the occasional white screen of death with no help

Avatar
Sean

3 January 2010 at 5:23pm (Last edited: 3 January 2010 5:25pm), Forum Moderator, 921 Posts

Sounds like a segmentation fault to me.

It's likely it's to do with a particular PHP function being used in the code or a dodgy extension.

Avatar
Aug

3 January 2010 at 7:03pm Community Member, 7 Posts

One of the first things I do with a new ss installation is create a log folder at the root level and add the following settings to my _config.php file:

Debug::log_errors_to("log/silverstripe.log");
ini_set("log_errors", "On");
ini_set("error_log", "log/silverstripe.log");

You can then view any php errors in this file, it helps when you have an issue like the one you describe. On a production site I would place the log folder below any publicly viewable folders.

A.

Avatar
marblegravy

4 January 2010 at 1:36pm Community Member, 19 Posts

Thanks for the suggestions guys, but I'm still lost when it comes to trying to figure out where I've got the problems...

I tried adding ?isDev=1 to the url's, but I still got the completely empty page.
I also tried the logging option, but nothing ever got written to the log.

I know the file that's causing the error - I'm building a custom form. However I can stare at this file all day and I have no idea what SilverStripe is having problems with. I have had the same issue building the different page templates too, but could figure out where I was going wrong with those because they were simpler. The only solution I can find at the moment to get the site working again is to delete the page that I've been developing and start again.

Is there an editor that can do some kind of error-checking for me? I'm currently using Dreamweaver to put this all together.

Avatar
Aug

9 January 2010 at 11:35am Community Member, 7 Posts

Sorry about the delayed response. There are a number of actual IDE's that will do instant error analysis but that is only for php errors and warnings not silverstripe. I personally use NuSphere. If you attach your file I will take a gander at it for you, but no promises I will see the error.

Avatar
Biozic

15 February 2010 at 10:11am Community Member, 1 Post

Setting "display_errors = On" in your php.ini (MAMP/conf/php5/php.ini) file on your development server can be useful.

Avatar
Moose

20 March 2010 at 12:55am Community Member, 26 Posts

Hi
I am experiencing exactly this problem on my production server. Even PHP syntax errors have the effect of just returning a white screen of death. It makes debugging impossible. Has anyone determined the cause of this? Thanks!

Go to Top