-
3 Attachment(s)
MuServer Shutdown / Start (PHP)
MuOnline PHP Server Loader
Here is another PHP release that might be useful to some servers out there.
With this script you can shutdown or start your muserver through PHP.
Usually only a head admin has physical access to a server which means if something goes wrong everyone has to wait for him/her to reboot it. With this script any gm/admin can do it from his web browser without any remote connect tools.
There are 3 files (install.php, results.php, control.php) in this zip.
In Install.php (see picture) you have to set your server details. Its pretty easy to understand what to put...If you use MuServerStartUp then you know what i mean. If you dont, just check your shortcuts in your Links folder.
After you set the proper values and continue, the next page will create 4 files in your server. 3 will be place inside your root /mufolder/ and 1 where your PHP script is.
Those 3 files are 3 .bat files. One is needed for the server to start,1 for the server to shutdown and 1 for the PC to reboot. DONT DELETE THEM. The script wont work otherwise. The last file holds just the value where your mufolder is in your HD so that the control.php know where to find the 2 files i mentioned.
After that you just run the control.php. This page will shutdown or restart your MuServer. Because some people will start complain about the security of this, in the control.php i have included a security user/pass login. The user/pass is (admin/letmein). If you want to remove this there are comment lines that tells you where the real script starts from. Just remove the code ABOVE that.
If you decide to keep the security, change the user/pass please.Just open control.php with notepad and find the word 'letmein' and change it :)
I'll give you another way you can use this script. You can use this page through WAP and close/start your server even from your mobile ;)
So all the lame admins out there you cant say anymore "I wasn't home, sorry i couldn't restart the server" :P Well now you can.hehe
Enough japing...enjoy the script.
Update:
I changed the control.php because some people have error_reporting value to max in their PHP.ini and get some "notices".
Its not necessary to update, if you dont see any notice messages in your page.
Update 2:
I added another button to reboot the machine as well. It will pop up a 30 seconds delay message to the screen first and when that time expires the machine will shutdown and reboot.
Download again the script and re-install it to create the appropriate files for the reboot button to work.
Update 3:
Added server status so you know if the server is online or offline before you hit any button. Download the script again and just replace control.php with the new one.
-Sandbird
-
Re: -= MuServer Shutdown / Start (PHP) =-
Approved! Well done, great release!
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
oooo nice good work 10/10
-
Re: [Release] MuServer Shutdown / Start (PHP)
This Rocks ! :cupidarro:bb:
Very usefully when the Owner its not home :D so the gm can start/restart server :D
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
nice idea.. (Y)
:poster_ss:poster_ss:poster_ss:poster_ss
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
When it closes a server... does it just kill the process GameServer.exe or it does it another way?
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
when it kills the server (if its stuck or something) it closes it as if you close it from the TaskManager....The hard way that is ;) So it will close it 100%
-
Re: [Release] MuServer Shutdown / Start (PHP)
Perfect... what can i say :) 10/10
I hope its safe too btw
-
Re: [Release] MuServer Shutdown / Start (PHP)
Good Processes install system ^^ .Thank man...
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
Help ..Run cmd.exe file because not run batch file cmd system ....
-
Re: [Release] MuServer Shutdown / Start (PHP)
Sorry ...I'm change driver not driver c:/ not work
-
Re: [Release] MuServer Shutdown / Start (PHP)
I dont understand what your problem is :/
Can you give me some more info ? Like what is your Windows running the server?
-
Re: [Release] MuServer Shutdown / Start (PHP)
Notice: Undefined index: bsubmit in c:\program files\easyphp1-8\www\startstopserver\control.php on line 143
Notice: Undefined index: bsubmit in c:\program files\easyphp1-8\www\startstopserver\control.php on line 146
Notice: Undefined index: bsubmit in c:\program files\easyphp1-8\www\startstopserver\control.php on line 192
Notice: Undefined index: bsubmit in c:\program files\easyphp1-8\www\startstopserver\control.php on line 200
I get those errors and when i try to start the server EasyPHP closes
-
Re: [Release] MuServer Shutdown / Start (PHP)
Your "error_reporting" value in your PHP.ini is set to E_ALL probably...Its unnecessary to have it so high. you should set it to E_ALL & ~E_NOTICE instead.
Anyways...i reuploaded the script with a fix so you dont see that notice message...Re-download the script and overwrite control.php with the new one. It will fix the problem.
-
Re: [Release] MuServer Shutdown / Start (PHP)
thanks 10/10.
great release.
-
Re: [Release] MuServer Shutdown / Start (PHP)
GJ. may be u can maek script to restart pc from web?
-
Re: [Release] MuServer Shutdown / Start (PHP)
Twiddle, nice idea...I just added that option. Download again the script and re-install it to create the appropriate files.
-
Re: [Release] MuServer Shutdown / Start (PHP)
Another very useful thing by sandbird ... Just perfect man ... 10000/10
-
Re: [Release] MuServer Shutdown / Start (PHP)
The idea is very nice, one thing i would add is server status on this pages, cause as you said if someone would like to use it with his mobile, he would need to look at the home page first wich could be very heavy for mobile. :-)
-
Re: [Release] MuServer Shutdown / Start (PHP)
added, updated the 1st post ;)
Btw i forgot to mention that if you load the server with the script all the subservers run in the background and the resources to your CPU and RAM are to the minimum. My Gameserver was running with 4% CPU and 40-60MB ram.
-
Re: [Release] MuServer Shutdown / Start (PHP)
sandbird i have made that you told me and don't get errors but when i try to use Start, Close, restart functions my apache give me error and don't send but doesn't close
-
Re: [Release] MuServer Shutdown / Start (PHP)
i'll need some more info about this error. What is the error it gives ? It would be nice if you can pm me the page so i can see the error myself when i hit the button.
Or If you can when you click that button and you see the error right click on the screen, select "View Source" or "View Page Source", copy all that text and send it in a pm.
I've tried to set my apache on max protection like yours and didnt have any errors...i dont know whats wrong with yours...pm me your msn so we can see it live.
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
xute stop adding mirrors...They are wrong....its the first version what you uploaded....The script is hosted in RZ, its not going anywhere....no need for rapidshare mirrors.
-
Re: [Release] MuServer Shutdown / Start (PHP)
Hi sandbird. Can i modyfi your script to other game?
-
Re: [Release] MuServer Shutdown / Start (PHP)
sure, install the script again select your game folder you want the script to install itself and add the exe files you want ( probably no arguments )
Now after that you'll have to go to that folder and open loader.bat and change according to your needs...Just keep the CD commands...it needs them.
I told you to install the script because it creates the value.php which has the path to your game directory where the exe's are....you can just edit current value.php...its the same thing.
-
Re: [Release] MuServer Shutdown / Start (PHP)
Ok Thx very much.
Now i have another question.
How i can cheak is server online or offline in game call of duty 2.
I'm using port 28960.
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
Intelligent release. Thanks sanbird very much !!!
-
Re: [Release] MuServer Shutdown / Start (PHP)
thank you sandbird good release!
Offtopic:
could your next php release be like "Fix your stats via the website?" (if they overadd theyre stats in-game they can fix it back at the website) (if u understand sir ;))
Thanks!
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
timon200
Ok Thx very much.
Now i have another question.
How i can cheak is server online or offline in game call of duty 2.
I'm using port 28960.
btw, wrong section mate xd
-
Re: [Release] MuServer Shutdown / Start (PHP)
hmmm that depends on the website you are using. if they log in your site then they have to be able to do that in that site not somewhere else...like an outside page. So that has to be custom on each page.
Also are you using a reset system ? With adding resets in the Database ?
-
Re: [Release] MuServer Shutdown / Start (PHP)
Nice dude, we can add more subserver to run.???
-
Re: [Release] MuServer Shutdown / Start (PHP)
added, check 1st post (attachments)
if you want to add more fields open install.php with notepad and search for gssub.
PHP Code:
<tr>
<td><input class="inputtextarea"name="gssub" type="text" id="gssub" value="Gameserver2"></td>
<td><input class="inputtextarea2"name="gssub_exe" type="text" id="gssub_exe" value="Gameserver.exe"></td>
<td><input class="inputtextarea3"name="gssub_atr" type="text" id="gssub_atr" value="127.0.0.1 55970 127.0.0.1 55960 55903" width="250"></td>
</tr>
<tr>
- copy this whole bunch and paste it right under it
- change where you see gssub, gssub_exe, gssub_atr and set your own values. ( the value="...." is a default value,put your own there)
- open results.php and copy batch :
PHP Code:
@CD $server\\$_GET[gssub]
@START $_GET[gssub_exe] $_GET[gssub_atr]
@PING -n 10 127.0.0.1>nul
and paste it under again. Change again gssub, gssub_exe, gssub_atr to your values you set in install.php.
And the last change is a bit bellow. Search for :
PHP Code:
@taskkill /f /im $_GET[gssub_exe]
Again copy this and paste it under. Carefull this is the gssub_exe value. (its the executable name)
- save, upload and re-install.
thats it.
-
Re: [Release] MuServer Shutdown / Start (PHP)
you should make it detect a server crash and prompt the admin to restart the server
-
Re: [Release] MuServer Shutdown / Start (PHP)
One of the best releases ever.
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
sandbird
hmmm that depends on the website you are using. if they log in your site then they have to be able to do that in that site not somewhere else...like an outside page. So that has to be custom on each page.
Also are you using a reset system ? With adding resets in the Database ?
Nevermind. Thx.
-
Re: [Release] MuServer Shutdown / Start (PHP)
Very nice and useful.
Could you fix the DB injection issue in MuWeb 0.8?
-
Re: [Release] MuServer Shutdown / Start (PHP)
Don't works for me :(
When I push Start, Stop or Reboot nothing happends.
I have all 4 files (3 .bat and 1 .php)
OS: Windows XP SP2
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
kashak
perfect!!
What is perfect????? I can't start or stop server with this :(
Please, help!
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
Thx, nice release, but how to run it if I have web server in Linux and server Windows(2 ps's connected by router) Thx!
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
sandbird
With this script any gm/admin can do it from his web browser without any remote connect tools.
Nice script. Its very useful, but only if you trust you're Admin's/GM's 100% and they will not try to mess-up with the Server IF they get mad at you for some reason :)
-
Re: [Release] MuServer Shutdown / Start (PHP)
100000000/10 :)) and hw can it work on mobie :D
-
Re: [Release] MuServer Shutdown / Start (PHP)
Can someone help me? 1st post in this page. Thx!
-
Re: [Release] MuServer Shutdown / Start (PHP)
ops,it use 100% CPU usage :|
anw,thx U,I edit it to run Mu server startup :))
and hw can it work on mobie :D
-
Re: [Release] MuServer Shutdown / Start (PHP)
How to config it to show programs? Thx! Or how to config it to run muserverstartup(In tryied, but it run it and when start only Dataserver and stop). Thx!
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
Just_Rytis
How to config it to show programs? Thx! Or how to config it to run muserverstartup(In tryied, but it run it and when start only Dataserver and stop). Thx!
:D I'm too,make Ur muserver start up auto run wen PC start up,and use this script to restart ur PC :winky:
-
Re: [Release] MuServer Shutdown / Start (PHP)
Where is already script to restart pc ;D
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
Quote:
Originally Posted by
Just_Rytis
Thx, nice release, but how to run it if I have web server in Linux and server Windows(2 ps's connected by router) Thx!
Hmmm thats tricky.... I am not sure its possible either....best thing you should do is add an apache server on your windows at a specific port and just add this script there..I dont think you can boot XP from linux or command it like this
Quote:
Originally Posted by
thanh_trum
100000000/10 :)) and hw can it work on mobie :D
Just point your web to "http:// .... the script page..." and it should work. Works with mine
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
-
Re: [Release] MuServer Shutdown / Start (PHP)
lets tell that i have a "cashshopserver" that need to restart evry 6-12 hours .. can you add anything like that? :8:
PS: nice one thnx :P
-
Re: [Release] MuServer Shutdown / Start (PHP)
nde...the files didntwork...then i push start or stop server or reboot sistem noone dont work...a have instaled all correct, the files .bat are created correctly they work, the mufolder are corrent but they dont run in http://<site>/config.php
-
Re: [Release] MuServer Shutdown / Start (PHP)
GJ! Main idea is simple and very, very useful! 100/100.
As for running script under Linux- you can setup SSH server via cygwin on Windows. From this point you'll be able to run UNIX commands at Windows PC.
And you'll have to modify this script to:
1. Connect to SSH on Windows.
2. Commands to restart server.
Well, i think it's much more easier to setup small web server on Windows PC xD