X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/da9a7a4c59377d9c45e028d0fecf6296889011e6..3720032b9487e8cdd89eed9461ddeeac2c3cd764:/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 b2d2a6f5e..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\'');