php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19884 Functions close connections
Submitted: 2002-10-13 00:54 UTC Modified: 2002-10-13 09:09 UTC
From: darylm at magiasoftware dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.3 OS: FreeBSD && XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: darylm at magiasoftware dot com
New email:
PHP Version: OS:

 

 [2002-10-13 00:54 UTC] darylm at magiasoftware dot 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-10-13 01:35 UTC] 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 08:50 UTC] darylm at magiasoftware dot com
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.
 [2002-10-13 09:09 UTC] 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.


i don't think that counts as a script. you know, something that we could actually run. code, you know?

and:
1. no, don't paste your whole application here.
   isolate the problem to the lowest line count possible.
2. *no* echo "<html><pre><font>$foo</font></pre></html>" stuff if it's not required to make the bug show up;
   strip anrything that's not absolutely needed.
3. it needs to be *actual code*. just waving it like this makes it harder for the developers, and you're less likely to get a speedy fix.
4. *paste* the code here: "i made a typo when i was typing it in here coz i can't use clipboard" threads are wasting resources and have the same ill effect as the previous point. the PHP developers don't enjoy finding actual bugs buried in heaps of parse errors.

i hope that was explicit enough.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 01:01:30 2024 UTC