Execute interactive bash menu script in browser with PHP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute interactive bash menu script in browser with PHP
# 1  
Old 12-14-2009
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?

Thanks for any help.
# 2  
Old 12-14-2009
if your writing a command line PHP script then yes. If your executing this from a web browser then no.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute function as soon as input is provided in menu drive shell script

Hi All, I have a menu driven scripts. As you know while running the script we have to input the option such as 1,2, and 3 to execute function accordingly. but after selecting the input we have to press Enter. My requirement is to execute function as soon as we press the option. Is there... (5 Replies)
Discussion started by: kiran_j
5 Replies

2. Shell Programming and Scripting

Bash interactive Script Required

Dear All, Please help in creating a bash script to fetch records from multiple files the script should ask inputs of file type and column level input(at least 4 col of each file type) I have 4 sort of Files, A,B,C,D. file names are like A_0112.unl, A_01215.unl, A_0001.unl and same with B C... (3 Replies)
Discussion started by: Muhammad Ali
3 Replies

3. Shell Programming and Scripting

Creating an Interactive Bash Script to Analyze a PCAP

Hello Everyone, I am currently trying to write a Bash Script to call a PCAP file. The command I will use in the script will be the following: tshark -r test.pcap -T fields -e frame.number -e frame.time -e eth.src -e eth.dst -e ip.src -e ip.dst -r ip.proto -E header=y -E separator=, quote=d -E... (4 Replies)
Discussion started by: MrTuxor
4 Replies

4. Shell Programming and Scripting

Non interactive su in bash script

Hi, I have a python gui which allow users entering the root password, then a bash script is called to run "su" with the root password on the background. I could find a way to run "su" with a password. How to run "su" in a bash script without password prompt? Thank you. (4 Replies)
Discussion started by: hce
4 Replies

5. Red Hat

Interactive PXE Boot Menu

I have been asked to modify our PXE server such that there will be only one entry in the pxelinux.cfg/default file, where the same kernel and initrd.img will be used regardless of what operating system is to be installed, and the user will type in the path to the kickstart file that will be used. ... (7 Replies)
Discussion started by: ceb
7 Replies

6. 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

7. Shell Programming and Scripting

Bash interactive installation script

Hi, for an exercise I need to write a script that will ask the user about each package in a (local) repository and install it or not according to the user's input. I am fairly new to scripting, so I did not get very far. Here is what I came up with. I really appreciate your help. ... (1 Reply)
Discussion started by: Softsmid
1 Replies

8. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: bash_in_my_head
0 Replies

9. Shell Programming and Scripting

Interactive Array Menu

This should be simple, but i haven't done it before... KSH I am reading a file into an array and currently displaying the values to the screen. What I need to do is to display a subset of those values, likely numbered, and prompt the user to select one. When they enter the number, it... (2 Replies)
Discussion started by: gecko2424
2 Replies

10. Shell Programming and Scripting

Interactive menu

Hi ,some time ago i did an interactive menu based on eval function for navigation , one of the post remind me it. I think it could be handy for others. #!/usr/bin/ksh keyRead () { tput smso echo "Enter option." tput rmso oldstty=$(stty -g) stty -icanon -echo min 1 time 1 Answer=$(dd... (0 Replies)
Discussion started by: Klashxx
0 Replies
Login or Register to Ask a Question