Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverstripe. Uploaded to live. Getting "SilverStripe Framework requires a $databaseConfig defined."

Tags:

silverstripe

I've uploaded a site to the live server, imported the database and updated the db connection info in mysite/_config.php but am getting the following error:

SilverStripe Framework requires a $databaseConfig defined.

This appears to come from framework/main.php where it is checking my to make sure my config is defined. Here is my config:

global $databaseConfig;
$databaseConfig = array(
    "type" => 'MySQLDatabase',
    "server" => 'localhost',
    "username" => 'xxxxx',
    "password" => 'xxxxx',
    "database" => 'xxxxxx',
    "path" => '',
);

I published the site in the same manner to one of my servers so the client could check before setting live and it worked with no issues.

Anyone have any ideas what could be going on?

like image 623
Fraser Avatar asked Dec 04 '13 19:12

Fraser


2 Answers

Considering what you posted here: Silverstripe mod_rewrite issue (I think)

Seems to be most likely related to a missed configured .htaccess, maybe because the site didn't run through the SS install process.

Try adding a RewriteBase '/' in your .htaccess updating the folder to match your host config. If all fails, try running the SS installer which eventually will setup the .htaccess properly.

like image 173
colymba Avatar answered Nov 01 '22 16:11

colymba


for anyone else with this issue try putting /dev/build?flush=1 on the end of your url

like image 44
Mc User Avatar answered Nov 01 '22 16:11

Mc User