Jump to content
  • 0

Start and Kill emulator trough PHP


Angelisk

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  128
  • Reputation:   32
  • Joined:  01/21/13
  • Last Seen:  

Hello all, I would like to ask for help to someone with some knowledge around php/centos.

 

What should I do to make possible to start and kill the emulator? the ~end session~ button (or kill) would call the ssh command "killall map-server_sql", and the ~start~ button 2 commands "cd /home/emulador/" and "./map-server_sql". I already tried to do it, some commands work fine, but these 2 doesn't. The php returns no error and the commands simply doesn't work.

 

Ps: This would be placed in an already existent admin panel.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  79
  • Reputation:   6
  • Joined:  12/10/13
  • Last Seen:  

Maybe your error is due you need privileges to execute these commands? or maybe could be easier if you make 2 bash files or w/e is called in Linux and then you execute those files with php instead of running the ssh commands, idk  /hmm

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  128
  • Reputation:   32
  • Joined:  01/21/13
  • Last Seen:  

Sry :c, I just managed to handle this.

 

Also I need to re-upload the page each time I change something @_@ (like turning on/off the servers) - this is rly bad

Edited by Angelisk
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...