ID:               30254
 Updated by:       php-bugs@lists.php.net
 Reported By:      mave at clanteamtreff dot com
-Status:           Feedback
+Status:           No Feedback
 Bug Type:         MySQL related
 Operating System: Debian 3.0 r2  kernel 2.6.7
 PHP Version:      5.0.1
 New Comment:

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".


Previous Comments:
------------------------------------------------------------------------

[2005-02-12 22:45:19] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip

Please provide a short but complete reproduce script if you still
expirience this issue.

------------------------------------------------------------------------

[2004-10-02 14:58:58] mave at clanteamtreff dot com

im currently develope some new interfaces, the problem i told with
problems on ftp_close() can reproduced with all socket connections. 
This mean, my SQL Connection gets lost if any command closes a socket
connection.

I connect to sql server ( mysql_connect(...) )
then i want to use file_get_contents with fopen wrappers from an
ftpserver. 
The File read from the ftp server is sucessfully, but after that
command, the mysql connection is lost.

All the Commands i have testet with using sockets or something like
this, kills the mysql connection.

If there are any questitions, just ask.
(Sorry for my bad english, i hope you understand all)

------------------------------------------------------------------------

[2004-09-27 12:51:37] mave at clanteamtreff dot com

Description:
------------
currently i use a MySQL Class to handle the Connection to the Database.
No i wrote a litte FTP tool, to get a logfile from an other server.

After the command ftp_close my MySQL Connection is broken, he tells me,
MySQL Connection lost during Query or Connection to MySQL lost,
reconnecting.

If i deactivate the ftp_close command, the whole page runns perfectly.
I think there is a problem with handling the resources.

I use the XAMPP Linux 1.4.8 from www.apachefriends.org.

Reproduce code:
---------------
$handle = ftp_connect(gethostbyname("localhost"), 21);
$res = ftp_login( $handle, $login, $pass);
if( !$res ) echo "Can't login to FTP";

$f_name = "/tmp/FTP-TMP.".randomstring(20);

$file = fopen( $f_name, "w+" );
if( !$file ) echo "Can't fopen the File";

ftp_fget( $handle, $file, "lastout.txt", FTP_ASCII);

... 
$kontent = writemessage($out);  // Produce the output

fclose($file);
ftp_close($handle);             // clean up
unlink($f_name);                // clean up


Expected result:
----------------
Output from the MySQL Class:
[MySQL]: Verbindung zum Host verloren, neuaufbau der Verbindung
(that means connection lost, reconnecting)

And the rest of the Page can't connect to the mysql server.

after i remove the "ftp_close($handle);" line, it works fine.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30254&edit=1

Reply via email to