|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-27 18:46 UTC] iliaa@php.net
[2004-10-27 18:56 UTC] it at videinfra dot lv
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
Description: ------------ We met the same problem recently, when we developed a project running on Win2003. We got cannot connect error when we tested server's productivity. We used Apache JMeter to simulate 10 concurrent connections. Initially, we thought that it is because of big amount of queries we run at the first page. To make sure this is not because of the number of queries, we created simple PHP script that creates connection to MySQL, runs simple query like SELECT title FROM pages WHERE id = 1 and closes connection. The result was the same. We moved the script and MySQL to a Linux server and repeated the test. We did not get the error. We repeated the test with PHP on windows and MySQL on Linux and the error came again. So, when we run PHP script on windows platform, we got the error everytime irrespective MySQL location. Reproduce code: --------------- <? $t1 = time(); $conn = mysql_connect ( '10.0.1.4', 'root', '') or die("Could not connect: " . mysql_error()); mysql_select_db('lub2', $conn); $res = mysql_query("SELECT title FROM pages_lv0 WHERE id = 1", $conn) or die("Invalid query: " . mysql_error()); mysql_close($conn); $t2 = time(); echo $t2 - $t1 . "<br />"; ?>