mirror of https://github.com/BOINC/boinc.git
don't use persistent connections in PHP
svn path=/trunk/boinc/; revision=1558
This commit is contained in:
parent
728c37d254
commit
242d40c75d
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue