how to ping

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
leon
New php-forum User
New php-forum User
Posts: 36
Joined: Sat Aug 03, 2002 11:54 am

Tue Apr 29, 2003 4:29 am

Hi !

anyone can tell me why this little script does not work ?
( I receive following error
ping: icmp open socket: Operation not permitted )


Code: Select all

<? 
$domain="yahoo.com";
$run = shell_exec("/bin/ping -c5 -n -q -w5 $domain 2>&1");
echo $run;
?>


Thanks 1000X!

Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Tue Apr 29, 2003 11:01 pm

you are not root - Unix system admin

BTW
http://pear.php.net/package-info.php?pacid=12

User avatar
leon
New php-forum User
New php-forum User
Posts: 36
Joined: Sat Aug 03, 2002 11:54 am

Wed Apr 30, 2003 12:25 am

Understand , Thank you for link !!!

User avatar
leon
New php-forum User
New php-forum User
Posts: 36
Joined: Sat Aug 03, 2002 11:54 am

Wed Apr 30, 2003 1:24 am

unluckly pear link didn't help .It still require root and my php scripts run nobody .Searching a perl script :cry:

User avatar
mike
New php-forum User
New php-forum User
Posts: 73
Joined: Sun May 04, 2003 4:26 am
Location: Athens
Contact:

Sun May 04, 2003 7:00 am

Try the simple ping "ping domain.com"
11:16am up 404 days, 2 users, load average: 148.68, 143.45, 132.6


Mike Vassileiou
[Systems Administrator / PHP Developer]


PHP/MySQL Manual:
http://www.phpmysql-manual.com

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests