3

when i run the code

shell_exec('ping -c 4 127.0.0.1')

it returns NULL, but when I run the same command (ping -c 4 127.0.0.1) in ssh, it returns perfectly...

and yes, the script can run shell_exec, I tried shell_exec('ls') and it returns correctly, and shell_exec('ping -V') returns ping utility, iputils-ss020927 so ping is being called, but I just get no response...

any help? thanks!

Quicky
  • 163
  • 2
  • 7

1 Answers1

3

Solved:

Ping cannot be executed as a user. Root must run chmod +s 'type -p ping' in order for users to run ping

Quicky
  • 163
  • 2
  • 7