Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

PhP based pwAdmin

Joined
Jul 17, 2007
Messages
665
Reaction score
103
i started to do php based web page and not java based, my questions:

1. any easier way to get character names on account? i mean how to connect to game database in php and get character name and level info atleast?

2. what is the most usefull way to get process status (if services running or no), atm on ubuntu "pgrep" is work but idk if work with every debian based (or most of ubuntu), also question how to check if maps are on or no?
pgrep gedelivery example work and return a number but checking maps i dont know how work?

(i used shell_exec in php)

Last Update: https://drive.google.com/open?id=0BzQbqnVz5iizNnlfS0xHYWFncWs
2017.05.14


downloadable demo
g

New Updated version where you can see your characters and their level & class & path (holy/demon)



newer version got ITEM BUILDER with wide customization + MAIL SENDing option & WEBSHOP with webpoints


this post
and video


Last Feature Screens

shadowvzs - PhP based pwAdmin - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Aug 9, 2013
Messages
49
Reaction score
66
1) Only packets
2) You can try check uses port or no, like if socket connected on port 29100 this means that gdeliveryd is running
 
Newbie Spellweaver
Joined
Nov 12, 2016
Messages
17
Reaction score
1
2. what is the most usefull way to get process status (if services running or no), atm on ubuntu "pgrep" is work but idk if work with every debian based (or most of ubuntu), also question how to check if maps are on or no?
pgrep gedelivery example work and return a number but checking maps i dont know how work?

Code:
ps -fC gs
it will output all gs processes
you can get it to print only particular map names using awk

Code:
ps -fC gs | awk '{ print $9 }'

ps and awk are parts of posix, they will work on all decent systems
 
Joined
Jul 17, 2007
Messages
665
Reaction score
103
Code:
ps -fC gs
it will output all gs processes
you can get it to print only particular map names using awk

Code:
ps -fC gs | awk '{ print $9 }'

ps and awk are parts of posix, they will work on all decent systems

what is this print $9? its show only 9?
btw interesting with ps give different pid id:
ps: 6368
pgrep: 21158
i am not expert but if you say ps more compatible than pgrep then i will use that, btw i tested with world map and its give really the map name (gs01) :)
so ps
the best way for php check if that service is running or not?

(for whole server online offline i used socket but for individual service in server i don't know if socket checking work)
 
Joined
Jul 17, 2007
Messages
665
Reaction score
103
what is this 9 column, could u explain it?

btw, now biggest problem the permission :/
apache use user: nobody and with it i cant change the files where folder/file owner is root, i tryed shell_exec("chmod 777 -R /root/gdeliveryd") but not helped, i want make start.sh and page where user from php can change the ptemplate.conf and gamesys.conf (ex. exp rate or pvp on/pff) but i have no ideea how to make it only with php.


anyone have ideea?
i did account management page but for server control page i need root permissions :/
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Nov 12, 2016
Messages
17
Reaction score
1
what is this 9 column, could u explain it?
Just compare the output of
Code:
ps -fC gs
and
Code:
ps -fC gs | awk '{ print $9 }'


btw, now biggest problem the permission :/
apache use user: nobody and with it i cant change the files where folder/file owner is root, i tryed shell_exec("chmod 777 -R /root/gdeliveryd") but not helped, i want make start.sh and page where user from php can change the ptemplate.conf and gamesys.conf (ex. exp rate or pvp on/pff) but i have no ideea how to make it only with php.


anyone have ideea?
i did account management page but for server control page i need root permissions :/
Set the owner user/group of the files or folders you need to change to the one your web server is running in. Many web servers (e.g. nginx and apache) are in the group www-data by default, so:
Code:
chown -R :www-data /path/to/your/server/files/
ps. do not place server files in /root

//edit
you might want to create a script for your users which would do that automatically

//edit2
you might also need to set proper permissions for the files
Code:
chmod 775 /path/to/your/server/files/
 
Last edited:
Joined
Jul 17, 2007
Messages
665
Reaction score
103
Just compare the output of
Code:
ps -fC gs
and
Code:
ps -fC gs | awk '{ print $9 }'



Set the owner user/group of the files or folders you need to change to the one your web server is running in. Many web servers (e.g. nginx and apache) are in the group www-data by default, so:
Code:
chown -R :www-data /path/to/your/server/files/
ps. do not place server files in /root

//edit
you might want to create a script for your users which would do that automatically

//edit2
you might also need to set proper permissions for the files
Code:
chmod 775 /path/to/your/server/files/


somehow for me ps for maps take alot more time than checking the other 9 service (authd, gamedbd, logservices etc), have faster methode or can improve the speed?

(reason if i periodical check and takes long [well ~2sec] till server give answer maybe could make lagg for server if often i use that command)

Code:
chown -R :www-data /path/to/your/server/files/

well at me in lamp user is nobody but not work from php, so only way if i manually type in terminal, i want avoid this and if posible resolve permission issue only with php if exist any solution for this.

ps. do not place server files in /root

well in my case in my vbox make no difference and website ask what is the server folder :)

you might want to create a script for your users which would do that automatically
that could make only with php?







Looks nice. I'm also working on a php based pwAdmin.

you or anyone want cooperate :) every help is welcome also my website will be publicated also here.
now working on vote system and added the ban option and unban (for me not worked if i inserted into forbid table so used packets ty to others whos posted, only little thing what maybe annoying is the unban need 1minute)
 
Night Gaming Network
Joined
Sep 13, 2014
Messages
726
Reaction score
46
Can you add a ip finder and ip ban funtions, find the ip of the account OR kinda like these paid for editers how they bind to your computers HDD find a way where we can ban the computer
 
Newbie Spellweaver
Joined
Nov 29, 2015
Messages
28
Reaction score
0
I'm begin today to make a php based pwadmin, thanks for the idea. I think it's will working better then tomcat/jakarta xD



Can you add a ip finder and ip ban funtions, find the ip of the account OR kinda like these paid for editers how they bind to your computers HDD find a way where we can ban the computer


Maybe ban the Mac adresse / ip4 / ip6 no idea lel
 
Joined
Jul 17, 2007
Messages
665
Reaction score
103
Can you add a ip finder and ip ban funtions, find the ip of the account OR kinda like these paid for editers how they bind to your computers HDD find a way where we can ban the computer

ip filter useless really...
most of people got random ip from isp, this mean restart router => new ip, this is the future with fast internet you not get static ip ...
atleast in my poor country and around it work that way with any isp (all internet provider and i guess same with mobile internet).

anyway i tryed it for account creation, on my page you can set how many account can create with a ip but also another limit for browser session+cookie, that avoidable ofcourse but a bit harder with few second.

account ban not working, only role banning (maybe only at this server idk) well if you want stop someone to login but not delete the account then pwAdmin can change his password.
 
Elite Diviner
Joined
Mar 12, 2009
Messages
472
Reaction score
59
Can you add a ip finder and ip ban funtions, find the ip of the account OR kinda like these paid for editers how they bind to your computers HDD find a way where we can ban the computer
This kind of request is really easy, take ip from sql database then let iptables stuff do the ban job, if you need to find target from charname or roleid then you need to use gamedbd database...

i did this ip detection for player list on the web and also player management such as banning or auto banning based on login id :D





I never used sockets, each service includeing with map use different port?
Packet? It's similiar like old pwAdmin send mail working?

I didn't know any guide how is the packet data structure and like that, this still work? http://forum.ragezone.com/f751/packet-class-pw-1055126/

i did send item or anything from php code, if you know how to write something call API between PhP and Java ... that's it ;)



I'm begin today to make a php based pwadmin, thanks for the idea. I think it's will working better then tomcat/jakarta xD






Maybe ban the Mac adresse / ip4 / ip6 no idea lel

i rather write API rather than reinventing the wheel...that's save a lot of my time...
 
Last edited:
Banned
Banned
Joined
Dec 3, 2010
Messages
1,581
Reaction score
619
I wont be trolling and I respect any work on pw but php shell_exec is a joke right?

 
Elite Diviner
Joined
Mar 12, 2009
Messages
472
Reaction score
59
I wont be trolling and I respect any work on pw but php shell_exec is a joke right?
For what purpose doing shell_exec? Php shell_exec as user account is ok but with nobody? Yes that is a joke. Running pw engine uses many resources and fastest way is using root account but as what i said before that you don't have to be root to run root's command you can do that with sudo.

 
Joined
Jul 17, 2007
Messages
665
Reaction score
103
I wont be trolling and I respect any work on pw but php shell_exec is a joke right?

If you really don't want then you came up with a constructive idea, so don't tell you don't want troll...
gunse like I write before I want try server control only from php if possible (edit server conf files, start up etc).
 
Newbie Spellweaver
Joined
Nov 29, 2015
Messages
28
Reaction score
0
Allthing work but @Server service process ( start , restart and the process of the services) ill cant adding btw idk how .-. , but only server start and restart working on me. Seeing the services idk how to add this in PHP format, because tomcat/jakarta :eek:
 
Last edited:
Elite Diviner
Joined
Mar 12, 2009
Messages
472
Reaction score
59
Allthing work but @Server service process ( start , restart and the process of the services) ill cant adding btw idk how .-. , but only server start and restart working on me. Seeing the services idk how to add this in PHP format, because tomcat/jakarta :eek:
Do you know how to use iweb's/pwadmin's java scripts and its library? Imagine you can retrieve its result into your php variables.. :)

 
Back
Top