LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   php and unix scripting (https://www.linuxquestions.org/questions/programming-9/php-and-unix-scripting-67448/)

murshed 06-23-2003 07:34 AM

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:)

MArgRes 06-26-2003 03:41 PM

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.

lackluster 06-26-2003 03:45 PM

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 ;)

MArgRes 06-26-2003 03:56 PM

LOL


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