Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Unable to start CMS for the first time...

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 1955 Views
  • gilamran
    Avatar
    Community Member
    4 Posts

    Unable to start CMS for the first time... Link to this post

    Hi,
    I just installed (followed the tutorial) SilverStripe, and I'm unable to view my site, not the CMS...
    I have Apache and MySql installed before I installed SilverStripe... but it shouldn't affect it...

    when I open the CMS I get this error:

    FATAL ERROR: Invalid argument supplied for foreach()
    At line 327 in C:\Program Files\SilverStripe\htdocs\sapphire\core\model\Database.php

    Database->manipulate()
    line 92 of DB.php

    DB::manipulate()
    line 567 of DataObject.php

    DataObject->write(1)
    line 50 of PageView.php

    PageView->record()
    line 171 of Statistics.php

    Statistics::collect()
    line 75 of ContentController.php

    ContentController->init()
    line 12 of Page.php

    Page_Controller->init()
    line 244 of Security.php

    Security->login(Array)
    line 210 of Controller.php

    Controller->run(Array)
    line 76 of Director.php

    Director::direct(/Security/login)
    line 104 of main.php

    Context

    --------------------------------------------------------------------------------

    Debug (Debug::showError() in line 149 of Debug.php)
    manipulation =

    When I open my site I get this error:

    FATAL ERROR: DataObject::buildSQL: Can't find data classes (classes linked to tables) for SiteTree
    At line 1334 in C:\Program Files\SilverStripe\htdocs\sapphire\core\model\DataObject.php

    user_error(DataObject::buildSQL: Can't find data classes (classes linked to tables) for SiteTree,256)
    line 1334 of DataObject.php

    DataObject->buildSQL(HomepageForDomain = 'localhost:3000')
    line 1543 of DataObject.php

    DataObject->instance_get_one(HomepageForDomain = 'localhost:3000',)
    line 1504 of DataObject.php

    DataObject::get_one(SiteTree,HomepageForDomain = 'localhost:3000')
    line 32 of RootURLController.php

    RootURLController::get_homepage_urlsegment()
    line 15 of RootURLController.php

    RootURLController->run(Array)
    line 76 of Director.php

    Director::direct(/)
    line 104 of main.php

    Context

    --------------------------------------------------------------------------------

    Debug (Debug::showError() in line 149 of Debug.php)
    filter =
    HomepageForDomain = 'localhost:3000'
    sort =
    Sort
    limit =

    join =

    restrictClasses =
    1
    having =

    tableClasses =

    Thanks
    Gil Amran

  • fordy
    Avatar
    Community Member
    46 Posts

    Re: Unable to start CMS for the first time... Link to this post

    It looks like there is a code/<classfile>.php file missing. Your database thinks it should be there but it isn't. If that isn't it, have you have created a DataObject in a tutorial? Maybe there is a spelling mistake on the $obj definition.

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Unable to start CMS for the first time... Link to this post

    1) Check that mysite/_config.php exists.
    2) Visit http://yoursite.com/db/build?flush=1 and see if it returns any errors.

    If db/build?flush=1 runs without error, try visiting the site or CMS again - that may have fixed it.

    1955 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.