Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Unable to install on hosted server - No Create DB rights

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 13946 Views
  • Glen
    Avatar
    Community Member
    10 Posts

    Unable to install on hosted server - No Create DB rights Link to this post

    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

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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.

  • Simon
    Avatar
    Core Development Team
    27 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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.

  • Glen
    Avatar
    Community Member
    10 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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
    .
    .
    .

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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

  • Sam
    Avatar
    Administrator
    679 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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.

  • Simon
    Avatar
    Core Development Team
    27 Posts

    Re: Unable to install on hosted server - No Create DB rights Link to this post

    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.

    13946 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.