On Jun 12, 4:15 pm, Michael Vilain <vil...@NOspamcop.netwrote:
In article
<c1620cd5-0506-440a-b259-f0e815e64...@a70g2000hsh.googlegroups.com>,
inetquestion<inetquest...@hotmail.comwrote:
I am looking for a web interface for shell commands or shell scripts.
Does anyone know of any exexisting php scripts which would solve this
requirement?
PHP form accepts input from a user, then passes these as arguments to
a configurable shell script or OS command. I would like for the
output generated from the shell script/command shall be displayed in a
new javascript window once the form is submitted. Optimally a user
should not not be able to make the program run more than once from
within the javascript window by reloading the window. program
execution shall only be caused by submitting the original form.
-Inet
Sounds like a homework assignment or something assigned in a beginner's
PHP class. Why not try to write you own version and when you get stuck,
post your problems to this group. You might learn something. Just a
thought.
Alternately, you can look at some of stuff in various php libraries.
Lots of php developers from various countries have posted code to
various PHP sites (hint: it starts with "g" and ends with "e").
Lots of the requirements were simplified down to make the request seem
simplistic and consumable to a broader base. I assure you I'm long
past homework problems. :)
The root problem I'm trying to work around is I have a shell script
that SSH's out to many servers using ssh key-pairs and performs
various commands on each one (based on the input options/arguments)
This needs to run as a specific user and needs for the environment
from which it runs to be setup properly. when I setup a php based
form to execute these commands, the shell it runs under is...limited
at best. I have even tried sourcing the user's .profile as part of
this routine, but that didn't' get me much farther. Is there a way to
control what user the script will actually run as? Now back to my
original questions... Are there any php utilities anyone knows of
which can serve as an interface to a shell script or command line?
-Inet