LinuxQuestions.org
Review your favorite Linux distribution.
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 07-15-2006, 03:01 AM   #1
omid1979
LQ Newbie
 
Registered: Oct 2003
Location: IRAN
Posts: 27

Rep: Reputation: 15
running iptable command as php programming


hi all
I want to run iptable script insert in my file at "/shell/ipt.sh"
i was this command to my visudo file
apache ALL=NOPASSWD: /sbin/iptables

how I can call my shell script to run via php web programming?
how I can get my output via web ?
I use the command below but my output status is Array .

$command = "/tmp/Fw";
exec ($command,$status );

any one can help me ?
 
Old 07-15-2006, 08:36 AM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
What is in you array?

Try a print_r

PHP Code:
echo "<pre>";
print_r ($status);
echo 
"</pre>"
 
  


Reply

Tags
commands, php, system


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Running the mount command from PHP Dhamon Programming 5 04-10-2009 03:32 AM
running iptable ( sbin command ) on webapplication omid1979 Programming 1 07-13-2006 03:30 PM
How to get php 4.4.2 and php 5.1.4 running on fedora core 5? markg85 Linux - Software 2 06-18-2006 09:23 AM
programming PHP JROCK1980 Programming 2 04-15-2004 06:02 AM
PHP programming on X cathodion Linux - Software 6 05-17-2002 03:00 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration