From 6f360bc53629beed972cd8a96f586285769e59cc Mon Sep 17 00:00:00 2001 From: "Bradley W. Dutton" Date: Sun, 29 Mar 2020 13:09:43 -0700 Subject: [PATCH] add check if mysql module is configured but not installed. This is catching people who upgrade to PHP7 --- .../gallery/libraries/MY_Database_Mysql.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 modules/gallery/libraries/MY_Database_Mysql.php diff --git a/modules/gallery/libraries/MY_Database_Mysql.php b/modules/gallery/libraries/MY_Database_Mysql.php new file mode 100644 index 00000000..22e3ab85 --- /dev/null +++ b/modules/gallery/libraries/MY_Database_Mysql.php @@ -0,0 +1,35 @@ +connection) + return; + + if (!function_exists('mysql_connect')) { + $msg = 'You configured your DB to use the "mysql" module but the PHP mysql module doesn\'t appear to be installed. If you are upgrading to PHP 7 you should update var/database.php to use the mysqli module instead of mysql.'; + print $msg; + throw new Kohana_Exception($msg); + } + + return parent::connect(); + } +}