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

Using $ in MySQL password fails


Reply


2 Posts   1666 Views

Avatar
Kevin Dean

1 Post

29 September 2007 at 6:06am

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.

Avatar
Matt

Core Development Team, 84 Posts

29 September 2007 at 8:09am

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.