Re: [gentoo-user] Strange behaviour of iptables

2025-01-03 Thread Matthias Hanft
Alexis wrote: > > > So what happens if you instead do: > > ``` > exec("/usr/bin/xtables-legacy-multi iptables-legacy -L COUNT -n -v > -x -w", $iptables); > ``` > > ? Just the same: iptables v1.8.11 (legacy): Illegal option `--numeric' with this command Try `iptables -h' or 'iptables --help'

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Matt Connell
On Fri, 2025-01-03 at 00:03 +0100, Ro Bra wrote: > What's going on here? Compare & Contrast troubleshooting.

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Ro Bra
What's going on here? > Matt Connell hat am 02.01.2025 20:25 CET geschrieben: > > > On Thu, 2025-01-02 at 09:13 +0100, Matthias Hanft wrote: > > Your "foo.php" does run here, too.  I wonder what's the difference?! > > PHP is 8.2.24. > > Same PHP version here. > > > The only difference is tha

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Ro Bra
25 20:25 CET geschrieben: > > > On Thu, 2025-01-02 at 09:13 +0100, Matthias Hanft wrote: > > Your "foo.php" does run here, too.  I wonder what's the difference?! > > PHP is 8.2.24. > > Same PHP version here. > > > The only difference is that my "exec" is in a class

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Matt Connell
On Thu, 2025-01-02 at 09:13 +0100, Matthias Hanft wrote: > Your "foo.php" does run here, too.  I wonder what's the difference?! > PHP is 8.2.24. Same PHP version here. > The only difference is that my "exec" is in a class method in a PHP > file which is included by "require_once".  And it has wor

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Alexis
Matthias Hanft writes: Yes, everything is run as root. Indeed I had /sbin/iptables in my PHP script. Getting this error, I tried "which iptables" in a root bash which showed /usr/bin/iptables. So I changed this (and even to "/usr/bin/iptables-legacy", but with no effect, presumably because o

Re: [gentoo-user] Strange behaviour of iptables

2025-01-02 Thread Matthias Hanft
Matt Connell schrieb: > > I noticed that your path to iptables is in /usr/bin/, but `which` on my > system says /sbin/. Are you running this as root? What version of PHP > are you using? Yes, everything is run as root. Indeed I had /sbin/iptables in my PHP script. Getting this error, I tried "w

Re: [gentoo-user] Strange behaviour of iptables

2025-01-01 Thread Matt Connell
On Wed, 2025-01-01 at 18:33 +0100, Matthias Hanft wrote: > > So it seems that I can't use any parameters at all any more - > from PHP. > > What's the trick to get this working again? Hmm. I can't replicate this failure. Using both `php -a` and foo.php, I get expected results. (I'm using the IN

[gentoo-user] Strange behaviour of iptables

2025-01-01 Thread Matthias Hanft
Hi, when I call /usr/bin/iptables -L COUNT -n -v -x -w from bash, everything works well - as it did for years. When I call the same command from PHP: exec("/usr/bin/iptables -L COUNT -n -v -x -w", $iptables); I get (since this month) the message iptables v1.8.11 (legacy): Illegal option `--n