Page 2 of 2

Posted: Thu Jul 05, 2007 4:11 pm
by Rupo
test-script

Code: Select all

error_reporting(E_ALL|E_STRICT);
define('host','xxx');
define('user','xxxx');
define('pass','xxx');
define('name','xxx');

$db=mysql_connect(host, user, pass);
mysql_select_db(name, $db) or die(mysql_error());

$sql="SELECT * FROM NEWS";
$result=mysql_query($sql,$db);
$return=mysql_fetch_array($result);
print_r($return);
echo '<br>';
echo phpversion();
causes the following error
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /var/www/web2/html/test.php on line 8

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/web2/html/test.php on line 9
Lost connection to MySQL server during query
to my opinion, there definitely no connection

Posted: Thu Jul 05, 2007 6:25 pm
by superdezign
So... It verifies your credentials, but then "loses" the connection? Yeah, that's extremely odd. I'd speak to the host about their database and get them to PROVE that it's something wrong on your end.