Hi to everybody.
First, let mi apologize if I'm doing a newbe question: I'm not a PHP
programmer, but I have to solve a problem located in a PHP web page.
Thanks in advance if you try to help me.
I have a Linux host (Suse 9.2 2.6.8-24.14-smp) running
apache2-2.0.50-7.3 and php4-4.3.8-8.2. In this host there is also a C
custom made server. The PHP web page opens a socket in order to send
data to the C server. The problem happens when the web page close the
connection using socket_shutdown($socket,2); and socket_close($socket);
At this moment the socket connection ends (after a short TIME_WAIT
state), but the C server socket file descriptor remains until it is
stopped. There aren't error messages or values.
This is a lsof (list open files) screen showing the problem:
pcotcpvie 6509 mem REG 3,2 106308 8857
/lib/ld-2.3.3.so
pcotcpvie 6509 mem REG 3,2 1359489 8882
/lib/tls/libc.so.6
pcotcpvie 6509 0r CHR 1,3 28476 /dev/null
pcotcpvie 6509 1u CHR 136,1 3 /dev/pts/1
pcotcpvie 6509 2u CHR 136,1 3 /dev/pts/1
pcotcpvie 6509 3r FIFO 0,7 10100 pipe
pcotcpvie 6509 4w FIFO 0,7 10100 pipe
pcotcpvie 6509 5u unix 0xd0a01580 21433 socket
pcotcpvie 6509 6u IPv4 21434 TCP *:pcovie
(LISTEN)
pcotcpvie 6509 7u sock 0,4 21435 can't identify
protocol
pcotcpvie 6509 8u sock 0,4 21482 can't identify
protocol
pcotcpvie 6509 9u sock 0,4 21483 can't identify
protocol
pcotcpvie 6509 10u sock 0,4 22069 can't identify
protocol
pcotcpvie 6509 11u sock 0,4 22274 can't identify
protocol
pcotcpvie 6509 12u sock 0,4 22305 can't identify
protocol
pcotcpvie 6509 13u sock 0,4 22314 can't identify
protocol
pcotcpvie 6509 14u sock 0,4 22398 can't identify
protocol
pcotcpvie 6509 15u sock 0,4 22402 can't identify
protocol
pcotcpvie 6509 16u sock 0,4 22413 can't identify
protocol
pcotcpvie 6509 17u sock 0,4 22669 can't identify
protocol
At every new connection close, it appears a new "can't identify
protocol" line
This problem don't happen if I use a C client to connect to the C
server, so this let me to think that the problem is in the PHP code or
maybe in the apache config.
The fact is that I'm very disconcerted. I haven't found any information
on the net, so I will apreciate your suggests.
Kind regards!