X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/6a4d93a5eaddb8eb766185621de1265af44f2559..c87a97890768b4427f078d7deda0d1edf4bb39ce:/cookbooks/donate/templates/default/db-connect.inc.php.erb diff --git a/cookbooks/donate/templates/default/db-connect.inc.php.erb b/cookbooks/donate/templates/default/db-connect.inc.php.erb index ce05bc99f..c4cea1f93 100644 --- a/cookbooks/donate/templates/default/db-connect.inc.php.erb +++ b/cookbooks/donate/templates/default/db-connect.inc.php.erb @@ -1,4 +1,8 @@ '); -mysql_select_db('donate', $_DB_H); -mysql_query('SET NAMES \'utf8\'', $_DB_H); +$_DB_H = new mysqli('localhost','donate','<%= @passwords['database'] %>','donate'); +if ($_DB_H->connect_errno) { + die('DB Connect Error: ' . $_DB_H->connect_errno); +} +$_DB_H->report_mode = MYSQLI_REPORT_ERROR; +$_DB_H->query('set @@sql_mode = \'\''); +$_DB_H->query('SET NAMES \'utf8\'');