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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 12:01:46 2024 UTC