Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
> Using PHP to execute a shell script, ...and I've got it half-working.
Westie
post Mar 4 2008, 06:19 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 1
Joined: 4-March 08
Member No.: 13,363



I'm in the process of making a game control panel for my game-server, and part of that is making a PHP script that can kill process ID's. (Yup... I am aware of the risks.)

I'm using this code as a basis:
CODE
<?php
    echo `gtaserver kill westie`;
?>


where the result (as it should be) is this:
CODE
Server for westie has been shut down. (PID: 9340)


There seems to be a wee problem. If I use the gtaserver in PuTTY, it would kill the game-server, but if I try in PHP, it won't kill it. Nice.

I had a check with exec('whoami') and the user/group for apache is nobody.

So how would I go about getting this to work/giving apache the permission to use this?
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2017 - 08:09 PM