Re: I can't execute pf commands

From: Date: Thu, 28 Jul 2011 16:18:38 +0000
Subject: Re: I can't execute pf commands
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-314235@lists.php.net to get a copy of this message
On 07/28/2011 11:09 AM, Bulent Malik wrote: > Hi > > I use php5.3 on freebsd > > I also use pf ( packet filter) on it. > > I need to execute pfctl in php script. But I couldn't execute . I don't get > any errors about that. > > Shell commands is allowed in php.ini My > > My script is below, > > > shell_exec('pfctl -s nat'); > > exec('pfctl -s nat'); > > > If I execute another command like this ; it works > > shell_exec('ls -l /var/tmp') ; > > What can the problem be ? > > pfctl probably requires root privileges, so you can either set the suid on it or I would set it up in sudoers to allow the apache user to execute it without a password. -- Thanks! -Shawn http://www.spidean.com

« previous php.general (#314235) next »