View Full Version : Run .sh file from a web page

02-08-2006, 03:01 PM

Is it possible to run a .sh file for example ./go.sh located on a server, from a web page.

thanks in advance

02-08-2006, 03:51 PM
... from a web page.
what do you mean by that? initiate it from the client? Then you're in the wrong forum.
If you mean to initaite it by the server, when a web-page is requested or processed, then have a look at http://www.php.net/manual/nl/ref.exec.php

02-08-2006, 04:12 PM
Well i have a .sh file situated on the server, which runs a series of scripts.

if i opened a terminal window and ran this script, it works fine.

but what i want to do is have a button on a web page which would run this script.

02-09-2006, 09:08 AM
your button will need to be a submitbutton or an image with a link on, that posts to/requests a php-page. Inside that PHP page, you can then use exec() or so to run the .sh (check the link i posted for more info)

02-09-2006, 10:30 AM
thank. i'll try that now