Re: SSH and php

From: Date: Mon, 17 Nov 2003 16:21:29 +0000
Subject: Re: SSH and php
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-169961@lists.php.net to get a copy of this message
Ryna -- ..and then Ryan A said... % % Hey David, Hiya! % % % Is it possible to run a SSH command from php? % >Sure; it's possible to run any command from php. It may not work all % >that well, though :-) % % heheh, good one. As helpful as usual :-D Always there for ya, man :-) % % >Good enough. What do you want to do? % % Basically stop/restart apache when i make changes to the httpd.conf file. There are ways to do that -- I personally would create a kick script outside of the htdocs tree, give the apache user permission to run that, and call that script from an https page with some authentication -- but you always have to fall back to "if that script fails, then I need to log in and use the shell" anyway. % But then thinking of it I realize that if I stop apache from a script, once % apache is stopped % I cant run any php to restart it...right? You certainly can't run any php web script :-) % So I guess my question gets cut down to basically "any good place/program to % learn/use SSH?" As you've been shown, ssh is nothing magical; what you want to do is learn how to use a *NIX shell. Think DOS command prompt. If you can already use a command prompt, then try an ssh in and look around (ls, chdir, pwd, ...). HTH & HAND :-D -- David T-G * There is too much animal courage in (play) davidtg@justpickone.org * society and not sufficient moral courage. (work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

« previous php.general (#169961) next »