At some point earlier on it appears there were too many sql connections and the following was echo'd to screen for whomever was looking:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08004] [1040] Too many connections' in /dir/file.php:21
Stack trace:
#0 /dir/file.php(21): PDO->__construct('mysql:host=loca...', 'the user', 'password')
As you can see, it printed the username and password.
I'm new to PDO form of connecting to db, and I got into it because people told me my regular mysql_connect form was insecure. However by default, when mysql_connect ever had too any connections it never printed the username and password to the screen.
What a disaster.
How do I stop PDO from doing this if it error's out??
I'm using:
$dbh = new PDO('mysql:host=localhost;dbname=' . $db, $user, $pass);