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

Installation (problem with connecting DB)


Reply


4 Posts   1277 Views

Avatar
mbejda

Community Member, 1 Post

30 November 2007 at 9:45am

Edited: 30/11/2007 10:00pm

install.php hangs after "Building database schema...". I've written some debug and it seems the problem is somewhere there: (ManifestBuilder.php):

//echo "DB.. connecting.";
      DB::connect($databaseConfig);
//echo "DB connected";


However, it appears that connect() is not called: (model/DB.php)

static function connect($databaseConfig) {
echo "connect() called"; (...)


for nothing is printed.
DB on db4free.net . PHP version 5.2.4-1. Silverstripes build: 29.11.07.
Form in the beginning shows that everything is fine.

Thanks for any help.

Avatar
wifiman

Community Member, 20 Posts

7 September 2008 at 3:33pm

Did you ever solve this problem? I believe that I am seeing a similar issue. If you found a workaround, I would greatly appreciate hearing about it.

Avatar
Willr

Forum Moderator, 5513 Posts

7 September 2008 at 9:04pm

wifiman - rather then using the installer can you create the _config file yourself and enter the db details manually? All that the installer does is check server requirements, create an _config file, set the theme and create a .htaccess file.

Heres what the _config.php that the installer creates - http://doc.silverstripe.com/doku.php?id=recipes:example_config_file just create that yourself in the mysite/ folder and see if it connects that way

Avatar
wifiman

Community Member, 20 Posts

8 September 2008 at 5:59am

Thanks for the suggestion. It looks like there is something more problematic happening. I did find an _config.php file in the mysite folder, so I don't think that is the problem. Even still I've replaced it with the version that you suggested (of course I edited it to contain the details of the mysql DB for my web hosting account). Still I get the same fatal error as before.

Could this issue be something related to Omnis.com's settings on mod_rewrite perhaps? There's at least one other person who has mentioned an issue with Omnis, but there wasn't a resolution:

http://www.silverstripe.com/site-builders-forum/flat/56613?showPost=162574#post56613

I've also manually created a .htaccess file in the root of my Silverstripe installation with a variety of rewrite rules (I don't understand mod_rewrite very well, so this was just a guess too). That doesn't help either. If it matters, I've put in extra echo commands through the chain of calls to see exactly where the install.php stops. I find that I can get as far as :

   $conn = new $dbClass($databaseConfig);

in the function connect() in the file sapphire/core/model/DB.php. Apparently that's when the error occurs:

Fatal error: Class MySQLQuery cannot extend from interface Query in /mywebserver/www/silverstripe/sapphire/core/model/MySQLDatabase.php on line 452

I am not a knowledgeable enough in PHP to tell how to debug this issue further. Thoughts?