html buttons to launch server-side scripts
Hello forum members,
I'm trying to create an internal website as an interface to my (Ubuntu) server to run a number of scripts (server-side). I'm a newbie when it comes to creating websites, but what web language can I best use / study for accomplish my goal. I've already started with PHP but haven't found a way to launch server side shell / python scripts by clicking on a picture / button. Thanks for your reply Talita |
Check out the system function of php or the exec funtion.
Somethings you might run into are the permissions. Normaly a webserver is run under a specific user that might not have acces to all binaries or path you like. You might solve this with a sudo line or the apropiate su module of apache (cant recall exact name right now). If you show us what you have got so far we are able to help you out much better. |
Hello zhjim,
For now I've just got a basis HTML page, but I'm trying to gather the knowledge how to link the scripts (phyton) to the pictures. Code:
<html> |
You could use the on_click function of javascript. Either call a function that handles the rest or just directly call another page
Quote:
Why not first try to run your scripts directly? Namely create a webpage that once opened runs the script you want to. This way you don't have to fight at two fronts. After that do the img click thing. And once both parts work individualy you tie them together. |
1 Attachment(s)
Here's what I do to put a button under each pic in a table
Code:
<html> Attachment 18726 all the scripts are in "cgi-bin" in the root of the server and the config part of /etc/apache2/sites-available/default is Code:
NameVirtualHost *:80 Hope that this gives you a start. P.S. The 'Allow from ... ' bit is so that the scripts are only executable form the LAN and not the internet, remove that bit if you want anyone to execute your scripts. |
Hello Keith,
As far as I can understand your code your using a 'post' method. So I will try to read up on that topic. Any good suggestions to start from? And thank-you al for your your replays! Talita |
Yes this is bash script for the 'uploadimage' button:
Code:
#!/bin/bash -e |
All times are GMT -5. The time now is 11:11 PM. |