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?

Fraser
  • 12,986
  • 22
  • 69
  • 113
  • if I remember correct I had smth like this with a non working _ss_environment.php setup. – munomono Dec 05 '13 at 19:57
  • 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. – Fraser Dec 06 '13 at 09:28
  • @Fraser: what about the rights & owner of that file? – chelmertz Dec 09 '13 at 16:24
  • @chelmertz 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: http://stackoverflow.com/questions/20384423/silverstripe-uploaded-to-live-getting-silverstripe-framework-requires-a-data – Fraser Dec 09 '13 at 16:53
  • I meant here: http://stackoverflow.com/questions/20475176/silverstripe-mod-rewrite-issue-i-think – Fraser Dec 09 '13 at 17:01
  • 1
    Can you share the contents of your `.htaccess` file? – 3dgoo Dec 09 '13 at 19:40

2 Answers2

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.

Community
  • 1
  • 1
colymba
  • 2,654
  • 13
  • 15
0

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

Mc User
  • 23
  • 4