php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50777 mysql_connect timeout / server reset
Submitted: 2010-01-16 08:37 UTC Modified: 2010-08-12 00:44 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: magikman74 at gmail dot com Assigned:
Status: Duplicate Package: MySQL related
PHP Version: 5.3.1 OS: win32 only - Windows 7
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: magikman74 at gmail dot com
New email:
PHP Version: OS:

 

 [2010-01-16 08:37 UTC] magikman74 at gmail dot com
Description:
------------
I get the "The connection to the server was reset while the page was loading." error everytime I try to connect to mysql using Windows7. Just so you know I'm using the 32 bit version.

I've tried using both localhost and 127.0.0.1 to no avail. I've tried creating a user on mysql and I've tried using root as well, both failed.

It looks like the same issue as reported here: http://www.mail-archive.com/php-bugs@lists.php.net/msg131577.html

Unfortunately I'm unable to get it working.

Reproduce code:
---------------
The code located here reproduces the problem:
http://sg.php.net/manual/en/mysql.examples-basic.php


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-26 00:03 UTC] reddy1042001 at yahoo dot co dot in
I dont See any Error .iam able to connect succesfully  to the localhost and able to see the results.

reproduce code
---------------
<?php
// Connecting, selecting database
$link = mysql_connect('localhost', 'test', 'test')
    or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM test_values';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
    echo "\t<tr>\n";
    foreach ($line as $col_value) {
        echo "\t\t<td>$col_value</td>\n";
    }
    echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?> 
Actual output 
-------------
t1 10
t2 20
t3 30

Expected output 
---------------

t1 10 
t2 20 
t3 30
 [2010-08-12 00:44 UTC] kalle@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Feb 26 14:01:28 2020 UTC