|
|
#1 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2009
Posts: 1,354
Reputation: 64
|
Im trying to make a server control commands so you can start/stop server from where ever you want but i cant :/
can anyone post how i can start/stop server using php? my server path is F:\Server\samp-server.exe |
|
|
|
|
|
#2 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: United Kingdom
Posts: 2,086
Reputation: 258
|
string exec ( string $command [, array &$output [, int &$return_var ]] )
Edit: for example, exec("C:\sampsvr\samp-server.exe"); |
|
|
|
|
|
#3 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2009
Posts: 1,354
Reputation: 64
|
|
|
|
|
|
|
#4 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: United Kingdom
Posts: 2,086
Reputation: 258
|
|
|
|
|
|
|
#5 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Feb 2011
Posts: 205
Reputation: 51
|
dont use exec on windows
evr learn SSH (linux), it's cheaper and more affective. |
|
|
|
|
|
#6 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2009
Posts: 1,354
Reputation: 64
|
|
|
|
|
|
|
#7 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2010
Location: Croatia
Posts: 512
Reputation: 25
|
Take a look at Westies Windows control panel (use search). Download it, browse PHP files a bit and find exec() command he uses to start server.
|
|
|
|
|
|
#8 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jul 2009
Posts: 879
Reputation: 57
|
I don't use exec() for starting anything.
Ever. It hangs. For Linux, I use a combination of proc_open and proc_close, and for Windows I use the WshShell COM object. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't Start Server | Sascha | Help Archive | 4 | 17/06/2011 02:15 PM |
| Server won't start | TKZ227 | Server Support | 3 | 17/07/2010 08:57 PM |
| Server doesn't start up | Andom | Help Archive | 4 | 02/09/2009 11:36 AM |