LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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, 12: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, 01: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 02:02 PM.
 
  


Reply



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 04:21 AM
simple script to grab an image from a web page and set background stardotstar Programming 43 09-11-2006 10:52 PM
How do I display real shell script output to web page. farmerjoe Programming 1 04-07-2005 01:03 PM
Kicking off a script form a web page Hazzie Programming 2 04-26-2004 01:09 PM
c/c++ running a shell script? thermalpants Programming 3 05-12-2002 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:30 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
Open Source Consulting | Domain Registration