Server :: Which Php Command For Shell Interaction Shall Use?

Dec 26, 2010

As homework for my study I have to do some kind of browser GUI to send commands to mysql command line tool and to show the output in the browser. I already set up sudo to have the right permissions for the www-data user. In the php documentation I found that one of the following four commands are probably for tasks like mine.

exec
passthru
shell exec
system

Can anyone tell me which one is the best for my requirements? The idea is to use php from the browser to connect to mysql like on the command line with: "mysql �user=username �password" And then give back the output of the command line to the browser. If the above is working then the next step would be to put a link in order to execute the command �show database;� again through php by clicking that link. After clicking this link it would give back to the browser what the command line would display.

View 4 Replies


ADVERTISEMENT

Software :: Interaction With CUPS Server Takes Over Minute?

Apr 26, 2010

This has been raised as redhat bugzilla bug 583054 - seeI am posting here in case anyone else has dealt with a similar problem. In brief, I have a print server running Fedora 12/CUPS dual boot WinXP. The attached printer is a Canon BJC-4100. When the server is booted in F12, it takes over a minute for a networked Fedora 12 box to bring up a print dialog, or for the printer to start after a page has been submitted. When the print server is booted in WinXP, printing is immediate.

Tim Waugh identified the problem in the CUPS Troubleshooter output:
'D [10/Apr/2010:09:00:20 +1000] cupsdNetIFUpdate: "lo" = localhost:631',
'D [10/Apr/2010:09:00:37 +1000] cupsdNetIFUpdate: "eth0" = 192.168.0.199:631',

[code]....

View 3 Replies View Related

Server :: Shell Command Over Ssh-keygen

Apr 14, 2010

I have 2 servers, let say server1 and server2. I have create ssh-keygen from server1 to server2, I can ssh from server1 to server2 without typing a password. My question is: How can I use command from server1 to server2? for example I want to list file in server2 /home directory from server1.

View 1 Replies View Related

Server :: Web Interface To Some Shell Command

Oct 22, 2010

I want to create for my private use, a simple web interface to manage some easy task (useradd, userdel, passwd, etc...).I have some basic knowledge of PHP; how can I realize this? PHP as module or CGI? Which is better in this case?

View 12 Replies View Related

Server :: Dos2unix Command In Shell Scripting?

Jul 5, 2011

I am new to shell scripting..I really need ur help or guidance here..I have a text file where i have to use dos2unix command.

Now the problem is how do i pass dos2unix command in the shell scripting after it had read the text file ??
And give out the new text file.

View 3 Replies View Related

Server :: What Is The Shell Command Which Allows To Know How Many Opened Sessions On A Mysql?

Jul 6, 2010

1-what is the shell command which allows me to know how many opened sessions on a mysql server?

2- what are the important points we can manage in a mysql server?

View 2 Replies View Related

General :: Shell - Connect From Command Line To FTP Server With Proxy?

Aug 15, 2011

I want to connect to an FTP server from the Linux command line. The server is configured behind a proxy.

If I call:

echo $ftp_proxy

I get a result like this:

abc.def.ghi.jkl:8080

If I call:

ftp -pn $ftp_proxy

I get a unknown host error.

How can I connect to the FTP server using the Linux command line?

View 1 Replies View Related

Ubuntu Networking :: Connect OpenVPN Server Using Shell Command?

Feb 15, 2010

I'm trying to connect OpenVPN server using shell command.

I've installed all needed packages (I guess)

if type

Code:
sudo openvpn client.ovpn
and i've got messages:
Code:
Mon Feb 15 12:29:25 2010 OpenVPN 2.1_rc19 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Oct 13 2009

[Code]....

but i can't see tap0 interface and cannot ping any address at remote location.

I tried this config file at Windows OpenVPN client and all works fine.

View 2 Replies View Related

Server :: Shell Command Which Allows To Have Number Of Requests/seconds Under Apache?

Jun 26, 2010

1-Can I have the shell command which allows me to have the number of reques ts/seconds under the Apache server?

2-And the number of sons threads in service/wait?

View 3 Replies View Related

Server :: Shell Scripting Command Line / Getting Error While Passing Parameter?

May 6, 2011

I am very new to shell scripting.How does one pass a command-line parameter to a shell script?for the below program
#/bin/bash
mount -t cifs -o user=ramkannan,password=Linux123@ //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql

I want to pass parameter for everything,i tried in google and did but iam getting error while passing parameter to all

#/bin/bash
mount -t cifs -o user=$1,password=$2 //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql

i was getting error while passing parameter to all.

View 2 Replies View Related

Ubuntu :: Install Packages W/o Interaction On Ubuntu Server?

Jan 15, 2010

I have a big list of packages to install on a lot of ubuntu servers. Initial testing shows that the script doing this hangs because some packages are trying to do "human interaction" to configure the packages.I don't need, or want, this configuration to take place. Configuration files will be added later for what needs to be configured to my needs. I'm using apt-get, with the --assume-yes option, giving it the full list of all packages all at once (including some to be removed).

What I'm looking for is a way to get these packages to just install without the interaction. Whatever configuring it can do w/o interaction is fine; I work from that. But this all definitely needs to run headless (the script logs output to a file in /tmp so if there are problems that can be examined later).

View 3 Replies View Related

Programming :: Show The Output Of Shell Command Into A Textbox, Ex Ps -efc Command?

Oct 20, 2010

I am using gtk to program GUI. How can I show the output of shell command into a textbox, ex ps -efc command ?

View 3 Replies View Related

Ubuntu :: Using 10.04-server 64bit AMD With Fluxbox - Matlab In A Shell The Shell Does Not Display Characters Anymore

Jul 26, 2010

I am using ubuntu10.04-server 64bit AMD with fluxbox. After I ran Matlab in a shell (without GUI) the shell does not display characters anymore, but will execute any command, I just can't see the characters that I'm typing.. I use aterm and xterm, does anybody know why that is, am I missing a package?

View 1 Replies View Related

Software :: Palm - TX - Interaction ?

Aug 31, 2010

I had to get a new workstation and its Win7-64. I found out that my Palm TX will not work on their or is supported by the manufacturer (unless u have bluetooth, I dont). So I have been trying to get it to work on my Debian. Using "Palm Devices" "Gnome-Pilot" connects fine and backs up but I dont see any kind of GUI like Palm Desktop. So I still cant work with my palm or install software etc.

View 2 Replies View Related

Networking :: Interaction Between Host And Guest OS

Aug 28, 2010

I have installed Red Hat Eterprise Linux as a Guest OS using VirtualBox on the Host OS Windows XP SP 2 on my PC. I want to access my local / intranet web site from this Guest OS which is running on the top of on Windows XP, the Host OS. I am not sure as to what IP Settings I need to do. Though I am able to access Internet from both the OSes. The IP of this Guest OS is:

Code:
[root@localhost ~]# ifconfig eth0
eth0
Link encap:Ethernet HWaddr 08:00:27:30:E9:72
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:e972/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1871 errors:0 dropped:0 overruns:0 frame:0
TX packets:1926 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1427538 (1.3 MiB) TX bytes:415769 (406.0 KiB)
Interrupt:11 Base address:0xd020
[root@localhost ~]#

I have installed Microsoft Self Loop Adapter (Autoconfiguration IP Address: 169.254.25.129) on the Host OS Windows XP. There is another adapter: VirtualBox Host-Only Network whose IP Address is: 192.168.56.1. So, how can we access intranet web site from the Host OS to Guest OS and vice versa. I also want to access this virtual Red Hat machine /console from within windows XP using PUTTY application. From Windows XP the Red Hat machine is pinging. But when I use the IP to access the machine through PUTTY it doesn't work.

View 17 Replies View Related

General :: SQL Anywhere Developer Edition: How To Start Without Interaction

Feb 12, 2010

I'm using SQL Anywhere 10.0.1.3415, on Debian 5. For starting the DBMS, I use this commands:

Code:
# source /opt/sqlanywhere10/bin32/sa_config.sh
# dbsrv10 /home/demo.db

[code]....

View 4 Replies View Related

Networking :: Slow Interaction Between Ubuntu Samba And Xp?

Nov 18, 2010

slow interaction between Ubuntu samba and xp.I have a and Ubuntu server with samba and many xp clients, they complain because the time to open a file is to long, even to open a directori to see wich files are on it

View 2 Replies View Related

General :: Boot From Encrypted Filesystem Without User Interaction?

Mar 24, 2010

Is it somehow possible to boot a Linux operating system from an encrypted filesystem/disk without having uesr interaction? Background: I am preparing a VmWare Image for shipment to a customer. This image contains sensible data. The only access granted shall be via an apache server running from inside in the image.

View 1 Replies View Related

Ubuntu Servers :: Script To Automate Website Interaction?

Mar 21, 2010

Here is what I have. Everyday I go to 8 websites that require entry of a username and password. When I've logged in, I select exactly the same info using the sites navigation and specify a report generated by the site. I then tell the site to save as an excel file and save it as an existing spreadsheet, 8 times for eight different files

How can I make this more direct? Can a script be written that provides username and password, selects the parameters I want, saves the spreadsheet and goes to the next site to repeat the process and save under a different name?

This would be used in a Windows XP/IE 7/corporate environment.

View 7 Replies View Related

Ubuntu Networking :: Seeking Home LAN Sharing & Interaction

Dec 27, 2010

I have several linux laptops and a desktop-server running Ubuntu Lucid. I also have Android(tm) and iPhone(tm) devices. All of these connect to my at-home LAN using wireless or wired ethernet through my home-LAN router+gateway and on through the cable modem. In addition, printers are network capable and deployed on the same at-home LAN. All of that works.

Now I want these various and several computers to share files and services (web, print, media) with each other and interact with each other on this same at-home LAN. Can someone point me to a HOWTO or similar application notes that discuss what I need to do? Since all of the at-home LAN devices use DHCP and get dynamic IP addresses, any /etc/hosts files that I create stop working when leases renew. I can configure "fixed IP address" settings, but then wifi roaming is a royal pain in the anatomy -- at least the ways I know how to do this.

I can use the router+gateway to give a specific IP address to each hardware (MAC) address, but then when folks visit it is irksome to setup so that we might give or get the odd file or they might print the odd document. I vaguely remember that there was a way to generate dynamic "local network" host names or similar attached to dynamic "local network" IP addresses all under the control of DHCP-server and supporting utilities. I'm dashed if I can find anything about that other than really antique details. Once folks stop laughing at what I'm certain is a totally noob question, I hope that there is a solid HOWTO that just works out there and that some kind soul will tell me where to find it. I apologize in advance if this question has been asked and answered in the past. One must know enough to know what to search for and get meaningful results. ~~~0;-/

View 6 Replies View Related

Software :: Gimp Script-fu Or Python-fu User Interaction?

May 16, 2010

Is it possible to get user interaction in these scripts? They are for batch processing is my belief so perhaps not, but I would like to make a function whereby I can click it, a selection box of an exact size appears, I then place the selection box and press something, a new file is born. Is this possible?

View 1 Replies View Related

Ubuntu :: Interaction Between Cairo And Compiz Window Preview Plugin?

Jun 9, 2010

Ubuntu 9.10
Kernel 2.6.32-22-generic

I'm attempting to replace gnome-panel with cairo (also called glx dock), but I'm noticing some strange interaction between cairo and compiz. I have the Window Previews compiz plugin enabled, but the cairo dock only previews the window when the window is already visible on the desktop. If the window is minimized, the plugin doesn't seem to work. Have I missed a crucial configuration option somewhere? I'll attach some screenshots to try to clarify the problem. Notice the placement of the mouse over the left-most icon on my dock in both screenshots.

View 2 Replies View Related

Security :: Low Interaction Honeypot (based On Nepenthes) Worm Infection?

May 19, 2010

I have snipped part of my log i captured on the my honey pot need recommendation on what is going o? The infected computers is located at address ${ADDRESS}. A quick check of my low interaction Honeypot (based on nepenthes) gives the following data: i know its a worm but what is going on thanks in advance

linux-sqos:/opt/nepenthes/var/log # cat nepenthes.log
<snip>
[18032007 02:26:03 info module] 76 4
[18032007 02:26:03 info module] SMB Session Request 76
H CKFDENECFDEFFCFGEFFCCACACACACACA
code....

View 2 Replies View Related

General :: Run A Shell Command With &?

Jun 15, 2010

I am using Red Hat Linux Enterprise version 5. I've noticed people sometimes running commands with a couple of & options. For example, in the below command, there are two & signs. What is the purpose of them? Are they always used together with nohup?

nohup foo.sh <script parameters> >& <log_file_name> &

View 6 Replies View Related

Debian Programming :: How To Use Shell Command

Sep 6, 2013

How to use shell command?

installs.sh:

Code: Select allapt-get install icedove-l10n-hu
apt-get install rar
apt-get install ...
...
y press key or other language is other key. hungarian key is: i

english after apt-get install in gnome-terminal: (y)es or (n)o
hungarian after apt-get install in gnome-terminal: (i)gen or (n)em

How to yes or no automatically in all languages? Not manual, not 'Y'/'I' or 'N'/'N' keydown.

I would like use this script my fresh installed Debian 7.1. I would like run this install.sh when Debian is installed for my all softwares when i would like use.

10 PC installing easy and faster my script.

If no script is slowly install for my 10 PC.

View 2 Replies View Related

Ubuntu Networking :: How To Run Ssh Shell Command

May 10, 2011

command1:
ssh pt@192.168.1.101 ls
command2:
ssh pt@192.168.1.101 totem ~/t1

Cannot open display: Run 'totem --help' to see a full list of available command line options. command1 can run, command2 can not run,would you mind to tell me why?

View 2 Replies View Related

Programming :: Detection Of A Command In Shell?

Apr 2, 2010

I would like to know if there is any way to detect a command if it going to be executed in the shell?

Eg:
Cmd: sudo apt-get clean I want a C program to be called before this cmd is executed.

View 8 Replies View Related

General :: Looking For System Shell Command?

May 31, 2011

I'm looking for a specific command,if it exist... i want to login from my server to another Linux server,but the question is: can i do it in a one line command for ex:
usually you type: ssh "user"@10.1.1.1 and then the password,but I'm looking for a command in one line a fake ex: ssh user@10.1.1.1 -p "password" something like that.
I don't know if anyone of you understand what do i want to say .

View 6 Replies View Related

Programming :: Executing Shell Command In JSP

Aug 24, 2010

what we are trying to do is, to let the customer click a button in the web browser, and then the web server to call a shell script to do the work. The output from the stdout && stderr of the script should be displayed in the web browser once finished or timeout, along with the exit code of the script.

The shell script is however not on the web server, but on another app server. So to call this script from the web server as the identity 'tomcat':

Code:
$ sh appuser@app-server:$appbin/app-script

The .ssh/id_rsa.pub thing is done, and we have no problem doing this in the command line so far.

Our loaded ex-colleage has left us the webpages (jsp) with code like these:

Code:
<%@ include file="jsp_functions.jsp" %>
<%
String cmd = "sh $appbin/app-script";
ExecResult r = new ExecResult();

[Code].....

View 6 Replies View Related

General :: Shell Command To Let System Box Go Sleep?

Jun 21, 2010

I'm writing a shell script to check the I/O activity of a Linux box and if the server is quiet for a certain long time, the script should let the server go to sleep. But, after some Google searching, I didn't find a answer yet. Is there a shell script command to put a Linux box to sleep?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved