Jump to content
MakeWebGames

User signup problem


Heather

Recommended Posts

Hi does anybody know what is causing this problem on the signup page

It was working fine up until a few days ago Not sure if this is to do with the ravens issues we have been having

 

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'xxx'@'localhost' (using password: NO) in /home/xxxxx/public_html/signup_popup.php on line 251

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /home/xxxxx/public_html/signup_popup.php on line 251

Link to comment
Share on other sites

Things to do

Check to see if mysql user password & connection password correspond.

Check if mysql user exists.

Check if user has permission on localhost/127.0.0.1. One user with permission on host "%" (all) won't work. You will need a user with permission over localhost/127.0.0.1.

Be sure page with mysql userinfo is included/required.

Do these all these even if you haven't recently changed anything because a malicious, unintentional, invalid, mis-interpreted query or code may have changed something. Raven may have added some code to make a change to your game that would make it not work if it detected that you changed one of its encoded files. Or it may have stored the mysql user info in the file you changed.

If they above does not fix the problem you probably will have to sniff it out by trial and error.

Check to see at what point (after db connection has been established) can you not run a query and at what point can run a query in that file. If there is no point you can run a query then it's probably a configuration error somewhere whether it be wrong user/pass/perms , no connection established, or any other possibilities I can't think of right now.

Link to comment
Share on other sites

Things to do

Check to see if mysql user password & connection password correspond.

Check if mysql user exists.

Check if user has permission on localhost/127.0.0.1. One user with permission on host "%" (all) won't work. You will need a user with permission over localhost/127.0.0.1.

Be sure page with mysql userinfo is included/required.

Do these all these even if you haven't recently changed anything because a malicious, unintentional, invalid, mis-interpreted query or code may have changed something. Raven may have added some code to make a change to your game that would make it not work if it detected that you changed one of its encoded files. Or it may have stored the mysql user info in the file you changed.

If they above does not fix the problem you probably will have to sniff it out by trial and error.

Check to see at what point (after db connection has been established) can you not run a query and at what point can run a query in that file. If there is no point you can run a query then it's probably a configuration error somewhere whether it be wrong user/pass/perms , no connection established, or any other possibilities I can't think of right now.

Thanks will go through all of those you sugested

Link to comment
Share on other sites

Simple error, edit your config.php file so it matches the username and password that you login to cpanel with.

Thanks Danny I dont want to put the cpanel login info in the config.php unless you meant the data base user and pass which I am now checking

 

signup_popup.php doesn't have access to the database.

Thanks

Link to comment
Share on other sites

Thanks Danny I dont want to put the cpanel login info in the config.php unless you meant the data base user and pass which I am now checking

It's advised to create a separate mysql user for each database to limit a possible security breach.

And yes, Danny is correct. The script is failing to execute said commands due to a lack of connectivity to the mysql service. Replacing the authentication values within the "config.php" file to accommodate your database user will rectify the problem.

The origin of the problem is most likely due to the switch over from R, you probably created a new database with separate authentication parameters.

This error would not have occurred if only a database was added, as the said function does not need connectivity to a specific database, but only to the mysql service.

Link to comment
Share on other sites

Thanks will go through all of those you sugested

Have gone through the top ones and its made no difference and i have also tried deleting the old user and adding a new one and changed it in config.php but still does not work . I am now wondering if it is also stored in the ravens licence.php because in core.php it calls for it and requires it but that is the only file which we dont have a de-crypted version off

Link to comment
Share on other sites

Have gone through the top ones and its made no difference and i have also tried deleting the old user and adding a new one and changed it in config.php but still does not work . I am now wondering if it is also stored in the ravens licence.php because in core.php it calls for it and requires it but that is the only file which we dont have a de-crypted version off

 

Decoded licence.php file below.

 

<?php

if(!file_exists("config.php"))

{

die("Configuration file not found !");

}

if(!file_exists("footer.php"))

{

die("Footer file not found !");

}

if(!file_exists("lfooter.php"))

{

die("Footer file not found !");

}

require "config.php";

?>

Link to comment
Share on other sites

Decoded licence.php file below.

 

<?php

if(!file_exists("config.php"))

{

die("Configuration file not found !");

}

if(!file_exists("footer.php"))

{

die("Footer file not found !");

}

if(!file_exists("lfooter.php"))

{

die("Footer file not found !");

}

require "config.php";

?>

Thank you :)

Link to comment
Share on other sites

Thanks for all of your help I think the problem is with the core and also our host changining the call up to ravens server to ours. This is what the host did when the homepage started to load up extremly slow when ravens site went offline

"Your script is making a call to an external server that is taking a very long time to respond: ravan.info.

There is also a file, that while only 14k, is taking a long time to process: /home/xxxx/public_html/core.php

This file seems to contain encrypted data that is taking awhile to process "

What they did to overcome this was

"I have added the following entry to your /xxx/hosts file:

50.22.91.149 ravan.info ww.ravan.info

This causes any calls to ravan.info to go to your server. Your site seems to be responding faster at this time, though I'd definitely work with the original developers on a better solution."

 

This fixed the loading issue and think caused the issue we have now.

The other thing which has also stopped working is the "Users online" "Reg Users" on the home page and this is also called up on the core.php

"// Users Online , Counts Users Online In Last 15 minutes

$q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC");

$online=$db->num_rows($q);

?>"

lol i am stumped now on how to fix this

Link to comment
Share on other sites

If anybody has a solution on editing anything on the core file (if its that which is causing it) please let me know I have pasted it below

<?php

session_start();

if(!file_exists("license.php"))

{

die("License Not Found !!");

}

require "license.php";

include "language.php";

if (filesize("config.php") <= 150)

{

header("Location: install.php");

}

global $_CONFIG;

define("MONO_ON", 1);

require "class/class_db_{$_CONFIG['driver']}.php";

$db=new database;

$db->configure($_CONFIG['hostname'],

$_CONFIG['username'],

$_CONFIG['password'],

$_CONFIG['database'],

$_CONFIG['persistent']);

$db->connect();

$c=$db->connection_id;

$set=array();

$settq=$db->query("SELECT * FROM settings");

while($r=$db->fetch_row($settq))

{

$set[$r['conf_name']]=$r['conf_value'];

}

$q=$db->query("SELECT userid FROM users");

$membs=$db->num_rows($q);

$q=$db->query("SELECT userid FROM users WHERE bankmoney>-1");

$banks=$db->num_rows($q);

$q=$db->query("SELECT userid FROM users WHERE gender='Male'");

$male=$db->num_rows($q);

$q=$db->query("SELECT userid FROM users WHERE gender='Female'");

$fem=$db->num_rows($q);

$total=0;

// Users Online , Counts Users Online In Last 15 minutes

$q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC");

$online=$db->num_rows($q);

?>

Link to comment
Share on other sites

ah now im getting this

Fatal error: Call to a member function configure() on a non-object in /home/xxxx/public_html/core.php on line 18

and on line 18 is this

$db->configure($_CONFIG['hostname'],

Any other errors?

The script is looking for something that isn't there, in this case, the $db variable that isn't being initialized as a object.

It might be a missing $_CONFIG['driver'] variable.

I've taken the courtesy of introducing it to the script you posted above, let us know if it works.

<?php

session_start();
if(!file_exists("license.php"))
{
die("License Not Found !!");
}
require "license.php";
include "language.php";
if (filesize("config.php") <= 150)
{
header("Location: install.php");
}
global $_CONFIG;
define("MONO_ON", 1);

// here's the edit
if (!file_exists('class/class_db_' . $_CONFIG['driver'] . '.php')) require('class/class_db_mysql.php');
else exit('Configuration file could NOT be loaded!');
// end edit

$db=new database;
$db->configure($_CONFIG['hostname'],
$_CONFIG['username'],
$_CONFIG['password'],
$_CONFIG['database'],
$_CONFIG['persistent']);
$db->connect();
$c=$db->connection_id;
$set=array();
$settq=$db->query("SELECT * FROM settings");
while($r=$db->fetch_row($settq))
{
$set[$r['conf_name']]=$r['conf_value'];
}
$q=$db->query("SELECT userid FROM users");
$membs=$db->num_rows($q);
$q=$db->query("SELECT userid FROM users WHERE bankmoney>-1");
$banks=$db->num_rows($q);
$q=$db->query("SELECT userid FROM users WHERE gender='Male'");
$male=$db->num_rows($q);
$q=$db->query("SELECT userid FROM users WHERE gender='Female'");
$fem=$db->num_rows($q);
$total=0;
// Users Online , Counts Users Online In Last 15 minutes 
$q=$db->query("SELECT * FROM users WHERE laston>unix_timestamp()-15*60 ORDER BY laston DESC");
$online=$db->num_rows($q);

?>
Link to comment
Share on other sites

Any other errors?

The script is looking for something that isn't there, in this case, the $db variable that isn't being initialized as a object.

It might be a missing $_CONFIG['driver'] variable.

I've taken the courtesy of introducing it to the script you posted above, let us know if it works.

 

Hi thanks for doing that

Ohhh yes lol it is now fixed and working correctly

A very big thank you to all that have helped on the forum you have all been a great help

Thank you :)

Edited by Heather
Link to comment
Share on other sites

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.   Paste as plain text instead

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