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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php