note 46663 added to function.mysql-connect

From: Date: Tue, 19 Oct 2004 16:32:44 +0000
Subject: note 46663 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-78770@lists.php.net to get a copy of this message
Perhaps someone can explain and help me with an error I am recieving. I have a page which displays six images at a time, where each image is dynamically generated, requiring a call to the DB. Browsing across too many images, however, I get a connect error: Warning: mysql_connect(): Too many connections in /home/httpd/vhosts/mozaiq.org/httpdocs/devel/include.inc on line 12 I was under the impression that links to the db were automatically closed upon script completion. If I only have 6 or 7 seven images loading on each page, I should not be seeing this error, correct? I would think that the links would close and be available for use the next time they are needed. The call is pretty straight forward: $db = mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db ($dbname, $db); ---- Manual Page -- http://www.php.net/manual/en/function.mysql-connect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46663 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes&reason=bad+code Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes&reason=spam Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes&reason=useless+example Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes&reason=contains+commercial+links Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46663&report=yes&reason=useless+note Reject -- http://master.php.net/manage/user-notes.php?action=reject+46663&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78770) next »