ID:               50777
 Comment by:       reddy1042001 at yahoo dot co dot in
 Reported By:      magikman74 at gmail dot com
 Status:           Open
 Bug Type:         MySQL related
 Operating System: win32 only - Windows 7
 PHP Version:      5.3.1
 New Comment:

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


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

[2010-01-16 08:37:09] 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/[email protected]/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



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


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

Reply via email to