welshy123 Posted October 4, 2009 Share Posted October 4, 2009 Need Help On These Errors. The Errors Are All In Setup.php Thanks In Advance Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/mafiamur/public_html/setup.php on line 7 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 8 Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/mafiamur/public_html/setup.php on line 107 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mafiamur/public_html/setup.php on line 107 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 109 Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/mafiamur/public_html/setup.php on line 112 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mafiamur/public_html/setup.php on line 112 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 112 Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/mafiamur/public_html/setup.php on line 117 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mafiamur/public_html/setup.php on line 117 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 117 Warning: mysql_query() [function.mysql-query]: Access denied for user 'nobody'@'localhost' (using password: NO) in /home/mafiamur/public_html/setup.php on line 123 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/mafiamur/public_html/setup.php on line 123 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 123 <? include("conn.php"); //////Main Settings $result = mysql_query("Select * From settings",$connect); $row = mysql_fetch_array($result, MYSQL_BOTH); $sitename = $row['sitename']; $adminemail = $row['adminemail']; $adminpaypal = $row['adminpaypal']; $fullurl = $row['fullurl']; $domain = $row['domain']; $refpercent = $row['refpercent']; $refcredits = $row['refcredits']; $withdrawturns = $row['withdrawturns']; $depositturns = $row['depositturns']; $jackpotper = $row['jackpotper']; $crewbanktoggle = $row['cbank']; //Installation Check if (file_exists("install/index.php")) { echo "<html><body><script language=javascript1.1>alert('Please delete the Install dir!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>"; exit; } //Good ol' time $time=time(); //////UPLOAD SETTINGS $dir="../images/icons/$tru/"; $arr_allow_ex=array("gif","jpg","png"); $maxupload[sup] = '20000'; //supporter upload in bytes $maxupload[nor] = '15000'; //normal upload in bytes //////PRETTY SIMPLE, MAKE SURE URL LOCATIONS END WITH "/" $site[location] = $fullurl; ///SITE LOCATION $site[img] = '/images/'; ///SITE IMAGES //////DATABASE TABLES $tab[user] = 'users'; $tab[html] = 'html'; $tab[news] = 'news'; $tab[game] = 'games'; $tab[stat] = 'stats'; $tab[censor] = 'censors'; $tab[banned] = 'bans'; $tab[paypal] = 'paypal'; $tab[logs] = 'logs'; $tab[bannedip] = 'banned'; $tab[contracts] = 'contracts'; $tab[credits] = 'credits'; /////GAME DATABASE TABLES $tab[board] = "board"; $tab[clist] = "contacts"; $tab[city] = "city"; $tab[crew] = "crew"; $tab[crewr] = "crewr"; $tab[invite] = "invites"; $tab[mail] = "mailbox"; $tab[pimp] = "pimp"; $tab[revenge] = "revenges"; $tab[cron] = "cronjobs"; $tab[bank] = "bank"; $tab[forum_post] = "forum_post"; $tab[forum_postext] = "forum_postext"; $tab[forum_smile] = "forum_smile"; $tab[forum_topic] = "forum_topic"; $tab[market] = "blackmarket"; //Ban Check $userip=$_SERVER["REMOTE_ADDR"]; if (fetch("Select * from $tab[bannedip] where ip = '$userip';")) { echo "<html><body><script language=javascript1.1>alert('Your IP Address Was Banned!');</script><noscript>Your browser doesn't support JavaScript 1.1 or it's turned off in your browsers preferences.</noscript></body></html>"; exit; } if(($tru) && (!mysql_fetch_row(mysql_query("SELECT round FROM $tab[game] WHERE round='$tru' AND starts<$time AND ends>$time;")))) { header("Location: $site[location]play.php"); } if($tru){ $tab[board] = "r".$tru."_board"; $tab[clist] = "r".$tru."_contacts"; $tab[city] = "r".$tru."_city"; $tab[crew] = "r".$tru."_crew"; $tab[crewr] = "r".$tru."_crewr"; $tab[invite] = "r".$tru."_invites"; $tab[mail] = "r".$tru."_mailbox"; $tab[pimp] = "r".$tru."_$tab[pimp]"; $tab[revenge] = "r".$tru."_revenges"; $tab[cron] = "r".$tru."_cronjobs"; $tab[bank] = "r".$tru."_bank"; $tab[forum_post] = "r".$tru."_forum_post"; $tab[forum_postext] = "r".$tru."_forum_postext"; $tab[forum_smile] = "r".$tru."_forum_smile"; $tab[forum_topic] = "r".$tru."_forum_topic"; $tab[market] = "r".$tru."_blackmarket"; $tab[playervotes] = "r".$tru."_playervotes"; } //////CENSORS $getcensors = mysql_query("SELECT censor FROM $tab[censor];"); $censorwords = array(); While($censor = mysql_fetch_array($getcensors)) { array_push($censorwords, $censor[0]); } $id2 = mysql_fetch_array(mysql_query("SELECT id FROM $tab[user] WHERE code='$trupimpn';")); $id1=$id2[0]; //GRAB THEY MASTER AND GAME ID if($tru){ $id = mysql_fetch_array(mysql_query("SELECT id FROM $tab[pimp] WHERE code='$trupimpn';")); } else{ $id = mysql_fetch_array(mysql_query("SELECT id FROM $tab[user] WHERE code='$trupimp';")); } $id=$id[0]; //Jackpot Calculator $paypal = mysql_fetch_row(mysql_query("SELECT sum(amount), sum(fee) FROM $tab[paypal];")); $totalprofit=($paypal[0]-$paypal[1])/1; $jackpot = ($totalprofit*($jackpotper/100)); $forum_title = "Pimp Forums"; $itemperpage = 10; $tablewidth = 620; //minimum value is 600 $maxchar = 2000; //maximum character for every posting to avoid flooding $headercolor = "#999999"; $rowcolor1 = "#e5e5e5"; $rowcolor2 = "#f0f0f0"; $admheadercolor = "#999999"; $admrowcolor1 = "#e5e5e5"; $admrowcolor2 = "#f0f0f0"; ?> Link to comment https://forums.phpfreaks.com/topic/176456-mysql-errors/ Share on other sites More sharing options...
Mchl Posted October 4, 2009 Share Posted October 4, 2009 You have some problems connecting to database obviously. Check your conn.php script. Link to comment https://forums.phpfreaks.com/topic/176456-mysql-errors/#findComment-930133 Share on other sites More sharing options...
welshy123 Posted October 4, 2009 Author Share Posted October 4, 2009 hey m8 im just getting these 3 errors now. Thanks For The Connection Problem U pointed Me In the Wright Direction just these 3 errors now Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/mafiamur/public_html/setup.php on line 7 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mafiamur/public_html/setup.php on line 8 Warning: gethostbyaddr() [function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /home/mafiamur/public_html/signup.php on line 68 Link to comment https://forums.phpfreaks.com/topic/176456-mysql-errors/#findComment-930159 Share on other sites More sharing options...
Mark Baker Posted October 4, 2009 Share Posted October 4, 2009 in the line $result = mysql_query("Select * From settings",$connect); $connect isn't a valid connection. Simply remove it to $result = mysql_query("Select * From settings"); and the mysql driver will use the current active connection. Link to comment https://forums.phpfreaks.com/topic/176456-mysql-errors/#findComment-930172 Share on other sites More sharing options...
welshy123 Posted October 4, 2009 Author Share Posted October 4, 2009 Thanks M8 Thats Done The Job .. M8 I Just Send You A Private Msg. Let Me Know If You Can Help Link to comment https://forums.phpfreaks.com/topic/176456-mysql-errors/#findComment-930184 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.