web: don't use persistent connections with mysqli

I recently changed the web code to use the PHP mysqli interface if available.
I noticed that it often get "can't connect - too many connections" errors,
even on small projects.
This is probably due to the use of persistent connections, so I took that out.
This commit is contained in:
David Anderson 2014-10-21 22:12:03 -07:00
parent d1b2c57c37
commit ae1b16914f
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ class DbConn {
} else {
$port = null;
}
if (version_compare(PHP_VERSION, '5.3.0') < 0) {
//if (version_compare(PHP_VERSION, '5.3.0') < 0) {
if (1) { // don't use persistent connections for now
$this->db_conn = new mysqli($host, $user, $passwd, $name, $port);
} else {
$this->db_conn = new mysqli("p:".$host, $user, $passwd, $name, $port);