View Single Post
Old 06-19-2005, 07:14 PM  
rickholio
Confirmed User
 
Industry Role:
Join Date: Jan 2004
Location: Nor'easterland
Posts: 1,914
Quote:
Originally Posted by V_RocKs
mysql_close($db); as the last line in your sql using php files. (assuming $db is the value assigned to the connection when you opened it).
PHP auto-closes SQL connections after page execution unless persistent connections are requested. It wouldn't fix the problem: if PHP is fine, nothing's been accomplished... if PHP or apache is acting funny, then it just obscures the problem without fixing it. Indeed, if you mysql_close() a shared connection, you might blow other things up. You're better off letting the resource reclaimation happen automatically in this case.

This all assumes that PHP is being used. For all we know it's JDBC, DBD::Mysql or an ODBC connection from a windows box running apache...
__________________
~
rickholio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote