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.

Archive

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

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

Unable to start CMS for the first time...


Reply

3 Posts   1978 Views

Avatar
gilamran

1 April 2008 at 1:34am (Last edited: 1 April 2008 1:35am), Community Member, 4 Posts

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

Avatar
fordy

1 April 2008 at 1:46am Community Member, 46 Posts

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.

Avatar
Sam

1 April 2008 at 2:42pm Administrator, 679 Posts

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.