|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 20:00:01 2025 UTC |
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