forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: AntonLargiader on May 13, 2012, 03:18:46 pm
-
I had changed a MySQL password and not updated the config file. When I went to the album home page, I was shown a "connection failed" error message which also repeated the complete error message from the server, which includes the user name. Something like "Server said, 'Connection failed for user XXX on database YYY.' "
I thought displaying MySQL error messages was a huge security risk. The general public doesn't need to know the username and database name, and the site admin already knows those things.
Where can I fix this? I bet these messages get displayed if the password server crashes, too, and maybe at other times.
-
the site admin already knows those things
Well, if you want to change that behavior, just edit the following line in include/init.inc.php:
die('<strong>Coppermine critical error</strong>:<br />Unable to connect to database !<br /><br />MySQL said: <strong>' . mysql_error() . '</strong>');