View Full Version : EQEmu\templates .html files don't work?
KodeKatt
05-04-2011, 05:32 AM
So, I tossed "C:\EQEmu\templates" to my htdocs folder and loaded up localhost/templates which results in failure. The php portion of them don't seem to function. Not on any server box I put it onto, the apache+php i setup myself, or the xampp on this system.
http://content.screencast.com/users/KodeKatt/folders/Jing/media/4a8d5c64-78c9-41fe-86e3-f1a4e2938dde/2011-05-04_0228.png
It looks really nifty and useful, but appears useless?
Is this a Work In Progress, or intended to be functional?
lerxst2112
05-04-2011, 05:43 AM
I could be wrong, but those might be for the HTTP service you can enable on your server:
<!-- Enable and set the port for the HTTP service. Defaults are shown -->
<http port="9080" enabled="true" mimefile="mime.types" />
trevius
05-04-2011, 06:55 AM
Yes that is exactly what it is for, and I don't think it has to be moved to work. Works fine for me without moving, anyway. You just go to localhost:9080 or whatever your URL is and the port you set in the config line posted by lerxst2112.
ChaosSlayerZ
05-04-2011, 12:50 PM
Trev, could you post some more details, or is there a guide how to use this thing? What exactly does it allows you to do?
lerxst2112
05-04-2011, 04:19 PM
Trev, could you post some more details, or is there a guide how to use this thing? What exactly does it allows you to do?
It's pretty easy to figure out. You enable it and connect to http://127.0.0.1:9080 or whatever your server address/port is while the server is running and you can see what it does.
KodeKatt
05-04-2011, 04:29 PM
It asks for a login, and I have no clue at all what info to provide it.
It's rejected: MySQL, Player Account, LoginServer account, default admin/password combinations.
lerxst2112
05-04-2011, 05:27 PM
It is looking for an account/password pair from the account table. If your account doesn't have a password assigned use something like this to set one:
UPDATE account SET PASSWORD=MD5("password") WHERE NAME="admin"
You also have to have a status of 100 or higher.
KodeKatt
05-04-2011, 06:22 PM
Missing password was the problem!
ChaosSlayerZ
05-04-2011, 07:19 PM
ah cool i got it
how update is this thing?
considering all the changes to Db sql over the years?
trevius
05-05-2011, 04:47 AM
It still has the full functionality that it always has. Some of the features in it were never fully implemented, but it still has uses. Works well for changing account status or looking at who is on and what zones are in use and such.
Bamzal
05-06-2011, 01:49 AM
I am having same problem as OP. the pages aren't loading properly. Also the only way I can access them is by launching the http files from the templates folder. If i try accessing via localhost:9080 I get page not found.
I am trying to figure out why when I start my server the HTTP service is disabled even though I have enabled="true"
From logs:
[05.05. - 19:19:57] [WORLD__INIT] HTTP world service disabled.
From eqemu_config.xml:
<http port="9080" enabled="true" mimefile="mime.types" />
lerxst2112
05-06-2011, 01:53 AM
Well, without seeing the rest of your config file it's hard to say anything else other than "you're doing it wrong." :)
Bamzal
05-06-2011, 02:07 AM
Is that the only point of failure? Looked fine to me.
Do I need Apache running, special configs, etc?
<?xml version="1.0"?>
<server>
<world>
<shortname>RallonZek</shortname>
<longname>Rallon Zek PvP (Alpha)</longname>
<!-- address has to be specified for minilogin to work -->
<address>74.216.88.139</address>
<localaddress>192.168.1.201</localaddress>
<!-- Loginserver information. -->
<loginserver>
<host>eqemulator.net</host>
<port>5998</port>
<account>********</account>
<password>**********</password>
</loginserver>
<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>**********</key>
<!-- Enable and set the port for the HTTP service. Defaults are shown -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>
<!-- Database configuration, replaces db.ini -->
<database>
<host>localhost</host>
<port>3306</port>
<username>*******</username>
<password>*********</password>
<db>********</db>
</database>
</server>
joligario
05-06-2011, 04:02 AM
Did you set up an alias in your httpd.conf file to point to the directory?
lerxst2112
05-06-2011, 06:54 PM
That config looks correct, but for whatever reason it isn't picking up the "enabled".
Your best bet is to debug it. The code that reads those values is near the end of EQEmuConfig::do_world.
The world server is the http server, you don't need Apache or any other configuration or aliases for it to work.
Bamzal
05-06-2011, 07:59 PM
Thanks for the help lerxst. Pretty sure that I found the issue.
WorldHTTPEnabled=false to begin with, and in the code to check, the logic is reversed so it I would have to fix the logic or else a workaround is to just set enabled to anything BUT true in the eqemu_config.xml :)
Original:
text = sub_ele->Attribute("enabled");
if (text && !strcasecmp(text,"true"))
WorldHTTPEnabled=true;
It was either designed to leave as false in the config file or else was recently modified incorrectly?
Changed to:
text = sub_ele->Attribute("enabled");
if (text && strcasecmp(text,"true"))
WorldHTTPEnabled=true;
Bamzal
05-06-2011, 08:04 PM
Looks like the same is done with the TELNET service also:
text = sub_ele->Attribute("telnet");
if (text && !strcasecmp(text,"enabled"))
TelnetEnabled=true;
Odd
lerxst2112
05-06-2011, 09:24 PM
You are reading the code incorrectly. The strcasecmp function returns 0 if the strings match.
http://linux.die.net/man/3/strcasecmp
Bamzal
05-08-2011, 03:29 AM
If thats the case then now I read it as:
if (text && !=0)
Then I would assume it should be:
text = sub_ele->Attribute("telnet");
if (text && strcasecmp(text,"enabled") == 0)
TelnetEnabled=true;
lerxst2112
05-08-2011, 07:05 PM
!strcasecmp(text,"enabled") and strcasecmp(text,"enabled") == 0 are the same thing.
Trust me, the way it is written now works just fine.
There's some reason your config isn't being read properly. My guess is you have more than one config file and you're changing the wrong one. If that is not the case, then adding some logging of the various attributes that are being read may shed some light on things.
Bamzal
05-13-2011, 01:41 AM
I added some code to debug, and everything suddenly started working as intended. Not sure what exactly changed but it's all good now. Thanks!
eqemu_config.xml
<http port="9080" enabled="true" mimefile="mime.types" />
EQEmuConfig::do_world
// Get the <http> element
sub_ele = ele->FirstChildElement("http");
if(sub_ele != NULL) {
cout << "\n(Hello 1 - Reading Fiile)\n";
text = sub_ele->Attribute("mimefile");
if (text)
WorldHTTPMimeFile=text;
text = sub_ele->Attribute("port");
if (text)
WorldHTTPPort=atoi(text);
text = sub_ele->Attribute("enabled");
if (text && !strcasecmp(text,"true")) {
cout << "\n(Hello 2 - Original if)\n";
WorldHTTPEnabled=true;
}
if (text && strcasecmp(text,"true") == 0) {
cout << "\n(Hello 3 - Modified But Same if)\n";
WorldHTTPEnabled=true;
}
}
Console
[Debug] [WORLD__INIT] Loading server configuration..
(Hello 1 - Reading Fiile)
(Hello 2 - Original if)
(Hello 3 - Modified But Same if)
lerxst2112
05-13-2011, 02:25 AM
If I had a dollar for every time something didn't work until I added a printf that didn't change anything but for whatever reason it started working I'd be at a strip club.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.