Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 43 |
Nodes: | 6 (0 / 6) |
Uptime: | 96:12:53 |
Calls: | 290 |
Files: | 904 |
Messages: | 76,426 |
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?
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?
Matt Connell <matt@connell.tech> 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 that my "exec" is in a class method in a PHP
file which is included by "require_once". And it has worked for
years...
Can you paste your exec method? I've never tried overriding
(overloading?) a built-in method in this way, I'm a little surprised it
works as well as you say. Then again I've always used shell_exec so...
What's going on here?
So what happens if you instead do:
```
exec("/usr/bin/xtables-legacy-multi iptables-legacy -L COUNT -n -v
-x -w", $iptables);
```
?