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

Unable to install on hosted server - No Create DB rights


Go to End
Reply


10 Posts   14018 Views

Avatar
Glen

Community Member, 10 Posts

22 October 2006 at 3:52pm

Not sure if this is a feature request or bug...

I'm on Webdrive (www.webdrive.co.nz) and I can create databases through the web admin panel. The problem is that Silverstripe wants to create the database for me but I don't have the ability to do that. Othe CMS installs have the option of either getting the installer to create the DB or simply pointing the installer to an existing DB.

Any chance of getting this put in or is there a workaround?

Thanks,
Glen

Avatar
Sean

Forum Moderator, 922 Posts

22 October 2006 at 5:29pm

Hi Glen,

You can choose the database to use in '_config.php', in the <projectroot> directory. This is where you define what one it's using, and the username and password etc. After that (hopefully), you can then do a <projectroot>/db/build and it should create the first tables in your database.

Cheers,
Sean Harvey

Developer / SilverStripe

Avatar
Sam

Administrator, 685 Posts

24 October 2006 at 11:55am

Sean's right: SilverStripe will only attempt to create the database for you if it doesn't already exist. This isn't included as an explicit step in the installer, however - that's probably a good thing to add.

Avatar
Simon

Core Development Team, 27 Posts

24 October 2006 at 1:50pm

If for some reason <projectroot><projectname>_config.php does not exist,

The contents of the file should contain something like:
<?php

global $project;
$project = "<projectnname>";

$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "localhost",
   //windows "server" => "localhost:3307",
   "username" => "<username>",
   "password" => "<password>",
   "database" => "<dbname>",
);

Debug::sendLiveErrorsTo("<your email address>");
Security::setDefaultAdmin('<admin login>','<admin password>');

?>

The file should be created automatically by the installer.

Avatar
Glen

Community Member, 10 Posts

24 October 2006 at 3:26pm

OK, getting there...I'vemanaged to install on my local machine with admin rights but now if gives me an error when I go to http://localhost/ss/Security/login adn then enter some login details. I checked the mysql DB and it looks as though there is no users table.

FATAL ERROR: DataObject::buildSQL: Can't find data classes (classes linked to tables) for Member
At line 753 in C:\wamp\www\ss\sapphire\core\model\DataObject.php

user_error(DataObject::buildSQL: Can't find data classes (classes linked to tables) for Member,256)
user_error at line 753 of DataObject.php

DataObject->buildSQL(Email = 'admin' And Password = 'password',)
buildSQL at line 929 of DataObject.php
.
.
.

Avatar
Sean

Forum Moderator, 922 Posts

24 October 2006 at 4:58pm

Is this happening even after you do '<projectpath>/db/build' in your browser (to create the initial fields for the database) ?

Cheers,
Sean Harvey

Developer / SilverStripe

Avatar
Sam

Administrator, 685 Posts

24 October 2006 at 5:03pm

You probably want to visit /db/build?flush=1 or /Security/login?flush=1. SilverStripe keeps a cache of the database tables that exist and it sounds like this isn't been updated properly.

The default account, admin/password, is created when you first try and log in.

Avatar
Simon

Core Development Team, 27 Posts

25 October 2006 at 11:52am

Um, have you run the DB build first ?

(You might need to comment that line before you can run the db build) - It allows you administration access before the db / admin membership is setup.

Go to Top