EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::MiniLogin (https://www.eqemulator.org/forums/forumdisplay.php?f=629)
-   -   Minilogin to public server? (i'll settle for the minilogin source code) (https://www.eqemulator.org/forums/showthread.php?t=22081)

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

Quote:

Originally Posted by Aerewen
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

Code:

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

Quote:

Originally Posted by Sakrateri
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

Code:

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

Code:

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;
Code:

LoginServer]
Host=blackwater.dynip.com:5999

Code:

<?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;
Code:

[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;
Code:

*/
$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;
Code:

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 !


All times are GMT -4. The time now is 02:36 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.