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

2

11

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?

Outlawry answered 4/12, 2013 at 19:42 Comment(6)
if I remember correct I had smth like this with a non working _ss_environment.php setup.Prepotency
I think it may be an .htaccess issue with the server. I deleted the .htaccess and I was able to get the site up, although all links are being proceeded by index.php. i.e www.domain.com/index.php/pagename I've not had a chance to delve any further into it.Outlawry
@Fraser: what about the rights & owner of that file?Coryden
@Coryden The file permissions are fine. I think I've narrowed it down to the .htaccess file. When I remove .htaccess, the site displays without the error but all the URL's are incorrectly formatted. More info here: #20384923Outlawry
I meant here: #20475676Outlawry
Can you share the contents of your .htaccess file?Fleer
C
3

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.

Currish answered 11/12, 2013 at 7:16 Comment(0)
B
1

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

Bah answered 29/8, 2018 at 1:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.