Tuss Posted June 1, 2008 Share Posted June 1, 2008 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 22 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 22 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 25 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 26 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 This is on the login page heres the coding. <?php session_start(); include_once"includes/db_connect.php"; if (strip_tags($_GET['logout']) == "yes"){ session_destroy(); }elseif (isset($_SESSION['username'])){ header("Location: logged_in.php"); exit(); } if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){ $username = addslashes(strip_tags($_POST['username'])); $password = addslashes(strip_tags($_POST['password'])); $ip = $REMOTE_ADDR; ///check INFO $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1' LIMIT 1"); $login_check = mysql_num_rows($sql); $inf = mysql_fetch_object($sql); if ($login_check == "0"){ $message="You could not be logged in"; }elseif ($login_check != "0"){ if ($login_check > "0"){ if ($inf->status == "Dead"){ include_once"dead.php"; exit(); } if ($inf->status == "Banned"){ $encoded=md5(strtolower($username)); header("Location: banned.php?banned=$username&encoded=$encoded"); exit(); } session_register('username'); $_SESSION['username'] = $inf->username; $timestamp = time()+60; mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'"); mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'"); header("Location: logged_in.php"); } else { $message= "You could not be logged in.<br />"; }}} $total_regged=mysql_num_rows(mysql_query("SELECT * FROM users")); $admins=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='2'")); $mods=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='1'")); $iti=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $most=$iti->online; ?> <link rel="stylesheet" href="includes/in.css" type="text/css"> <html> <style type="text/css"> body { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; font-variant: normal; color: #FFFFFF; background-color: #303030 ; } subtd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #666666; height: auto; width: auto; text-align: left; } maintd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #000000; background-position: center; height: auto; width: auto; text-align: center; } a:link { text-decoration: none; color: #33CCFF; font-weight: bold; } a:visited { text-decoration: none; color: #33CCFF; font-weight: bold; } a:active { text-decoration: none; color: #33CCFF; font-weight: bold; } a:hover { color: #FFFFFF; font-weight: bold; text-decoration: blink; }.warning { color: #FF0000; font-weight: bold; text-decoration: none; }.textbox { font-family: Verdana; font-size: 10px; color: #000000; background-color: #ffffff; border: none; } .table1px { border: 1px solid #000000; } .tabledbl { border: 2px double #FFFFFF; } .gradient { font-family: Verdana; font-size: 10px; font-style: normal; line-height: 30px; font-weight: bold; color: #FFFFFF; background-image: url(http://www.gangparadise.com/Images/tile_sub.gif); background-repeat: repeat-x; } .tableborder { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; padding: 5px; } .tableborder2 { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; background-image: url(includes/grad.gif); background-repeat: no-repeat; background-position: center top; padding: 5px; } .foot { border: 1px solid #000000; } </style> <head> <title>True Gangster:: Login Here!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body background="http://i111.photobucket.com/albums/n152/cl_bullet/background.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="center"> <form name="form1" method="post" action=""> <br> <table border="0" cellspacing="0" bordercolor="#000000"> <tr><td> <img src="tgi.jpg" width="999" height="98"></td> </tr> <tr><td><center><b><font color=#000000><b>Welcome, before you can officially enter True Gangster you will need to sign up by <a href=register.php><font color=red>registering</font></a>. If you are a returning member of True Gangster please login via the form below. <br> Enjoy playing the text-based mafia game please obey the rules suplied by the Admins <font color=orange>(Tuss)</font> or you will have to face the consequences.</b></font><br> </b> <br> </br> <br> </table> <table width="400" border="1" cellspacing="0" bordercolor="#000000" bgcolor="#00000" background='includes/grad.gif'> <center><tr> <br> <br> <td><center><b>Login To True Gangster</b></td> </tr> <tr> <td align="center" valign="top" bgcolor="#000000"><p class="style4"><br /> <font color=darkred size=5><b><center></center> </font></p> <p align="center" class="style4"><font color=darkred size=5><b></font><br /> Username: <input name="username" type="text" id="username" value="" size="30" maxlength="40" class="textbox"/> <br /> <br /> Password: <input name="password" type="password" id="password2" value="" size="30" maxlength="40"class="textbox" /> <br /> <br /> <input type="submit" name="Submit" value="Login" class="custombutton"/> </p> <a href=register.php><font color='1799ff'>Register</font></a> | <a href=lost.php><font color='1799ff'>Forgot Password</font></a> | <a href=faq.php><font color='1799ff'>FAQ</font></a><br /><br /> <center><font color="#ffffff"> Total Gangsters Online: <font color="#ffffff"><?php echo "$num"; ?></font><br /><br /> </div></td></tr> </table> </form> <!-- End ImageReady Slices --> </div> </body> </html> <html> <body> </body> </html> Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/ Share on other sites More sharing options...
BlueSkyIS Posted June 1, 2008 Share Posted June 1, 2008 http://www.w3schools.com/asp/default.asp Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/#findComment-554935 Share on other sites More sharing options...
xoligy Posted June 1, 2008 Share Posted June 1, 2008 Post reported you've been told by the mods before Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/#findComment-554939 Share on other sites More sharing options...
Tuss Posted June 1, 2008 Author Share Posted June 1, 2008 This is different need help on this part Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/#findComment-554941 Share on other sites More sharing options...
xoligy Posted June 1, 2008 Share Posted June 1, 2008 It was moved to the 3rd party forum because it's a 3rd party script. Please do not make multiple threads asking the same thing. Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/#findComment-554944 Share on other sites More sharing options...
Daniel0 Posted June 1, 2008 Share Posted June 1, 2008 Locked for the reasons stated by xoligy. This is different need help on this part Still the same issue as far as I can see. You're unable to connect. Link to comment https://forums.phpfreaks.com/topic/108255-warning-mysql_query-cant-connect-to-local-mysql-server-through-socket-va/#findComment-554978 Share on other sites More sharing options...
Recommended Posts