Re: [PHP] (0/T) executeing script below public

From: Ryan A (ryan_at_coinpass.com)
Date: 12/15/03


To: "Bob Eldred" <bobathome@aqfl.com>
Date: Mon, 15 Dec 2003 00:30:29 +0100

Hey,
thanks, didnt know that.
But is it possible to also add the start or stop parameter?

Cheers,
-Ryan

> You could just as easily
>
> <?php shell_exec("/path/to/script/scriptname start"); ?>
>
> Assuming that:
>
> 1) the webserver has rights to execute the script
> 2) you *must* execute this from the webserver
> 3) it's not a script to start/stop the webserver (since you obviously
> wouldn't be able to start it this way)
> 4) your php script is properly secured.
>
> Otherwise, just SSH in. It's more secure and just as easy.
>
> Bob
>
> ----- Original Message -----
> From: "Ryan A" <ryan@coinpass.com>
> To: "Jay Blanchard" <jay.blanchard@niicommunications.com>
> Cc: <php-general@lists.php.net>
> Sent: Friday, December 12, 2003 2:21 PM
> Subject: Re: [PHP] (0/T) executeing script below public
>
>
> > Hey,
> > Thanks for replying.
> >
> > The server is on Linux and is remotely hosted, my local machine is on
> win2k
> > pro.
> >
> > A client wants me to set this up, I have setup the whole thing but this
> > needs to be started....
> >
> > you keep mentioning "command line", what command line?
> > You mean I should SSH in?
> >
> > (As you can see, am a newbie in shell scripts and ssh etc - kindly
excuse)
> >
> > Kindly reply.
> >
> > Thanks,
> > -Ryan
> >
> >
> >
> >
> >
> >
> >
> > [snip]
> > #!/bin/sh
> >
> > <scriptname> start
> > (or)
> > <scriptname> stop
> > [/snip]
> >
> > It is a shell script. They are usually placed in /usr/local/bin/ and
> > chmod'd to execute. To run it you type this at the command line;
> >
> > scriptname start
> > (or)
> > scriptname stop
> >
> > This script accepts one argument, either 'stop' or 'start'
> > [/snip]
> >
> > I should have added that you can run them from other folders using the
> > './scriptname arg' from the command line. Depends on OS
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
>



Relevant Pages

  • Re: pppd pty equivilent in FBSD
    ... I let pppd manage retries & setting routes. ... >I wouldn't personally recommend vpn over ssh for anyone either, ... I'm the sole bsd user at my company, and the ppp over ssh ... >Actual bash script I call: ...
    (freebsd-net)
  • Re: [kde-linux] Sessions names
    ... ssh 192.168.2.80??? ... You can write a wrapper script that would start ssh to some ip and rename the ... konsole session dynamically. ... dcop call to konsole you need to know the pid of konsole. ...
    (KDE)
  • Re: Hacker activity?
    ... >login to a server, most as root but some are attempts to login to ... >telnet, all come from the same remote server, and all fail. ... >getting some odd cgi calls to a script on a secure ssl server. ... Make sure root cannot login to your system via ssh. ...
    (freebsd-questions)
  • Re: Learning Expect - Some help with a straightforward script + advice on cleaner ways to do thi
    ...  This is the first script of a few to go across multiple servers, but basically I have a very, very, very outdated hosts file that needs to be updated, as well as servers whose ... This script is used to ensure servers are up and running. ... # Need a way to check for an ssh time out/hang on connect ... # - Checking if the ssh session is connecting and then getting term'd ...
    (comp.lang.tcl)
  • Re: Ive been hacked...tips for a postmortem?
    ... > for keywords, like the email address in the `mailme' script, see if it ... www.openssh.com) That SSH1 is not to be used for anything other than ... SSH at all. ... an SSH vulnerability is to place in your startup scripts (usually rc.M, ...
    (comp.os.linux.security)