Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Blank Page

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
Go to End
Author Topic: 1042 Views
  • Veronique
    Avatar
    Community Member
    1 Post

    Blank Page Link to this post

    Hi. I am following the tutorial for beginners. I keep getting a blank page for admin and all the pages in my site. I am using Mac OS X 10.5.3 and SilverStripe-v2.4.5. Tried ?flush=1 and dev=1 but made no difference. In my MAMP php error log it says [14-Jul-2011 10:39:58] PHP Parse error: syntax error, unexpected '<' in /Applications/MAMP/htdocs/silverstripe/SilverStripe-v2.4.5/mysite/_config.php on line 9. When I look at this _config.php page I cannot find the error. This is the code - line 9 is <p>&nbsp;</p> -

    <?php

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
       "type" =>
    <p>&nbsp;</p>

    <p>'MySQLDatabase',
       "server" => 'localhost',
       "username" => 'root',
       "password" => 'root',
       "database" => 'SS_mysite',
       "path" => '',
    );

    MySQLDatabase::set_connection_charset('utf8');</p>
    <p>Director::set_environment_type(&quot;dev&quot;);</p>
    <p>// This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.org/themes/
    SSViewer::set_theme('tutorial');

    // Set the site locale
    i18n::set_locale('en_NZ');

    // enable nested URLs for this site (e.g. page/sub-page/)
    SiteTree::enable_nested_urls();</p>
    <p>&nbsp;</p>

    Grateful for any help!

  • Chris_Bryer
    Avatar
    Community Member
    35 Posts

    Re: Blank Page Link to this post

    check your php.ini file and make sure display_errors is on.

    another option is to check your errors log.

    -Chris

  • Bruce B
    Avatar
    Community Member
    145 Posts

    Re: Blank Page Link to this post

    Veronique,
    somehow, a stack of html tags have ended up in your _config.php file. That is what is causing the problem. You may have opened this file in some program that thought it was a web page and tried to format it.

    Find a clean version of _config.php and try again.

    If you don't have a decent text editor, grab Text Wrangler (free) from the App store. If you are serious, go for its big brother BBEdit. You will need something like this to do your file editing.

  • Veronique1
    Avatar
    Community Member
    2 Posts

    Re: Blank Page Link to this post

    Thanks Bruce

    I opened the file in dreamweaver so I guess it placed the html tags in it. I'll get the programs you mentioned and try again with a fresh config file . Thanks again for your help. I'm familiar with css and html but as you can see new to php. (Im veronique but could not sign in again under that name so had to reregister name to veronique1)

  • Veronique1
    Avatar
    Community Member
    2 Posts

    Re: Blank Page Link to this post

    Hi Chris

    Thanks for you quick reply. I am using the error logs in my MAMP application. So I can view them. But I will try your suggestion too. Thanks again for you help. (Im veronique but could not sign in again under that name so had to reregister name to veronique1)

    1042 Views
Page: 1
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.