PHP v4.3.11, compiled with "--enable-sockets"

Task:
create an icmp socket for pinging

Code:
$socket = socket_create(AF_INET, SOCK_RAW, 1);

Errror:
Warning: socket_create() Unable to create socket [1]: Operation not permitted

I cannot figure this one out. Searching the web for this problem finds solutions that suggest enabling sockets...but that's already done. PHP manual states that there are no special configs to be done beyond "--enable-sockets" during configure. Anyone have a clue? Maybe something to do with the user apache is running as?

UPDATE: seems that the problem is with SOCK_RAW. The other socket types seem to work (dgram, stream). Maybe this is related to kernel config or permissions? Any ideas?

thanks!

    Write a Reply...