Connection to database not possible if password contains $

I encountered a strange bug:
After I changed my database password to "ps*nq$TsUbxaJyit" I got this error during setup:
Access denied for user 'xxx'@'xxx' (using password: YES)

In the setup.log I found the following message:
NOTICE: Undefined variable: TsUbxaJyit in /var/www/xxx/html/fotos/zp-data/zenphoto.cfg.php in Zeile 30
require called from index.php [755]

Apparently the $ caused Zenphoto to interpret a part of the password as a variable. So just a part of the password was used to login to MySQL.

Comments

  • acrylian Administrator, Developer
    That's probably because the config file is actually "sort of parsed" and not just included as plain php file so it probably just mistakes that as a variable. See the root index.php.
Sign In or Register to comment.