#19884 [Bgs->Opn]: Functions close connections
| From: | darylm at magiasoftware dot com | Date: | Sun, 13 Oct 2002 13:50:52 +0000 |
| Subject: | #19884 [Bgs->Opn]: Functions close connections | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22286@lists.php.net to get a copy of this message | ||
ID: 19884
User updated by: darylm@magiasoftware.com
Reported By: darylm@magiasoftware.com
-Status: Bogus
+Status: Open
Bug Type: MySQL related
Operating System: FreeBSD && XP
PHP Version: 4.2.3
New Comment:
I open a connection to mysql ($conn) for use in my program. Then I
call a function (FuncName) that begins with the line (global $conn).
Even though there is no mysql_close($conn) statement when the function
returns I no longer have a mysql connection. This causes subsequent
database queries to return "mysql resource error". Therefore, it
appears as though the mysql connection is being closed by the function.
Previous Comments:
------------------------------------------------------------------------
[2002-10-13 01:35:36] cynic@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
------------------------------------------------------------------------
[2002-10-13 00:54:19] darylm@magiasoftware.com
I have many functions that use a mysql_result_resource that is declared
global (i.e. global $mysql_link). For some reason after a call to
those functions my mysql_connection disappears/is closed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19884&edit=1