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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

“SilverStripe Framework requires a $databaseConfig defined.” after installing on new server


Go to End


3 Posts   5796 Views

Avatar
Mike_66

Community Member, 1 Post

9 March 2015 at 9:52am

Hi,

Since I went to another server (PHP 5.4), I can't make SilverStripe to work.

All the time I receive “SilverStripe Framework requires a $databaseConfig defined.” error.
Which means there is no global variable $databaseConfig

I've tried everything:
- Set file permissions
- Remove / change .htaccess
- Copy & paste the content of _config.php to main.php

But still nothing.... It looks like some problems with autoloader, because after I copy the configuration to a file framework/main.php other errors appears:
Fatal error: Class 'i18n' not found in (...)/framework/main.php on line 39

Line 39: i18n::set_locale('en_US'); - after deleting this line another line cause error:
Director::set_environment_type('dev') <-- class Directory not found ...

Have any of you encountered this problem and was able to help me?
I lose my temper, and I sit on this problemma more than 4 hours with no results :((((

Avatar
Pyromanik

Community Member, 419 Posts

9 March 2015 at 10:14am

I would start right back at the beginning and double, triple, quadruple check that the environment I'm modifying is the actual live one I'm intending to.
Then I'd ensure that the version of SilverStripe that I'm attempting to install actually works with php 5.4 (2.4.10 upwards iirc - you'll need to upgrade if you have earlier).

Once that's assured...
If there's a 'silverstripe-cache' folder, then empty it. Completely. sudo rm -rf silverstripe-cache/* (and silverstripe-cache/.* too)
Otherwise check the designated cache folder (probably /tmp) and try the same on the appropriate files.

After that I'd ensure that there is/was no corruption in the migration. If you've got only half of the framework dir, then that would do it too.

Avatar
wmk

Community Member, 87 Posts

15 March 2015 at 4:10am

Did you also copy the _ss_environment.php file which may be outside (above) the webroot dir?