SpeedyMods Posted July 11, 2014 Share Posted July 11, 2014 Hello my website is displaying some errors that I have tried to fix but I can't seem to do so. Here is the errors that it is displaying: Warning: mysql_query() [function.mysql-query]: Access denied for user 'sendfree'@'localhost' (using password: NO) in /home4/sendfree/public_html/zippmail.net/script/state.php on line 16Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home4/sendfree/public_html/zippmail.net/script/state.php on line 16 I've checked the database and it is linked up with the right credentials so I don't know what it could be. This product is a purchased product and is named Alstrasoft Email Script and I contacted their support team but they never replied back, if someone could help me I would really appreciate it, thanks. Quote Link to comment Share on other sites More sharing options...
Psycho Posted July 11, 2014 Share Posted July 11, 2014 Where's the code from the file state.php? Please star out the password when you do. But, to me it looks like there isn't a connection made. If you post the code we can add some debugging logic to hopefully provide a better idea of the problem. Quote Link to comment Share on other sites More sharing options...
SpeedyMods Posted July 11, 2014 Author Share Posted July 11, 2014 Thanks for the reply and here the code from the state.php: <?php /* * Copyright (c) 2008 AlstraSoft -- http://www.alstrasoft.com * Author: AlstraSoft * * This script is the property of the author and may not be distributed in any way * without explicit permission from the author. * * */ ?><?php function InitializeState() { $query = "SELECT `key` FROM tbl_state"; $result = mysql_query($query); if (mysql_num_rows($result)==0) { $query = "INSERT INTO tbl_state (`key`,`timestamp`,`waiting`) VALUES('','0','0')"; if (!mysql_query($query)) echo "ERROR: ".mysql_error()."<BR>"; } } function GetStateVars() { InitializeState(); $query = "SELECT * FROM tbl_state"; $result = mysql_query($query); $row = mysql_fetch_array($result, MYSQL_ASSOC); return $row; } function GenerateNewKey() { $ret = ""; for($i=1;$i<=15;$i++) $ret=$ret.GenerateNewChar(); return $ret; } function ClearKey() { InitializeState(); $query = "UPDATE tbl_state SET `key` = ''"; if (!mysql_query($query)) echo "ERROR: ".mysql_error()."<BR>"; } function GetThreadKey() { $statevars = GetStateVars(); return $statevars["key"]; } function RegisterTimeStamp($key,$waiting = -1) { InitializeState(); if ($waiting==-1) { $query = "UPDATE tbl_state SET `key` = '".$key."', `timestamp` = '".time()."'"; } else { $query = "UPDATE tbl_state SET `key` = '".$key."', `timestamp` = '".time()."', `waiting` = '".$waiting."'"; } if (!mysql_query($query)) echo "ERROR: ".mysql_error()."<BR>"; } function GetWaiting() { $statevars = GetStateVars(); return $statevars["waiting"]; } function SetWaiting($waiting) { InitializeState(); $query = "UPDATE tbl_state SET `waiting` = '".$waiting."'"; if (!mysql_query($query)) echo "ERROR: ".mysql_error()."<BR>"; } function RegisterThread() { $ret = GenerateNewKey(); RegisterTimeStamp($ret,0); return $ret; } function ValidateThread($pop3 = null) { global $threadkey; global $threadspacer; if ($threadkey=="") return; if (time()==$threadspacer) return; $threadspacer = time(); $statevars = GetStateVars(); if ($threadkey!=$statevars["key"]) { if ($pop3!=null) $pop3->Close(); require("closedb.php"); exit; } else { RegisterTimeStamp($threadkey); } } function NeedToLaunchThread() { $statevars = GetStateVars(); if (($statevars["key"]=="")) return true; if ((time()-$statevars["timestamp"])>30) return true; SetWaiting(1); return false; } ?> Quote Link to comment Share on other sites More sharing options...
fastsol Posted July 11, 2014 Share Posted July 11, 2014 There's nothing in that code that has anything to do with connecting to the db. Taht code only holds queries to the db, not connecting to it. Quote Link to comment Share on other sites More sharing options...
SpeedyMods Posted July 11, 2014 Author Share Posted July 11, 2014 There's nothing in that code that has anything to do with connecting to the db. Taht code only holds queries to the db, not connecting to it. Yeah I also spotted that too, I couldn't find an sql file or a config file to connect to the database anywhere in the folder, so I guess i'll have to contact them again and ask for the config file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.