don't use persistent connections in PHP

svn path=/trunk/boinc/; revision=1558
This commit is contained in:
David Anderson 2003-06-20 20:35:08 +00:00
parent 728c37d254
commit 242d40c75d
3 changed files with 19 additions and 3 deletions

View File

@ -4902,3 +4902,13 @@ Karl 2003/06/19
Makefile.am
boinc.py
version.py.in
David June 20 2003
- use mysql_connect() instead of mysql_pconnect() in PHP.
The latter caused failures in mysql_select_db(),
with "commands out of sync" error.
html_user/
db.inc
html_ops/
db.inc

View File

@ -1,12 +1,18 @@
<?php
function db_init() {
$retval = mysql_pconnect();
$retval = mysql_connect();
if (!$retval) {
echo "Unable to connect to database - please try again later";
exit();
}
$db_name = parse_config("<db_name>");
mysql_select_db($db_name);
if(!mysql_select_db($db_name)) {
echo "Unable to select database - please try again later";
exit();
}
return 0;
}
function lookup_user_auth($auth) {

View File

@ -4,7 +4,7 @@
// Presentation code (HTML) shouldn't be here
function db_init() {
$retval = mysql_pconnect();
$retval = mysql_connect();
if (!$retval) {
echo "Unable to connect to database - please try again later";
exit();