Warning: PDO::__construct(): MySQL server has gone away in /home/amirite/amirite/app/db.php on line 20

Warning: PDO::__construct(): Error while reading greeting packet. PID=24078 in /home/amirite/amirite/app/db.php on line 20

Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to database: SQLSTATE[HY000] [2006] MySQL server has gone away' in /home/amirite/amirite/app/db.php:32 Stack trace: #0 /home/amirite/amirite/app/db.php(44): DB::connect() #1 /home/amirite/amirite/app/users.php(60): DB::prepare('SELECT * FROM u...', Array, true) #2 /home/amirite/amirite/app/amirite.php(7880): users::getUser(false, 'Agent_Cody_Bank...') #3 /home/amirite/amirite/www/usersphotos.php(5): amirite->getUsersPhotos(Array) #4 {main} thrown in /home/amirite/amirite/app/db.php on line 32