ZenphotoCMS Forum
Connection to database not possible if password contains $ - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Connection to database not possible if password contains $ (/thread-12620.html)



Connection to database not possible if password contains $ - johnnny83 - 2016-11-08

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.




Connection to database not possible if password contains $ - acrylian - 2016-11-08

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.