From: sivalsm at yahoo dot com Operating system: Linux PHP version: 5.0.1 PHP Bug Type: *Database Functions Bug description: How can we test mysql connection is already established or not?
Description: ------------ I think it will be great, if we had a database function to check whether database connection is already exist or not for a particular session. Naturally we are using a common php file to connect to database and we are inclusing the file in every script.Anyway database connection will lost after completing the execution of the script.But we need to connect database again and again. If there is a database function like mysql_isconnected, to check whether database connection is already established or not...that will be helpful. Expected result: ---------------- We can use mysql_pconnect to maintain persistancy in database connections.But it will take server resources to maintain persistancy.So if there is a seperate mechanism to check the database connection it will be better. -- Edit bug report at http://bugs.php.net/?id=29645&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29645&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29645&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29645&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29645&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29645&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29645&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29645&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29645&r=support Expected behavior: http://bugs.php.net/fix.php?id=29645&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29645&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29645&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29645&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29645&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29645&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29645&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29645&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29645&r=float