Uncaught PDOException: PDO::__construct(): MySQL server has gone away in C:\\xampp\\htdocs\\Gibbon\\src\\

Please I need assistance on how to resolve the error above
Warning: Uncaught PDOException: PDO::__construct(): MySQL server has gone away in C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php:45 Stack trace: #0 C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php(45): PDO->__construct(‘mysql:host=loca…’, ‘root’, ‘root’) #1 C:\xampp\htdocs\Gibbon\installer\install.php(296): Gibbon\Database\MySqlConnector->connect(Array) #2 {main} Next PDOException: SQLSTATE[HY000] [2006] MySQL server has gone away in C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php:45 Stack trace: #0 C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php(45): PDO->__construct(‘mysql:host=loca…’, ‘', '’) #1 C:\xampp\htdocs\Gibbon\installer\install.php(296): Gibbon\Database\MySqlConnector->connect(Array) #2 {main} thrown in C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php on line 45

Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\Gibbon\src\Database\MySqlConnector.php on line 51

Hi Nocus,

Whereabouts are you seeing this in Gibbon, on every page or just a specific page? An execution time of 30 seconds seems like a pretty long response time, looks like there’s a few different reasons this could occur: https://dev.mysql.com/doc/refman/8.0/en/gone-away.html

It sounds like a common solution is to adjust the default connection timeout values: https://stackoverflow.com/questions/1644432/mysql-server-has-gone-away-in-exactly-60-seconds These could be changed in the php.ini file (+ restart the server), or added as ini_set() values to the bottom of Gibbons config.php

If it only happens on long-running queries, like the reports or query builder, this may help. Otherwise if it happens on every page there may be something more to the problem, somewhere in the server setup.

Please can some assist me Please…

Hi Nocus,

Whereabouts are you seeing this in Gibbon, on every page or just a specific page? An execution time of 30 seconds seems like a pretty long response time, looks like there’s a few different reasons this could occur: https://dev.mysql.com/doc/refman/8.0/en/gone-away.html

It sounds like a common solution is to adjust the default connection timeout values: https://stackoverflow.com/questions/1644432/mysql-server-has-gone-away-in-exactly-60-seconds These could be changed in the php.ini file (+ restart the server), or added as ini_set() values to the bottom of Gibbons config.php

If it only happens on long-running queries, like the reports or query builder, this may help. Otherwise if it happens on every page there may be something more to the problem, somewhere in the server setup.


It happens on the 3 page of installation

It occurs happens on the 3rd page of installation

Are you selecting to include the demo date on the second stage, or installing without the demo?

Yes I am

OK, can you try and install without demo data, and if that works, you can then run /gibbon_demo.sql directly on your database to include the demo data. By breaking it down into two steps we’ll hopefully learn more. Thanks! Ross.

I did both way of installation and still get same error as above. Does have anything to do with my version of xamp and MySQL?

I guess it is a restriction on the resources available to MySQL, and so possibly XAMP specific. Did you follow the advice offered by Sandra above? Thanks!

I followed both suggestion.

It could be a XAMP issue, but I still reckon it is related to MySQL. You could do a test by reducing the size of gibbon.sql (e.g. delete everything except the first 10 statements) and then run the installer again. You’ll get a broken install of Gibbon, but it would be revealing to see if this particular error goes away. If it does, it suggests a MySQL resource issue. Ross