Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Database Contains Dashes

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

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

Page: 1
Go to End
Author Topic: 2355 Views
  • mondy
    Avatar
    10 Posts

    Database Contains Dashes Link to this post

    I have created a database for my SS installation, but my host's server creates my domain as follows...

    mydomain_net_-_ss

    I cannot change anything before the ss, as that is pre-determined by the server. no matter what I type for the database name, the server populates this mydomain_net_-_ and then whatever I type in as the database name.

    The problem is when I get to the SS install page and enter the database name, the dash between the underscores disappears and then it tells me that the database does not match. It looks like this after I click on "Re-Check Requirements" - mydomain_net__ss

    It seems that SS does not recognize dashes and my host server or MySQL host creates databases with dashes. Does anyone know how I can work around this?

  • mondy
    Avatar
    10 Posts

    Re: Database Contains Dashes Link to this post

    Nevermind. I figured it out with the help of Simon. Thanks, Simon!

  • Morello
    Avatar
    Community Member
    2 Posts

    Re: Database Contains Dashes Link to this post

    Would you care to share how you solved this issue as I have the same problem?

    Thank you

  • Morello
    Avatar
    Community Member
    2 Posts

    Re: Database Contains Dashes Link to this post

    Never mind.

    I "fixed" it by hardcoding the database name into the install.php file in the section beginning at line 12:

    // Load database config
    if(isset($_REQUEST['mysql'])) {
       $databaseConfig = $_REQUEST['mysql'];
    } else {
       $databaseConfig = array(
          "server" => "localhost",
          "username" => "root",
          "password" => "",
          "database" => "databasenamewithdashes--------here",
       );
    }

    2355 Views
Page: 1
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.