Web Hosting Talk







View Full Version : Ping w/php


Crazy
07-27-2001, 04:56 PM
anyone know how to enable a php file to ping? do i have to make the ownsership of the file root? if so how do i do that?

thanks in advance guys :confused:

crazy

SI-Chris
07-27-2001, 05:12 PM
Ping must run as root. So if you want to do it with PHP you'll have to install another copy of PHP to run as a CGI.

Or... maybe you can install another copy of ping to run as httpd? Is this even possible?

Crazy
07-27-2001, 05:18 PM
Ok, i have php installed as cgi as well, not sure how to make it run as the cgi php though...

thanks

jks
07-27-2001, 07:20 PM
Originally posted by IntelligentHosting.com
Or... maybe you can install another copy of ping to run as httpd? Is this even possible?

Yes, it is possible. Just suid your ping executable:

chmod a+s ping

You should of course be aware of the security implications. Download the most recent version of ping. Remember that anyone now can run that executable as root.

<<MOD EDIT:>>
You may not post URLs in your posts. Please set up a signature in your profile.
<</MOD EDIT>>