Jump to:

23379 Posts in 18298 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Blank screen when there's an error

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

Page: 1 2
Go to End
Author Topic: 5058 Views
  • marblegravy
    Avatar
    Community Member
    19 Posts

    Blank screen when there's an error Link to this post

    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?

  • zenmonkey
    Avatar
    Community Member
    527 Posts

    Re: Blank screen when there's an error Link to this post

    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

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Blank screen when there's an error Link to this post

    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.

  • Aug
    Avatar
    Community Member
    7 Posts

    Re: Blank screen when there's an error Link to this post

    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.

  • marblegravy
    Avatar
    Community Member
    19 Posts

    Re: Blank screen when there's an error Link to this post

    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.

  • Aug
    Avatar
    Community Member
    7 Posts

    Re: Blank screen when there's an error Link to this post

    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.

  • Biozic
    Avatar
    Community Member
    1 Post

    Re: Blank screen when there's an error Link to this post

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

  • Moose
    Avatar
    Community Member
    26 Posts

    Re: Blank screen when there's an error Link to this post

    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!

    5058 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.