Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Furgster

macrumors 6502
Original poster
Jun 16, 2007
260
1
i dont know if you guys have heard of that iphonechat program, well i got the source code and tried to upload it to my own php server but i have hit this roadblock with it, as soon as i get to the login in screen and try to get in it gives me this error:

Yay! I've signed in!
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /www/65gb.com/f/u/r/furgster/htdocs/im/app/global/functions.php on line 113
database connection failed
Warning: Cannot modify header information - headers already sent by (output started at /www/65gb.com/f/u/r/furgster/htdocs/im/app/interfaces/chat/login.php:13) in /www/65gb.com/f/u/r/furgster/htdocs/im/app/interfaces/chat/login.php on line 17

i go to that line in the functions.php file, but am not sure what to do, here is the code for that:

PHP:
function databaseConnect()
{
	if (!$GLOBALS["databaseIsConnected"]){
		$databaseConnectionPointer = mysql_connect($GLOBALS["databaseAddress"], $GLOBALS["databaseUsername"], $GLOBALS["databasePassword"]) or die('database connection failed');
		mysql_select_db($GLOBALS["databaseName"]) or die('database selection failed');
		$GLOBALS["databaseConnectionPointer"] = $databaseConnectionPointer;
		$GLOBALS["databaseIsConnected"] = true;
	}
}

any help at all why this doesnt work would be great
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.