LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-23-2003, 07:34 AM   #1
murshed
Member
 
Registered: Jan 2002
Posts: 157

Rep: Reputation: 30
php and unix scripting


hi all

how could i run a bash script from the web?

to make my question clearer,

i want to run a bash script using a php page, for the following events:

1. when i run the page, script A runs
2. when i close the same page, script B runs
3. text area that would let me put any command and submit it ( results are not important to be shown)


thanks
 
Old 06-26-2003, 03:41 PM   #2
MArgRes
Member
 
Registered: Jun 2003
Distribution: Fedora Core 2
Posts: 37

Rep: Reputation: 15
I don't know if you want to hear this, but unless you're planning on doing this on your own system and not planning on having anyone from the 'net access it, it would be a BAD idea!!! If someone else was allowed to input a shell script and execute it, your system would be compromised in nothing flat.
 
Old 06-26-2003, 03:45 PM   #3
lackluster
Member
 
Registered: Apr 2002
Location: D.C - USA
Distribution: slackware-current
Posts: 488

Rep: Reputation: 30
you've been warned ....

goto php.net and look up the following:
` (backtick)
exec ()
system ()

you can also make bash scripts executble and call them directly.

BIG SECURITY RISK! PLEASE DON'T DO IT.

but if you do, send me the link
 
Old 06-26-2003, 03:56 PM   #4
MArgRes
Member
 
Registered: Jun 2003
Distribution: Fedora Core 2
Posts: 37

Rep: Reputation: 15
LOL
 
  


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
Linux to train team members in UNIX scripting bogsdb Linux - Software 4 10-27-2004 05:42 AM
Unix Shell Scripting, detecting the enter key WinterSt Programming 7 09-01-2004 08:27 AM
unix scripting lapthorn Programming 7 03-11-2004 09:03 AM
advantages of php over other scripting languages? spyghost Programming 1 09-21-2003 10:29 PM
scripting the unix command script lmcthbe Linux - General 7 05-28-2003 02:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:59 PM.

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