php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32898 lost connection error on non-standart (<>3306) port
Submitted: 2005-04-30 12:21 UTC Modified: 2005-05-08 01:00 UTC
Votes:3
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:0 (0.0%)
From: corinl at gmx dot de Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.0.4 OS: linux debian
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: corinl at gmx dot de
New email:
PHP Version: OS:

 

 [2005-04-30 12:21 UTC] corinl at gmx dot de
Description:
------------
using mysqli with a non-standart port, like 3307, it looses the database connection. i'm not sure if this happens only when using multiple instances of mysqli.

the mysql server is fine, it must be a php problem/bug!!

Reproduce code:
---------------
$a = new mysqli('127.0.0.1','test1','abc','test1',3307);
if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!");
printf("Host information: %s\n", $a->host_info);
$r = $a->query('SHOW TABLES');
while ($v=$r->fetch_assoc()) print_r($v);

$b = new mysqli('127.0.0.1','test2','abc','test2',3307);
if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!");
printf("Host information: %s\n", $b->host_info);
$r = $b->query('SHOW TABLES');
while ($v=$r->fetch_assoc()) print_r($v);

--

$a = new mysqli('127.0.0.1','test1','abc','test1',3306);
if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!");
printf("Host information: %s\n", $a->host_info);
$r = $a->query('SHOW TABLES');
while ($v=$r->fetch_assoc()) print_r($v);

$b = new mysqli('127.0.0.1','test2','abc','test2',3306);
if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!");
printf("Host information: %s\n", $b->host_info);
$r = $b->query('SHOW TABLES');
while ($v=$r->fetch_assoc()) print_r($v);


Expected result:
----------------
in both cases something like 

Host information: 127.0.0.1 via TCP/IP Array (...) Host information: 127.0.0.1 via TCP/IP Array (...)

Actual result:
--------------
Warning: mysqli::mysqli() [function.mysqli]: Lost connection to MySQL server during query in /test/mysqli.php on line 2
connect: failed with 'Lost connection to MySQL server during query'!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-30 12:58 UTC] sniper@php.net
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


 [2005-05-08 01:00 UTC] php-bugs at lists dot php dot net
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".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC