PDA

View Full Version : Minilogin to public server? (i'll settle for the minilogin source code)


Aerewen
12-13-2006, 08:41 AM
Anyone know if it's possible to swap minilogin to a public system that compares userid/pass instead of just looking at the IP address?

I've searched all through these forums and all i can find is posts to the extent of

"change minilogin to public in the SQL variables table"

which doesnt do didly :P

at least not for what i'm trying to do... I don't want to use the eqemulator.net public login server... i'd like to have my own login server where i can have free reign to create usernames and passwords for the player's accounts.

problem is it doesnt seem like there is a way to do this using the loginserver.ini file or the server xml file... and i cant find source code for the minilogin.exe anywhere

if someone has source code for the newest release (6.2 i think?) i could just modify it myself :)

Cripp
12-13-2006, 08:48 AM
source code for minilogin was never released to the public and never will be most likely.

Aerewen
12-13-2006, 08:55 AM
oh super...

so uh... i mean i get the whole security risk to all the EQEMU servers out there if the code was released... but then why not release 2 builds of it? one that uses IP address and 1 that uses the userid/password fields to authenticate?

The minilogin system doesnt seem like it's all that complicated... it accesses the mysql db, runs: SELECT * FROM `account` WHERE `minilogin_ip` = 'currentip'; or somethin similar to get the account info... if no result is returned it spits out the invalid account opcode to the client and resumes the process of sitting there being happy till the next client comes along...

wouldnt be all that hard to change it to selecting the row based on userid instead of minilogin_ip and comparing the password with the one returned...

or if we really wanted to be efficient... just select with both the userid and password... then u dont even have to change the rest of the code. :)

if the dev team is too busy to do it... then lemme know how to get in touch with em and i'll do it :D

Aerewen
12-13-2006, 09:37 PM
actually after watching the minilogin and world.exe windows while logging in...

it seems minilogin doesnt actually check anything at all... you can connect to it from any computer with any username and any password and it allows you in...

world.exe actually checks your ip address against the database and gets your account information from that...

which is fine really... what we need to do now is change minilogin to check the user/pass and then modify the IP address in the database accordingly... this way a player has to actually have an account to play on the server, but the server will still compare by IP address to ensure that only 1 account per IP can be used (which i think is the way most server admins would prefer it... but I may be wrong)

If any of the dev's come through here and see this... any chance of a PM or something so I can help out?

John Adams
12-14-2006, 01:06 AM
This topic has been beaten to death, and the only results you might get are terse "no" responses. Due to the securities issue, I am confident Minilogin.exe is as it is, forever. Might be one of the only things holding back SOE from swinging through here with a wrecking ball, is the devs refusal to release that source.

Aerewen
12-14-2006, 11:21 AM
Nonono :P I'm not asking to release the source to the public...

I'm asking to join the dev team and fix it myself to release an updated binary to the public :)

IMO PEQ admins should have the ability to choose whether to base accounts on IP or login info... what happens when you have a family of former EQ-ers who want to play on a PEQ server? You have to politely, yet regretfully, inform them that the server only supports authentication by IP address, not by username/password... wouldnt be that hard to add a variable to the database to switch world.exe from checking IP to username/password, then world.exe and minilogin.exe can both read the variable and act accordingly.

mattmeck
12-14-2006, 11:33 AM
minilogin checks IP, public login checks user / pass.

Thats the way it is, thats the way it will always be.

There are reasons for this, many of them, all already covered in threads just like this one.

Aerewen
12-14-2006, 01:00 PM
when you say public login... you are referring to the login hosted on eqemulator.net right?

im suggesting the editing and release of a new minilogin so that users can host their own login server and not have to rely on eqemulator's login server for their connections

as it stands say i host a server on my home network... i can DMZ, set port forwarders etc etc etc till im blue in the face, but the eqemu server will still read incoming connections as 192.168.0.1 from the router... there is no way around it (trust me i tried :P) and i know there's gotta be a ton of people out there who have taken the time to learn eqemu, php, mysql, perl, and all the other stuff only to get the server running and *sigh* when they realize they cant play with 10 of their buddies at the same time because their router prevents it.

i just feel it would be worth the couple days of coding to release a minilogin/world.exe that checked accounts off username/password

i mean yeah i know the client software encrypts them before sending to the server... but it's not like we would be allowing people to edit the minilogin source to see the encryption used :)

mattmeck
12-14-2006, 01:09 PM
Allowing anyone to host a login server is a bad idea for many reasons and will not happen.

Sakrateri
12-15-2006, 03:47 AM
You CAN host a public server with the minilogin, I have been doing it and will always be doing it. Actually it is quite easy and gives you more control over who gets on your server and who does not. You start with DMZing or opening ports for the computer you want to run the server and then get the IPs of all the friends you want to join you, if they do not have static IPs then get them to use NOIP, And then put those IPs in the minilogin ip colum of your database, then they can connect... No problems doing it that way for me anyway. If you DMZ the computer just make sure to have good antivirus and a firewall running. The only problem with it is if two friends are coming from one IP they have to learn to share an account , so instead of eight characters they can each make 4.....unless one person is much bigger then the other then he can make 7 and the other person 1, lol well you get the picture.

Angelox
12-15-2006, 04:09 AM
You CAN host a public server with the minilogin, I have been doing it and will always be doing it. Actually it is quite easy and gives you more control over who gets on your server and who does not. You start with DMZing or opening ports for the computer you want to run the server and then get the IPs of all the friends you want to join you, if they do not have static IPs then get them to use NOIP, And then put those IPs in the minilogin ip colum of your database, then they can connect... No problems doing it that way for me anyway. If you DMZ the computer just make sure to have good antivirus and a firewall running. The only problem with it is if two friends are coming from one IP they have to learn to share an account , so instead of eight characters they can each make 4.....unless one person is much bigger then the other then he can make 7 and the other person 1, lol well you get the picture.

Sounds interesting ... I would like to be able to let a few people come in and help me out with my database, and this would be the way to do it.
What's NOIP ( Like dyndns.org)? , I bet we can come up with a script that detects who is where, and will translate/change IP entry in the database.

Sakrateri
12-15-2006, 06:11 AM
It sounds like dyndns is like NOIP which can be checked out at NOIP LINK (http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html?gclid=CL3Ln5OJlYkCFRx8OAod3y Z78Q) . I have never had used either of them myself but its a way to get a static IP if you have a dynamic one. You can still let people in with dynamic IPs but its a pain having to keep changing them. I am not sure if you can come up with some kind of script as it is you have to reboot your server whenever you add a new IP or change an existing one before the change takes effect.

John Adams
12-15-2006, 07:07 AM
I'm still not sure what the fuss is all about. Put up a public server, lock it, and add user accounts who wish to play on your server using a specific status level. If you are capable of writing a new minilogin server completely, you are capable of editing the minimum status allowed into a locked server.

I too was boggled by the fact I *had* to use eqemulator.net as a login server publicly (outside my LAN), but have since learned why and accept that. I guess I just don't need to be hidden or that private.

Angelox
12-15-2006, 07:29 AM
Sakrateri;
Is your EqEmu server Linux or Windows?

Aerewen
12-15-2006, 07:32 AM
Here's the solution to this problem temporarily.

Dowload the zip file with peq_updater.php and eqhost.txt file, install them on a webserver.
Modify the variables in the php file to your MySQL server information.
Read the info in the header of the php document to learn how this works.

I will not be providing support for this utility, but feel free to post bugs and whatnot here for as long as the moderators wish to allow it. You should already have PHP/MySQL installed if you are using the PEQ Editor on your system.

Download Zip File (http://www.allendium.com/peq_updater.zip)
Download RAR File (http://www.allendium.com/peq_updater.rar)

edit: added rar file for people who prefer it.

Sakrateri
12-15-2006, 07:33 AM
Windows XP

Angelox
12-15-2006, 07:52 AM
Thanks Aerewen, very nice - I'll be testing it and tell you how it went. My big interest was to have something fairly secure, and is why I asked what OS Sakrateri was running under. It's a lot easier to do something secure under Linux.
BtW Sakrateri, I tested and you don't have to reboot server ; I logged one of my accounts, then switched to another Via Database by changing IP's and it worked fine.

John Adams
12-15-2006, 08:05 AM
Here's the solution to this problem temporarily.
Hmm, that is very clever!

Angelox
12-15-2006, 08:34 AM
I put it all in, but all I get is a blank page for peq_updater.php.

Aerewen
12-15-2006, 10:23 AM
version of php, mysql, and apache please :)

and ill check the code for compatibility

Aerewen
12-15-2006, 10:36 AM
haha nvm found the problem... i forgot to put an = sign in the servername line

u should be gtg now i tested it again and it works fine. :P

just make sure to update the server information in both the peq_updater.php and eqhost.txt files and place them in the same directory.

edit: the rar and zip's have been re-uploaded with the new version

Angelox
12-15-2006, 10:41 AM
PHP = 5.0.4
MySQL = 5.0.24a
Apache = 2.0.54


EDIT:
I just saw your last post - thanks

Angelox
12-15-2006, 11:19 AM
Damn! very, very cool - my hat's off to you!
Here's some extra pointers for anyone else who wants to try this;
make a separate directory for this php and rename it "index.php" that's because inside the php, it refers to "index.php" all the time. or you have to rename all the references to index.php to what the file name currently is (peq_updater.php).
If you want more security, you can make a new MySql account for this php and only give priv to the account table of your database.

Really works great! If you can get this running, you need look no more, if this is what you want.

Thanks! :)

Aerewen
12-15-2006, 02:44 PM
all i can say is :D

it's a simple script too :p just kinda dawned on me the one morning (pun intended lol)... i was like hey wait a sec... php can detect ip addresses... and after the hamster got back on the wheel... tadaa script was born :p

Feel free to re-host the zips on the eqemu site and wiki them if you like... theres really nothing that will need updating on this... for a loooooong time :)

Sakrateri
12-15-2006, 08:53 PM
There always has to be someone with a problem lol , well here is mine
This is what I get when I hit the Login/create account key

Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in e:\program files\easyphp1-8\www\updater\index.php on line 119

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 120

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 122

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 123

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 158

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 159

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 163

When I installed easy php it made its own mysql up and I couldnt figure out how to get it to work with my EMU servers so I just shut it off, you think this code you gave is trying to use that mysql instead of teh one I have running for my server?

Angelox
12-15-2006, 10:19 PM
There always has to be someone with a problem lol , well here is mine
This is what I get when I hit the Login/create account key

Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in e:\program files\easyphp1-8\www\updater\index.php on line 119

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 120

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 122

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 123

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 158

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 159

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 163

When I installed easy php it made its own mysql up and I couldnt figure out how to get it to work with my EMU servers so I just shut it off, you think this code you gave is trying to use that mysql instead of teh one I have running for my server?


Did you edit the peq_updater.php file and change the login settings to yours?

Sakrateri
12-16-2006, 01:51 AM
yes I did, I believe it is trying to use the MYSQL database that was installed with apache automatically when I installed easyphp, Any easy way for me to direct apache to my MYSQL that I use for eqemu? I Put For: DB_ADDY = "localhost"; . Mabey I should put the actual IP and a port number?

Sakrateri
12-16-2006, 02:07 AM
Ok, I put the address and port number and now Im getting this

Warning: mysql_connect(): Host 'gameserver.launchmodem.com' is not allowed to connect to this MySQL server in e:\program files\easyphp1-8\www\updater\index.php on line 119

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 120

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 122

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 123

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 158

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in e:\program files\easyphp1-8\www\updater\index.php on line 159

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in e:\program files\easyphp1-8\www\updater\index.php on line 163


think im getting somewhere, lol not sure where

Angelox
12-16-2006, 02:18 AM
Here's all my files tested and working -
Note: blackwater.dynip.com is the dynamic dns I used for resolving my ip address.
Also, I have a dedicated MySql server on another machine in my LAN, so I specify the IP where needed.

eqhost.txt on client;
LoginServer]
Host=blackwater.dynip.com:5999

<?xml version="1.0">
<server>
<world>
<shortname>minilogin</shortname>
<longname>BlackwaterMiniLogin</longname>

<!-- Only specify these two if you really think you need to. -->
<address>blackwater.dynip.com</address>
<localaddress>127.0.0.1</localaddress>

<!-- Loginserver information. -->
<loginserver>
<host>blackwater.dynip.com</host>
<port>5999</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. -->
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>192.168.2.108</host>
<port>3306</port>
<username>***</username>
<password>***</password>
<db>ax_peq</db>
</database>
</server>

Login server.ini;
[LoginServer]
loginserver=blackwater.dynip.com
#loginserver2=newlogin1.eqemulator.net
loginport=5999
#loginport2=5999
worldname=BlackwaterMiniLogin
worldaddress=blackwater.dynip.com
locked=false
#account=
#password=

[WorldServer]
Defaultstatus=
Unavailzone=

[ChatChannelServer]
worldshortname=
chataddress=
chatport=

[LoginConfig]
ServerMode=MiniLogin
ServerPort=5999

Stuff I changed on my peq_updater.php;
*/
$DB_ADDY = "192.168.2.108"; //address:port for the MySQL server
$DB_USER = "****"; //username to login to MySQL with
$DB_PASS = "****"; //password to login to MySQL with
$DB_DB = "ax_peq"; //database name to use "peq" for default installation

$server_name = "Blackwater"; //set the name of your server here
$admin_level = 50; //default level of admin to give to people who sign up
//This WILL NOT modify admin of people logging in to the server.

My Linux server uses DMZ with its own Firewall, I have these ports for EqEmu;
3306/udp 5999/udp 9000/udp 7000:7010/udp 3306/tcp 5999/tcp 7000:7010/tcp


I was just on with a friend , and it's all working fine -
It looks like your MySql Server is not permiting your PhP setup to access it, maybe your webserver is somewhere else and you need to add the host in the Mysql user list?

Sakrateri
12-16-2006, 04:06 AM
Ok Aerewen , I just gotta say you are AWSOME, its working and now I can enjoy a little bit more of that flavor known as freedom :) This is just way to cool !! I think this may be even better then the real login as now it checks your Account name, Password AND IP !! Damnit man did I say your AWSOME? well thank you so much for this ....its rocks !!



P.S And thanks for your Help Angel , Your Awsome too !

Sakrateri
12-16-2006, 05:09 AM
Somethng funny here. When a person first makes an account it wants to put the first number of the IP in the revoked column and then nothing in the IP column but when they do it a second time it puts the entire IP in the IP column correctly but the number that was put in the revoked column is still there.... I dont even know what the revoked column is for lol...

John Adams
12-16-2006, 05:10 AM
I'm attempting to get this to work on my systems now (and I'll try not to ask for support, hehe), but here's a functionality question that I'll toss out while I work...

With this script, can I 2-box on Minilogin (obviously, 2 accts with the same IP)? Because currently, no matter how clever I think I am, Minilogin doesn't seem to give a rats ass about account name at all - only IP - which I believe is the base issue most have with Minilogin. Everyone touts that it only uses account name and IP - but if that were true, I could have 12 accounts with the same IP, and see my chars.

I do see Minilogin handing off the right Acct # from IP (blah) to World.exe, but when I get inside, all I see is 1 guys toons. Any idea if this script will help us lonely boxers?

Angelox
12-16-2006, 05:18 AM
I'm attempting to get this to work on my systems now (and I'll try not to ask for support, hehe), but here's a functionality question that I'll toss out while I work...

With this script, can I 2-box on Minilogin (obviously, 2 accts with the same IP)? Because currently, no matter how clever I think I am, Minilogin doesn't seem to give a rats ass about account name at all - only IP - which I believe is the base issue most have with Minilogin. Everyone touts that it only uses account name and IP - but if that were true, I could have 12 accounts with the same IP, and see my chars.

I do see Minilogin handing off the right Acct # from IP (blah) to World.exe, but when I get inside, all I see is 1 guys toons. Any idea if this script will help us lonely boxers?

I think it will, as it actually uses the username/password and IP feature in the database - you might try setting one account, logging in, then set the other account (always go to the Updater first) - login again ( I take you're boxing off the same machine?)

John Adams
12-16-2006, 05:24 AM
Yes, I am boxing off the same machine. What happens currently (not using this script) is if you have 2 accts with the same IP, I think the Db search stops at the first match of IP it finds (doesn't consider the account name at all, I am sure). Even without 2 boxing. Set up 2+ accts with the same IP in your database, log one in, see the toons. Then, log out - and log in the second acct from the same machine. You'll see the first guys toons again.

So even before trying to 'box', I am having an issue with same-IP. Which I am hoping this tool might help with - but I am thinking, if it doesn't change the first accts IP, it won't solve my problem.

(btw, I don't seem to have this problem with Public, but I don't have access to that atm ~cry~)

Angelox
12-16-2006, 05:25 AM
I would only use it with friends for now, as I can already see a few issues. For example, Maybe it could be fixed to where one IP can only have three accounts made in a session. You could end up with your accounts getting spammed with accountnames.
Also, you should make a "blank" account with a specific password, in case someone just presses the "enter" key- I already did this, and made a blank account with a blank PW. If it has a password, they will get an error.

Angelox
12-16-2006, 05:27 AM
Yes, I am boxing off the same machine. What happens currently (not using this script) is if you have 2 accts with the same IP, I think the Db search stops at the first match of IP it finds (doesn't consider the account name at all, I am sure). Even without 2 boxing. Set up 2+ accts with the same IP in your database, log one in, see the toons. Then, log out - and log in the second acct from the same machine. You'll see the first guys toons again.

So even before trying to 'box', I am having an issue with same-IP. Which I am hoping this tool might help with - but I am thinking, if it doesn't change the first accts IP, it won't solve my problem.

(btw, I don't seem to have this problem with Public, but I don't have access to that atm ~cry~)

Try it! I think once logged in, ip doesn't matter anymore - might when you zone though.
This php sort of "knows" what belongs to who.

Aerewen
12-16-2006, 07:38 AM
no you will not be able to 2-box with this script... the eqemu server bases account id on IP address so if you change the ip address even after logged in you will either a) change accounts, b) crash the server, or c) crash the zone you are in

i should mention that this script was written based on the modified ax_peq database i'm using, i dont know offhand if the account table has a different number of columns than the default peq databases... but that could cause login problems for some servers.

Aerewen
12-16-2006, 07:41 AM
oh on a side note you definitely cannot 2-box with this script...

when a player logs in their account it automatically changes all other account rows with their ip address to use the ip of 0.0.0.0

this was done to prevent crashes on the server side from having multiple accounts active using the same IP

but this also provides for a nifty little feature... your GM's can have one login/password for their GM account and another login/password for their regular account. then they can use this tool to swap between accounts to go play as a normal player with 0 access flags to GM commands since it will erase their IP from whichever account they did not log in from.

Also for long term use, players can actually create more than just one account worth of characters on the server. So we arent limiting them to selecting just some of the classes. they can make an account, fill it up with toons, and come back to make a new account, then fill that one up as well :p

Sakrateri
12-16-2006, 12:09 PM
I realize you said no support so I am just throwing this out for the general public, Mabey someone else has experienced this and knows a fix. When someone first creates an account it sets the password as 0 in the database instead of what they wanted, If I manually put a password in and tell them what it is then it is fine after that .. Any ideas? and that is a 0 not an O that its making.

DarkMaster
12-16-2006, 12:28 PM
Just wanted to say thanks for the script, it is cleaver. I am running EQemu from behind a 2 firewalls using nat / port forwarding and it all works fine. Just what the doctor ordered lol!

bufferofnewbies
12-16-2006, 03:11 PM
I just won a Buffer point!

ok, maybe you didnt say that, but you should..

John Adams
12-17-2006, 07:27 AM
Sak, check out what Aerewen said before about invalid column counts between databases. If you are getting a zero stuffed into Password, maybe that zero was destined for the Status column instead?

Best way to do inserts (on new accounts) is to always provide the (field_names) for every (field_value) you supply.

Eg.,
INSERT INTO account (name, password, status) VALUES ('name','password','status');

Many people tend to take the shortcut, and just do a:

INSERT INTO account VALUES ('name','password','status');

...but that implies **exact** column placement and order. If accounts has 4 columns, for example, the above insert would error with "invalid column count" or something about not being able to find a column. Check that out.

I wish my linux webserver was working. I'm dying to try this out!

Sakrateri
12-17-2006, 01:10 PM
well this is what I've got for the code now

$sql = "INSERT INTO `account` VALUES (". $newno. ",'". $_POST['username']. "','',0,'". $_POST['password']. "',".$admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)";



and these are all the rows I've got in my database
e
id,name,charname,packencrypt,sharedplat,password,s tatus,Isaccount_id,gmspeed,revoked,miniloginip,hid eme

That first 0 is showing up as the password because i changed it to a 5 and it set the password as 5 and yes I believe that is suppose to be the status. anyone can look at this and tell me what i have to do to fix it? I have tried deleting and adding stuff and nothing worked.

John Adams
12-17-2006, 03:32 PM
Column "packetencrypt" sounds like old Emu. Like I said, if the fields in the accounts table to not match what Aerewen's Insert expects, that's what's causing your problem. If he's using the current database, try that on a separate install just to verify (point your configs to a new currently sourced database - PEQ, ax_peq, something like that).

Sakrateri
12-17-2006, 10:40 PM
Edit, Nm got it ...trying to get Angels database installed and I am having moments of pure stupidness !


Well , I cant get Angel's to work I tried installing it two diferent times, mabey there is a special order to install all this? I also was going to post on Angel's boards but does not seem to be a way to register so I can .

Aerewen
12-18-2006, 09:40 AM
yeah im gonna rewrite the SQL statements to specify values by column name... like i said this script was written for use with my server only... i just made the SQL/server info into variables for other people to use :p

i'll have an updated version here in a few mins. once i eat some dinner that is :D

Sakrateri
12-18-2006, 09:42 AM
Well I still say this is an awsome script and you are awsome for doing this , I am happy to keep using it how it is if you dont feel like messing with it , as it is now everyone just has to use a 0 for the password and do it twice then its fine, its no matter if everyone knows the password cause its the IP that matters.

Aerewen
12-18-2006, 09:49 AM
okie i changed the sql statement to include column names.. this should now work properly when creating a new account with any database :)

Sakrateri
12-18-2006, 01:02 PM
Thanks again on this, is it updated on the previous link?

Angelox
12-18-2006, 01:39 PM
Thanks again on this, is it updated on the previous link?

Did you ever get my DB working? , if not tell me more about what you have, is it MySql4x, and did you use Cavedude's installer?

Sakrateri
12-18-2006, 02:08 PM
Yes its 4x and yes I used Cavedudes, that new one is not working for me at all and I just ran into one more problem. Is there anything in the old code that will not allow more then eight accounts to be created? everytime I get eight accounts created every try after that to make another one says there was an error while trying to create your account, then if I delete a couple of the accounts I can make more up till eight accounts again? I am really sorry about this and if you dont feel like messing with it I understand but I still say its an awsome job. Its my problem for not knowing how to read and make this code better myself. Thanks

Angelox
12-18-2006, 02:33 PM
Yes its 4x and yes I used Cavedudes, that new one is not working for me at all and I just ran into one more problem. Is there anything in the old code that will not allow more then eight accounts to be created? everytime I get eight accounts created every try after that to make another one says there was an error while trying to create your account, then if I delete a couple of the accounts I can make more up till eight accounts again? I am really sorry about this and if you dont feel like messing with it I understand but I still say its an awsome job. Its my problem for not knowing how to read and make this code better myself. Thanks
You mean Cavedudes old install? If so, then your problem is, the new database, PEQ, EQ and AX_PEQ are all compatible with the latest EQEMU and you'd have to update your binaries.
If you have something that works (Cavedudes old install?) , then here's an easy way to upgrade; Don't uninstall anything, you can go to my site, download my full DB for MySql4x, Go to MySql Site, Download MySql-Administrator, Go to Eqemu site, download newest binaries -
Then restore my database to you your MySql Server, backup your current eqemu configuration, then overwrite the eqemu directory with the newer binaries from eqemu site.- the only file you should keep is your eqemu_config.xml. You'll see where you can set permissions and what-not to any database you have installed via MySql-Admin; Set permissions for newly restored DB. once you have set permissions, you need to point the eqemu to the new database; make changes in the eqemu_config.xml file to that.
Theres' links to all this posted at my website.

Sakrateri
12-18-2006, 09:32 PM
I will try this , but one thing

restore my database to you your MySql Server

I am a little confused about that , run that over TOP of the database I am using now (cavedudes)?

Aerewen
12-18-2006, 09:34 PM
check your database and see if you have a user entry with the "id" field set to 9

the script increments the id field automatically just in case the mysql database isnt set to auto increment that field.

Sakrateri
12-18-2006, 09:44 PM
user entry? you mean account id? no , i cant get past 8

btw , I am using MYSQL Front , so what ever I need to do in the database is pretty easy.

Aerewen
12-18-2006, 09:51 PM
execute this query in your database:

SELECT * FROM `account` WHERE `id` = 9;


then tell me if it returned any information

Sakrateri
12-18-2006, 10:00 PM
it returned

Empty set <0.00 sec>

Aerewen
12-24-2006, 11:06 AM
that's really odd... the only thing i can think of to try is changing line 161 from:

$sql = "INSERT INTO `account` (`id`,`name`,`charname`,`sharedplat`,`password`,`s tatus`,`lsaccount_id`,`gmspeed`,`revoked`,`minilog in_ip`,`hideme`,`rulesflag`) VALUES (". $newno. ",'". $_POST['username']. "','',0,'". $_POST['password']. "',". $admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)";



to


$sql = "INSERT INTO `account` (`id`,`name`,`charname`,`sharedplat`,`password`,`s tatus`,`lsaccount_id`,`gmspeed`,`revoked`,`minilog in_ip`,`hideme`,`rulesflag`) VALUES (NULL,'". $_POST['username']. "','',0,'". $_POST['password']. "',". $admin_level. ",". $newno. ",0,0,'". $_SERVER['REMOTE_ADDR']. "',0,0)";



and hope your database is set to auto increment the id field

John Adams
12-27-2006, 06:14 AM
I wouldn't insert 'id' at all, on an auto-increment field.

Aerewen
12-27-2006, 09:28 AM
setting it to null will cause it to auto increment as well. as memory serves me older versions of MySQL will spit out an error if your insert query doesnt specify at least a null value for a key

John Adams
12-28-2006, 03:02 AM
Just because I am in an argumentive mood today (grin), no value passed would also be NULL. ;)

Ok, I am done.

Aerewen
12-28-2006, 10:26 AM
Just to sustain your mood :p

You are correct, however if someone were to type in an emty set of quotes or a 0 there thinking it was a mistake in my post, then the query wouldnt work :)

which is why i added the column and the NULL value to the query ;)

John Adams
12-28-2006, 03:30 PM
Oddly, my mood changed once I left work. :D

You win. Uncle!!

Cyro
01-07-2007, 03:05 PM
Okay, using this PHP fix...when i type in my username and password, internet explorer eventually comes up with the error of "cannot load page"
However, i know it connects because I can see the attempts to connect in the minilogin.exe...

Any ideas? My thoughts were that I needed to change something about the MySql access...

Below are my files, copied and pasted verbatim (aside from making the user/pass blank)

~~~~~~~~~~~~~~~~~~
Index.php
~~~~~~~~~~~~~~~~~~
Put this page on your site after setting the variables below to
the information of the MySQL database with the PEQ info in it.
*/
$DB_ADDY = "eqemu.no-ip.biz:5999"; //address:port for the MySQL server
$DB_USER = ""; //username to login to MySQL with
$DB_PASS = ""; //password to login to MySQL with
$DB_DB = "ax"; //database name to use "peq" for default installation

$server_name = "Shadows of Hatred"; //set the name of your server here
$admin_level = 250; //default level of admin to give to people who sign up
//This WILL NOT modify admin of people logging in to the server.

~~~~~~~~~~~~~~~~~~~
Loginserver.ini
~~~~~~~~~~~~~~~~~~~
[LoginServer]
loginserver=eqemu.no-ip.biz
loginport=5999
worldname=Shadows of Hatred
worldaddress=eqemu.no-ip.biz
locked=false
account=
password=

[WorldServer]
Defaultstatus=
Unavailzone=
[ChatChannelServer]

worldshortname=
chataddress=
chatport=

[LoginConfig]
ServerMode=MiniLogin
ServerPort=5999

~~~~~~~~~~~~~~~~~~~
eqemu_config.xml
~~~~~~~~~~~~~~~~~~~
<?xml version="1.0">
<server>
<world>
<shortname>Minilogin</shortname>
<longname>Shadows of Hatred</longname>

<!-- Only specify these two if you really think you need to. -->
<address>eqemu.no-ip.biz</address>
<localaddress>127.0.0.1</localaddress>

<!-- Loginserver information. -->
<loginserver>
<host>eqemu.no-ip.biz</host>
<port>5999</port>
<account></account>
<password></password>
</loginserver>
<unlocked/>
<!-- Sets the shared key used by zone/launcher to connect to world -->
<key>some long random string</key>

<!-- Enable and set the port for the HTTP service. -->
<tcp ip="eqemu.no-ip.biz" port="9000" telnet="enable"/>
<http port="9080" enabled="true" mimefile="mime.types" />
</world>

<!-- Database configuration, replaces db.ini. -->
<database>
<host>eqemu.no-ip.biz</host>
<port>3306</port>
<username></username>
<password></password>
<db>ax</db>
</database>
</server>


Can anyone shed some light...please? It would be GREATLY appreciated!!!
Thanks in advance,
-Cyro

LordHogFred
01-21-2007, 08:27 AM
Ok I'm getting some really horrible errors:



Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Inetpub\wwwroot\eqlogin\index.php on line 119

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 120

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 122

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 123

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 158

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 159

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Inetpub\wwwroot\eqlogin\index.php on line 163


Any ideas?

John Adams
01-22-2007, 01:42 PM
Yeah, google this:
Client does not support authentication protocol requested by server; consider upgrading MySQL client
Tons of posts about this on the net.

PenPen01
04-14-2007, 08:38 PM
does anyone still have the source of PEQ_Updater?

Angelox
04-19-2007, 09:16 AM
Can anyone post me a link or email me Aerewen's updater? I lost mine when my hard disk died

GeckoGal
04-21-2007, 02:15 AM
I'd also like to get hold of a copy of that code..
So, if some kind person could link it I too would be forever grateful. :)
LOL, could email it me too, that'd be better :)

Many thanks, in advance

gecko

John Adams
05-03-2007, 08:36 AM
Did you guys ever get ahold of peq_updater.zip? If not, here's a link:

http://eq.mmoemulators.com/files/peq_updater.zip

Not sure if this was his latest work - file dated 12/15/2006 locally.

Angelox
05-05-2007, 01:42 PM
Did you guys ever get ahold of peq_updater.zip? If not, here's a link:

http://eq.mmoemulators.com/files/peq_updater.zip

Not sure if this was his latest work - file dated 12/15/2006 locally.

Hi John
I still need it, your link didn't work for me :(

EDIT:
NM, I found a copy in a trash folder with an slocate.

John Adams
05-07-2007, 12:19 AM
Weird. I clicked the link and it works for me. :)

Either way, glad you found what you needed.

Angelox
05-07-2007, 08:08 AM
Server not found
Firefox can't find the server at eq.mmoemulators.com.

I just tried again, but no worries, I got the file. Thanks anyways!

sdabbs65
06-12-2007, 07:49 AM
Here's the solution to this problem temporarily.

Dowload the zip file with peq_updater.php and eqhost.txt file, install them on a webserver.
Modify the variables in the php file to your MySQL server information.
Read the info in the header of the php document to learn how this works.

I will not be providing support for this utility, but feel free to post bugs and whatnot here for as long as the moderators wish to allow it. You should already have PHP/MySQL installed if you are using the PEQ Editor on your system.

Download Zip File (http://www.allendium.com/peq_updater.zip)
Download RAR File (http://www.allendium.com/peq_updater.rar)

edit: added rar file for people who prefer it.

FYI:
I tested it for fun just to see if it works and it only updates ip address's of existing accounts it dont add them like it says.
other than that it works great.

John Adams
06-12-2007, 08:46 AM
Hmm, likewise, just the other day - my first time trying it (I don't use it, just wanted to see what it did) and it did add a record to my account table. Sure you didn't add an account that was already there? j/k

sdabbs65
06-13-2007, 03:34 AM
Hmm, likewise, just the other day - my first time trying it (I don't use it, just wanted to see what it did) and it did add a record to my account table. Sure you didn't add an account that was already there? j/k

No I used a clean test server install and nothing was inserted.
maybe you have to add a GM first. <shrug>.

otheli89104
04-06-2008, 09:44 PM
take it to another eq emulator site. -- matt

mburnett
04-23-2008, 11:45 AM
I have a more permenant solution

http://shardsofnorrath.no-ip.org:90/EQEmuLauncher-1.0BETA.zip

It includes a launcher that the users login to and a server that handles the updating of ips based on their username and password giving the ilusion of a public loginserver while using minilogin

cole89103
04-26-2008, 10:44 AM
ummm that link doesn't work. Anyone have a mirror?