Jump to content


Photo

My website is displaying an error that I need some help on


  • Please log in to reply
4 replies to this topic

#1 SpeedyMods

SpeedyMods

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 11 July 2014 - 05:11 PM

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 16

Warning: 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. 



#2 Psycho

Psycho

    Advanced Member

  • Gurus
  • 10,744 posts
  • LocationCanada

Posted 11 July 2014 - 05:21 PM

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.


The quality of the responses received is directly proportional to the quality of the question asked.

I do not always test the code I provide, so there may be some syntax errors. In 99% of all cases I found the solution to your problem here: http://www.php.net

#3 SpeedyMods

SpeedyMods

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 11 July 2014 - 05:41 PM

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;
}

?>



#4 fastsol

fastsol

    Advanced Member

  • Members
  • PipPipPip
  • 491 posts
  • LocationMinnesota

Posted 11 July 2014 - 05:58 PM

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.


You never know everything, I learn everday!

http://amecms.com

http://amewebdesigns.com


#5 SpeedyMods

SpeedyMods

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 11 July 2014 - 06:01 PM

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 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com