Re: mysql_connect(...) = Not working. Where should I start?
Posted by:
Luth -
Date: April 07, 2006 01:36AM
Right. Good point, but still not the error in question. I changed the PHP function to:
//-------------------------------------------------------------
$command = array_shift($args);
$host = array_shift($args);
$user = array_shift($args);
$password = array_shift($args);
$link = mysql_connect($host, $user, $password);
Process($link, $command);
mysql_close($link);
function Process($link, $command) {
if($link == FALSE) {
echo("Failed to connect: " . mysql_error());
return 0;
}
}
//--------------------------------------------------------------
So it is indeed getting the proper $link (or at least a copy of it). When I access the page, same as before, it processes for around 30 seconds or so, then fails with the same message:
Failed to connect: Lost connection to MySQL server during query
So it seems that it is attemping to connect, and times out trying to connect. Yet I can take that same information and still connect via MySQL Query Browser. :-/ I'm so frustrated. Any ideas?