Jump to content

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


SpeedyMods

Recommended Posts

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

?>

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.