Access denied for user 'arrestme'@'int.web2.vital.x10hosting.com'

Status
Not open for further replies.

arrestme11187

New Member
Messages
6
Reaction score
0
Points
0
Hi, I was thinking maybe someone could help me with this here, so I wouldn't have to bother the string of editors for this script.
I'm testing out a system for when people vote for/from my website, it gives their in-game account "vote points". With those vote points they can purchase from a list of items that i configure on my home mysql tables. The problem is I can't get passed the log in screen where it would take the user name and password and compare it with the list of users registered in the database. Once authorized, it should be taking me to the next screen. But right after i enter a correct username/password I get this error:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'arrestme'@'int.web2.vital.x10hosting.com' (using password: NO) in /home/arrestme/public_html/votes/libs/AccountData.class.php on line 55
The installation process started with me putting everything into /public_html/votes folder and then running http://originalaion.pcriot.com/votes/install/index.php. You can visit this site to see what you can do if you want. It asks for

Hostname:
Username: Password: Loginserver Database: Gameserver Database:
where I would put in my hostname: as my external IP, the username as a user I have privileges for on the DB, and the password as it's password. The loginserver DB/ gameserver DB i put as their corresponding database names.

When I press Submit, it correctly connects with my database and creates the new tables within each. It now does 2 things after this:
1.) creates a table I have to edit inside the gameserver DB looking like this:
id. name sqlhost sqluser sqlpass chardb
1 Aion Server myexternalip user password players

I've tried my external ip for the sqlhost, I've tried localhost, i tried 127.0.0.1. User/Pass is easy, i just assign the one i created access for to my DBs.

2.) It edits a config.php in /public_html/votes which looks like this:
Code:
//your loginserver database setting
define("Logindb_host","myexternal ip");
define("Logindb_user","DBuser");
define("Logindb_pass","DBpass");
define("Logindb","LS_DB");

//your gameserver database setting
define("Gamedb_host","myexternalip");
define("Gamedb_user","DBuser");
define("Gamedb_pass","DBPass");
define("Gamedb","GS_DB");
My SQL server is set up to receive remote connections, and during the installation it successfully connected to create the tables. So why, after putting in a DB username/pass do I keep getting an error that says it's trying to connect to my DB with the webspace username/webspaceaddress like it's trying to either access my webspace site, or the webspace site can't access my DB. But where do I config the username/pass that would connect to my home DB? I tried moving everything into my public_html, and giving countless permissions/usernames every which way, as you can see i'm completely lost on this one.

If anyone had the time to read this I not only applaud you, but implore you to respond if you had even an inkling of an idea. Thank you very much, and please don't take this as me complaining about you as a provider, I just sincerely thought this would be an excellent place to go for a question like this.

Thanks!
-Lloyd Marley

P.S. Line 55 of AccountData.class.php says this:
Code:
 AND name = '".mysql_real_escape_string($this->name)."'
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
mysql_real_escape_string can only be called if you are connected to the database. The error message seems to be saying that the script has not done that yet and that PHP is trying to connect to the DB using the defaults, which will not work.
 

arrestme11187

New Member
Messages
6
Reaction score
0
Points
0
any idea where I can change the default setting? I was sure I looked everywhere.
After the ls/gs db text in the config.php
it fills in the fields like this:
$conn = @mysql_connect(Gamedb_host, Gamedb_user, Gamedb_pass) or die(mysql_error());

also the beginning of the script up to Line 42 in Accountdata.class.php looks like:
Code:
<?php



class AccountData extends Factory{


	function AccountData()
	{
		$this->elem = array(
		"id" => null,
		"name" => null,
		"password" => null,
		"activated" => null,
		"access_level" => null,
		"membership" => null,
		"last_server" => null,
		"last_ip" => null,
                                    "reward_points" => null,
		);
	}



	function SelectById($id)
	{
		$sql = "SELECT id,
		               name,
		               password,
		               activated,
		               access_level,
		               membership,
		               last_server,
		               last_ip,
                                                   reward_points
		          FROM ".Logindb.".account_data
		         WHERE id = ".mysql_real_escape_string($id);

		return $this->PopulateObject($sql);
	}

	function FazerLogin()
	{
		$sql = "SELECT id,
		               name,
		               password,
		               activated,
		               access_level,
		               membership,
		               last_server,
		               last_ip,
                                                   reward_points
		          FROM ".Logindb.".account_data
				 WHERE activated = 1
				   AND name = '".mysql_real_escape_string($this->name)."'
				   AND password = '".mysql_real_escape_string($this->password)."'";
and all the accounts are activated, or "1".



:edit: I'll try and set the script to login to the db because maybe it's supposed to call config.php and its not yet.

---------- Post added at 01:37 AM ---------- Previous post was at 12:56 AM ----------

very strange...I added a db auth script at the beginning of Accountdata.class.php but, then i deleted it and reverted back to its original state.
But now I get this new error:
Code:
Warning: require_once(AccountData.class.php) [function.require-once]: failed to open stream: No such file or directory in /home/arrestme/public_html/votes/index.php on line 6

Fatal error: require_once() [function.require]: Failed opening required 'AccountData.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/arrestme/public_html/votes/index.php on line 6


---------- Post added at 02:46 AM ---------- Previous post was at 01:37 AM ----------

ok so this is obviously pretty complicated and no one wants to touch it. I did send an email to one guy I think created or helped create it.
Do you think if I host the server tables on x10hosting it will be better overall? Would it be more laggy for the player, or would there be no difference rly? I'd still run the server files on my computer, but i'll have it connect to my x10hosting sql db i create. Good idea? Yes ? No? Maybe So?
 
Last edited:
Status
Not open for further replies.
Top