Jump to content

System Ping Command


JustinMs66@hotmail.com

Recommended Posts

i have been working on this for like 3 hours now, trying EVERYTHING!

i need to be able to make system commands work.

 

ping -c 2 -iphere- >response.txt

is the code i need. and in ssh, i execute it, and it works! in the response.txt file, i get a correct response:

 

PING -iphere- (-iphere-) 56(84) bytes of data.
64 bytes from -iphere-: icmp_seq=0 ttl=53 time=21.7 ms
64 bytes from -iphere-: icmp_seq=1 ttl=53 time=21.4 ms
--- -iphere- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms

 

But when i use ANY KIND of php system command execution, it does not work. i have tried the system(), exec(), shell_exec(), passthru(), and popen(). none work. response.txt comes up blank.

 

i have also tried setting the permissions to a variety of things, 777,775,755,644... etc.

i have also tried setting the owner permisions to root as well as the username that php file executes on.

 

nothing works and its pissing me off.

what pisses me off the most is that a command such as "ls" will work perfectly. but why won't this?

Link to comment
https://forums.phpfreaks.com/topic/67700-system-ping-command/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.