
gbjames
Posts: 1
|
| Posted: 05/20/2010, 9:48 AM |
|
I decided to change my hosting server for my website to a godaddy.com . So, why hosting it again in another server I got this error:
Database error: pconnect(mysql4.freehostia.com, robhan3_1, $DBPassword) failed. MySQL Error: 0 () Session halted. this error was on line 99:
this is the actual code:
/* establish connection, select database */
if (!$this->Connected) {
$this->Query_ID = 0;
if($this->Persistent)
$this->Link_ID=mysql_pconnect($DBHost, $DBUser, $DBPassword);
else
$this->Link_ID=mysql_connect($DBHost, $DBUser, $DBPassword);
if (!$this->Link_ID) {
$this->halt("pconnect($DBHost, $DBUser, \$DBPassword) failed.");
return 0;
}
if (!@mysql_select_db($DBDatabase,$this->Link_ID)) {
$this->halt("cannot use database ".$this->DBDatabase);
return 0;
}
$this->Connected = true;
}
return $this->Link_ID;
}
Even when I tried to use the previous server: mysql4.freehostia.com it brough this same error. Please help me out.
I can paste the full code if you need.
_________________
Curios to to know how |
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 05/20/2010, 4:12 PM |
|
gbjames,
Do you have a script that can test the database connection (Try this link: http://www.ardamis.com/2008/05/26/a-php-script-for-test...ase-connection/ )?? Try this and let me know if it works for you.
|
 |
 |
|

|
|
|
|