Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Using $ in MySQL password fails

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: 1627 Views
  • Kevin Dean
    Avatar
    1 Post

    Using $ in MySQL password fails Link to this post

    Using SVN (Pulled 17:30 28 Sept 2007 GMT) and 2.1.0-rc releases, I've discovered that using the $ symbol in a MySQL password causes the install to fail.

    Errors indicated that (despite passing the first stage check) the password was not being submitted when mysql_connect was being called.

    xera1 on #silverstripe recommended changing the following (line 591 in install.php):

       "password" => "{$config['mysql']['password']}",

    to

       "password" => '{$config['mysql']['password']}',

    This corrected the problem.

  • Matt
    Avatar
    Core Development Team
    84 Posts

    Re: Using $ in MySQL password fails Link to this post

    Thanks for that hint Kevin - the reason for it is that inside "double-quoted strings", PHP assumes the $ sign precedes a variable name, so will try to find that variable name and substitute it in. Inside 'single-quoted strings', it will treat the $ sign as a literal $ sign, and not substitute it with anything.

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