On Thu, 06 Mar 2014 12:42:52 -0800, bishop2001 wrote:
> Greetings,
> I am trying to execute a shell script which is residing on a webserver
> on a remote machine with no luck. I have tried the following. It looks
> like it runs but I never see the output from the script on machine2. Any
> suggestions. Thanks,
Firstly, you say "It looks like it runs"
What evidence do you have for this?
What entries appear in the webserver logs on the server after attempting
this? You probably want to check any log file in the apache logs dir that
has it's timestamp modified when you try and access the script.
> from machine1:
> <?php $ch = curl_init();
> curl_setopt($ch, CURLOPT_URL, "
http://machine2/script.sh");
> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_exec($ch);
> curl_close($ch);
> ?>
What entries appear in the webserver logs on the server after attempting
this?
Are you sure that the webserver is configured to run .sh files as shell
scripts and pipe the output of the script back to the http session?
Are you sure that the script is executable by the webserver process?
Execute permissions for relevant users / groups / world?
--
Denis McMahon,
denismf...@gmail.com