• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

AAC Znote: Wrong redirects, SQL errors and more

AngeloFuturo

Scan QR for free money.
Joined
Mar 29, 2008
Messages
77
Reaction score
6
Location
Who's asking?
I've never done this before, so I apologize for the noobish questions.

First, I receive this error on the bottom of my new website for the server:

Code:
Logged in as Admin: SQL queries executed:
Print: - Array
(
    [0] => [1.0169] SELECT `id`, `name`, `password`, `email`, `premdays` FROM `accounts` WHERE `id` = 1 LIMIT 1;
    [1] => [1.0172] SELECT `ip`, `created`, `points`, `cooldown`, `flag` FROM `znote_accounts` WHERE `account_id` = 1 LIMIT 1;
    [2] => [1.0204] SELECT `id`, `player_id` FROM `znote_forum_threads` WHERE `forum_id`='4' AND `closed`='0';
    [3] => [1.0211] SELECT `name`, `level`, `experience` FROM `players` WHERE `group_id` < 2 ORDER BY `experience` DESC LIMIT 5;
    [4] => [1.0223] SELECT COUNT(`player_id`) AS `value` FROM `players_online`;
    [5] => [1.0225] SELECT COUNT(`id`) AS `id` from `accounts`;
    [6] => [1.0228] SELECT COUNT('id') AS `id` FROM `players` WHERE `account_id`='1'
    [7] => [1.023] SELECT `p`.`id`, `p`.`name`, `p`.`level`, `p`.`vocation`, `p`.`town_id`, `p`.`lastlogin`, `gm`.`rank_id`, `po`.`player_id` AS `online` FROM `players` AS `p` LEFT JOIN `guild_membership` AS `gm` ON `p`.`id`=`gm`.`player_id` LEFT JOIN `players_online` AS `po` ON `p`.`id`=`po`.`player_id` WHERE `p`.`account_id`='1' ORDER BY `p`.`level` DESC
    [8] => [1.0235] SELECT `id`, `name`, `creationdata`, `motd`, (SELECT COUNT('guild_id') FROM `guild_membership` WHERE `guild_id`=`id`) AS `total` FROM `guilds` ORDER BY `name`;
    [9] => [1.0239] SELECT p.level FROM players AS p LEFT JOIN guild_membership AS gm ON gm.player_id = p.id WHERE gm.guild_id = '1' ORDER BY gm.rank_id, p.name;

And the other issue is that whenever I click on a forum thread, it redirects me to Znote Demo's website instead of my own. Same goes for when I check out any guild, shop, etc. Not with everything, but certainly with most things.

And the last issue I have is under "Server Information". It says exp rate 5x, even though I have enabled stages and uploaded stages.xml, all according to instruction.

Sorry for bombarding with questions, but I'm so close to releasing the server, these are the only issues I have!

Thanks in advance,
af
 
1. About first one - it's not a bug it's a feature! ;)

It's information seen only by you, when you are logged as page admin, that shows what MySQL queries has been done to the database on the specified page.

2. About "the other issue" - you need to change in your config.php this line:
Code:
$config['site_url'] = "http://demo.znote.eu";

To your domain.

3. Did you enable experienceStages in config.lua?
The other option is that you didn't populate the cache, which can be done by visiting the site: http://localhost/serverinfo.php?loadStages=1 with admin account.
 
1. About first one - it's not a bug it's a feature! ;)

It's information seen only by you, when you are logged as page admin, that shows what MySQL queries has been done to the database on the specified page.

2. About "the other issue" - you need to change in your config.php this line:
Code:
$config['site_url'] = "http://demo.znote.eu";

To your domain.

3. Did you enable experienceStages in config.lua?
The other option is that you didn't populate the cache, which can be done by visiting the site: http://localhost/serverinfo.php?loadStages=1 with admin account.

Haha oh man do I feel stupid. You know what a ridiculous amount of time I spent trying to figure out why there are SQL bugs at the bottom of the page? I dug into every file in the folder and every section of the MySQL database.

About #2: Yep, will look into that. It just felt weird that I can use most of my pages, but only some redirect me to the demo. But I guess that should fix it.

#3: Well I didn't enable experience stages in config.lua, but I enabled them in stages.xml because in config.lua it told me under the section "experience rates" that it won't use the official experience rate if I have stages enabled in stages.xml. I thought that enabling in stages.xml was all I had to do? (using TFS 1.2). But I'll see if I missed another enabling feature in config.lua as well.

Furthermore, I uploaded config.lua in the server information section of the website - and it's working fine. I then also uploaded stages.xml but it didn't do anything. It just kept the experience rate at 5. So I will first go ahead and try to enable experience stages in config.lua (though I'm pretty sure I didn't see the option in there) - but we'll see.

Now, LAST QUESTIONS, I promise: I have a good and stable OT going on. I have a strong computer and a good internet connection. The idea is to host the server myself. The questions are:

1. Is this something you would recommend? Self-hosting?
2. Tell me something about dedicated servers. Expensive/worth it, etc? Are they a better option?
3. My website is my IP. How do I turn it into a domain like www.servername.com?

Hope I'm not overloading you mate.

Cheers,
AF
 
Haha oh man do I feel stupid. You know what a ridiculous amount of time I spent trying to figure out why there are SQL bugs at the bottom of the page? I dug into every file in the folder and every section of the MySQL database.

About #2: Yep, will look into that. It just felt weird that I can use most of my pages, but only some redirect me to the demo. But I guess that should fix it.

#3: Well I didn't enable experience stages in config.lua, but I enabled them in stages.xml because in config.lua it told me under the section "experience rates" that it won't use the official experience rate if I have stages enabled in stages.xml. I thought that enabling in stages.xml was all I had to do? (using TFS 1.2). But I'll see if I missed another enabling feature in config.lua as well.

Furthermore, I uploaded config.lua in the server information section of the website - and it's working fine. I then also uploaded stages.xml but it didn't do anything. It just kept the experience rate at 5. So I will first go ahead and try to enable experience stages in config.lua (though I'm pretty sure I didn't see the option in there) - but we'll see.

Now, LAST QUESTIONS, I promise: I have a good and stable OT going on. I have a strong computer and a good internet connection. The idea is to host the server myself. The questions are:

1. Is this something you would recommend? Self-hosting?
2. Tell me something about dedicated servers. Expensive/worth it, etc? Are they a better option?
3. My website is my IP. How do I turn it into a domain like www.servername.com?

Hope I'm not overloading you mate.

Cheers,
AF

1. I will never recommend hosting at home. It is not cheap and you are risking being hacked and someone can steal your sensitive information like bank data if you login to the bank from the same computer.
Also it may be not optional to use same computer for your server and for private purposes. Computer may be also noisy in the night. But that's just my opinion, and everyone sees it differently. Depends how your budget look, if you have any donations and if you can afford a dedicated machine.

I would buy some dedicated from kimsufi.com and host there on some linux dístro, not windows. They are very cheap, starting from 5€ per month, but that's for 2 GB of RAM - not enough if you wish to host a real map.

2. Dedicated is always a better option IMO, but cheaper alternative is a VPS. There are many providers on the web.

3. You need to buy domain and redirect it to your IP. It'c called DNS and points your domain to the IP.
 
1. I will never recommend hosting at home. It is not cheap and you are risking being hacked and someone can steal your sensitive information like bank data if you login to the bank from the same computer.
Also it may be not optional to use same computer for your server and for private purposes. Computer may be also noisy in the night. But that's just my opinion, and everyone sees it differently. Depends how your budget look, if you have any donations and if you can afford a dedicated machine.

I would buy some dedicated from kimsufi.com and host there on some linux dístro, not windows. They are very cheap, starting from 5€ per month, but that's for 2 GB of RAM - not enough if you wish to host a real map.

2. Dedicated is always a better option IMO, but cheaper alternative is a VPS. There are many providers on the web.

3. You need to buy domain and redirect it to your IP. It'c called DNS and points your domain to the IP.

Perfect. All I needed. I'll look up guides to all those things and do it all as soon as possible.

You da man.
 
Back
Top