View Full Version : not sure what to do

Jun 21, 2007, 09:39 PM
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:

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

Jun 30, 2007, 07:53 PM
Have you set up the MySQL database properly?