Re: [PHP-DB] MySQL + PHP on WinXP x64 = ??

[email protected] (Chris)
Newsgroups php.db
Message-ID <[email protected]>
YVES SUCAET wrote:
> Hi List,
> 
> I'm experiencing the problem as described at
> http://forums.mysql.com/read.php?37,39779,136287#msg-136287
> 
> I'm using the following script to test:
> 
> <?php
> $p = 0;
> $n = 0;
> for ($i = 0; $i < 120; $i++) {
> 	$conn = mysql_connect("www.myserver.org", "user", "secret");
> 	if ($conn) {
> 		echo "Success!\n";
> 		mysql_close($conn);
> 		$p++;
> 	} else {
> 		echo "Failed test $i\n";
> 		$n++;
> 	}
> 	sleep(1);
> }
> echo "\n$p successes, $n failures\n";
> ?>
> 
> Results are very unpredictable. E.g. out of 120 connection attempts, I'll have
> 114 successes and 6 failures.

Well to be honest my question would be why do you need 120 connections 
in one script?

> The solution that's mentioned is to enable connection pooling, yet since I'm
> using the x64 edition, that doesn't work for me.

Why doesn't it work for you? What package were you going to use for 
connection pooling? Is there an alternative package to try?

-- 
Postgresql & php tutorials
http://www.designmagick.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.