How can i write a script to execute commands on the webserver from a browser?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How can i write a script to execute commands on the webserver from a browser?
# 1  
Old 10-21-2009
How can i write a script to execute commands on the webserver from a browser?

I want to create a script with the php exec() or system() function to execute commands from a remote browser on the webserver. I am open to using Perl or whatever. I am using an Apache2 webserver on Ubuntu.

I have done quite a bit of research on this on google and read lots of responses about permissions of the server, why not use ssh instead etc. etc..

I know of other ways to do this but I am really interested in how I can make this work from the browser. Thanks in advance.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

2. Solaris

write a script to execute some operations on sun solaris

Sun Microsystems Inc. SunOS 5.9 Generic May 2002 SUNFIRE V240 if there is a power failure, automatically: write all operations in a log file (0 Replies)
Discussion started by: doudou2012
0 Replies

3. UNIX for Dummies Questions & Answers

commands to execute unix script

commands to execute unix script (1 Reply)
Discussion started by: sunilamarnadh
1 Replies

4. Shell Programming and Scripting

Execute shell script from browser through php

Hi all, I want to execute a shell script in which I call ssh to execute a remote command. Everything works fine from command line but when I try to call from PHP (with exec or whatever function) it fails. After some time I came to the root cause: when www-data execute the ssh command it asks... (4 Replies)
Discussion started by: Evan
4 Replies

5. Shell Programming and Scripting

Execute ssh commands through bash script

Hi all! I am trying to write a script that will check if a certain directory is available at several different nodes and then do stuff in it ..... On the beginning of the script I give as a variable the directory and the number of the nodes and then I loop like this: for... (3 Replies)
Discussion started by: idet2
3 Replies

6. Shell Programming and Scripting

Execute interactive bash menu script in browser with PHP

I have an interactive menu script written in bash and I would like use PHP to open the interactive bash menu in a browser. Is this possible? Using the sytem() function in php runs the script but it's all garbled. Seems like maybe a terminal window needs to be opened in php first? ... (1 Reply)
Discussion started by: nck
1 Replies

7. Shell Programming and Scripting

write a shell script to execute a command

Hello all, I have just started doing shell scripting. I want to read a file which stores the status of my job I have submitted on a cluster. The file looks something like this : ========================FILE============================= crab: Checking the status of all jobs: please wait... (4 Replies)
Discussion started by: learn_linux
4 Replies

8. Shell Programming and Scripting

Can we execute series of commands from a single script?

Hi, I am trying to call a certain command from within a shell script, but everytime it executes the script, only the first command runs and it comes out of the control, how do i do it? code : ```````` #!/bin/sh # # #i=1 #while #do # i=`expr $i + 1` #done StoreXML -project xnat -l... (2 Replies)
Discussion started by: virendra maloo
2 Replies

9. Shell Programming and Scripting

Pls Help-Script to execute Commands and write to excel file

Execute some commands in script and store result in excel sheet Kindly help me........... (1 Reply)
Discussion started by: Computer_baby
1 Replies

10. Shell Programming and Scripting

how do i get my script to execute multiple commands?

New to shell scripting. I can't get my script to execute multiple commands. Here's the code. It's a menu script. #!/bin/ksh clear print "SDE MENU" PS3="SDE MENU, enter choice:" select clean_menu in "tasdedev instance 5151" "orkindev instance 5155" "tasdetst instance 5157" "orkinsys... (1 Reply)
Discussion started by: hvincent
1 Replies
Login or Register to Ask a Question
AMULEWEB(1)							  aMule utilities						       AMULEWEB(1)

NAME
amuleweb - aMule web server SYNOPSIS
amuleweb [-h <host>] [-p <port>] [-P <password>] [-f <path>] [-q] [-v] [-l <lang>] [-w] [-t <name>] [-s <port>] [-u] [-U <port>] [-z] [-Z] [-A <password>] [-G <password>] [-a | -d] [-L] [--no-php] [-N] amuleweb [--create-config-from=<path>] amuleweb [--help] amuleweb [--version] amuleweb [--amule-config-file=<path>] DESCRIPTION
amuleweb manages your access to amule through a web browser. You can start amuleweb together with amule(1), or separately, any time later. Options can be specified via command-line or via config-file. Command-line options take precedence over config-file options. [ -h <host>, --host=<host> ] Host where aMule is running (default: localhost). <host> might be an IP address or a DNS name [ -p <port>, --port=<port> ] aMule's port for External Connections, as set in Preferences->Remote Controls (default: 4712) [ -P <password>, --password=<password> ] External Connections password. [ -f <path>, --config-file=<path> ] Use the given configuration file. Default configuration file is ~/.aMule/remote.conf [ -q, --quiet ] Do not print any output to stdout. [ -v, --verbose ] Be verbose - show also debug messages. [ -l <lang>, --locale=<lang> ] Sets program locale (language). See the NOTES section for the description of the <lang> parameter. [ -w, --write-config ] Write command line options to config file and exit [ -t <name>, --template=<name> ] Loads the template named <name>. See the SKIN SUPPORT section for details. [ -s <port>, --server-port=<port> ] Webserver's HTTP port. This is the port you must point your browser to (default: 4711). [ -u ] Enable UPnP. [ -U <port>, --upnp-port <port> ] UPnP port. [ -z, --enable-gzip ] Enables using gzip compression in HTTP traffic to save bandwidth. [ -Z, --disable-gzip ] Disables using gzip compression (this is the default). [ -A <passwd>, --admin-pass=<passwd> ] Full access password for webserver. [ -G <passwd>, --guest-pass=<passwd> ] Guest password for webserver. [ -a, --allow-guest ] Allows guest access. [ -d, --deny-guest ] Denies guest access (default). [ -L, --load-settings ] Load/save webserver settings from/to remote aMule. This causes amuleweb to ignore command-line and config-file settings, and load them from aMule. When saving preferences none will be written to the config file, but to aMule. (Of course, this works only for those settings that can be set in aMule's Preferences->Remote Controls.) [ --no-php ] Disable PHP interpreter (deprecated) [ -N, --no-script-cache ] Recompiles PHP pages on each request. [ --create-config-from=<path> ] Create config file based upon <path>, which must point to a valid aMule config file, and then exit. [ --help ] Prints a short usage description. [ --version ] Displays the current version number. [ --amule-config-file=<path> ] aMule config file path. DO NOT USE DIRECTLY! aMule uses this option when starting amuleweb at aMule startup. This option causes all other command-line and config-file settings to be ignored, preferences to be read from the given config file, and also implies the -q -L options. NOTES
Paths For all options which take a <path> value, if the path contains no directory part (i.e. just a plain filename), then it is considered to be under the aMule configuration directory, ~/.aMule. Languages The <lang> parameter for the -l option has the following form: lang[_LANG][.encoding][@modifier] where lang is the primary language, LANG is a sublanguage/territory, encoding is the character set to use and modifier allows the user to select a specific instance of localization data within a single category. For example, the following strings are valid: de de_DE de_DE.iso88591 de_DE@euro de_DE.iso88591@euro Though all the above strings are accepted as valid language definitions, encoding and modifier are yet unused. In addition to the format above, you can also specify full language names in English - so -l german is also valid and is equal to -l de_DE. When no locale is defined, either on command-line or in config file, system default language will be used. SKIN SUPPORT
amuleweb is capable of displaying information in different skins. These skins are called templates, and you can make amuleweb load a spe- cific template via the -t command line option. Templates are searched in two places: first in ~/.aMule/webserver/ and then in /usr/share/amule/webserver/ if you installed with --prefix=/usr. Each template must be in a subdirectory of the template name, and this directory must contain all files the template needs. FILES
~/.aMule/remote.conf ~/.aMule/webserver/ $(pkgdatadir)/webserver/ EXAMPLE
Typically amuleweb will be first run as: amuleweb -h hostname -p ECport -P ECpassword -s HTTPport -A AdminPassword -w or amuleweb --create-config-from=/home/username/.aMule/amule.conf These will save settings to $HOME/.aMule/remote.conf, and later you only need to type: amuleweb Of course, you may specify any more or less options on the first example line, and you may also totally omit it. REPORTING BUGS
Please report bugs either on our forum (http://forum.amule.org/), or in our bugtracker (http://bugs.amule.org/). Please do not report bugs in e-mail, neither to our mailing list nor directly to any team member. COPYRIGHT
aMule and all of its related utilities are distributed under the GNU General Public License. SEE ALSO
amule(1), amulecmd(1) AUTHOR
This manpage was written by Vollstrecker <amule@vollstreckernet.de> aMule webserver v2.3.1 November 2011 AMULEWEB(1)