LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2006, 01:51 AM   #1
anirbande
LQ Newbie
 
Registered: Dec 2006
Location: Bangalore
Distribution: Fedora Core 3
Posts: 3

Rep: Reputation: 0
Running a shell script from a web page


Hi,
This is my first post here and I am new to Linux

I want to run a shell script from a HTML page
But my Apache Server gives errors when i execute a perl script (Internal Error)
Security is no concern here.
I want to configure /etc/httpd/conf/httpd.conf
so that it run shell scripts from any where in the server.
If u know how to write simple shell commands in perl plz advise

My AIM: I will have an Apache server running. A web page will be hoisted on that which will have options for running several commands as well as shell srcipts on the server without any security concern, remotely

The web page may be in Perl or HTML
 
Old 12-01-2006, 02:36 PM   #2
Renars
LQ Newbie
 
Registered: Aug 2006
Location: Bauska, Latvia
Distribution: Ubuntu, Fedora
Posts: 29

Rep: Reputation: 15
It doesn't have too much to be done with apache. The main key in this is PHP. You can try using PHP's system() function, like

Code:
<?php system("/usr/bin/uptime"); ?>
or any other program. Just make sure the executable's permissions are set correctly, so the user which apache (php) runs on, can execute it.

Also you may be interested in PHP shell that will allow you to execute commands from webpage.
You can download it from http://spider-it.eu.org/download.php?view.9

Cheers.

Last edited by Renars; 12-01-2006 at 03:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script to submit web POST data? Yalla-One Programming 5 11-03-2006 05:21 AM
simple script to grab an image from a web page and set background stardotstar Programming 43 09-11-2006 11:52 PM
How do I display real shell script output to web page. farmerjoe Programming 1 04-07-2005 02:03 PM
Kicking off a script form a web page Hazzie Programming 2 04-26-2004 02:09 PM
c/c++ running a shell script? thermalpants Programming 3 05-12-2002 12:41 PM


All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration