Good Morning List ;) ive allready postet my question on the german phpbar mailinglist, but no responses from anyone yet. i hope someone on that list could give me an advice or hint. i'm writing a php-daemon which will run on a debian lenny/squeeze. this daemon should listen to a specific port of a vpn-interface/ip-address (it creates a socket) if the daemon script recieves a string from my management webinterface (other server) it should run some code e.g. exec('/etc/init.d/apache2 restart'); or system('something'); or whatever. i got it working, but there is a (for me) strange behavior. After the daemon has restarted the apache2 service for example and the php daemon is stoped, the apache2 process takes over the socket. that means, in `netstat -tulpen` or `netstat -anp` i first can see something like that: tcp 0 0 10.0.0.1:8133 0.0.0.0:* LISTEN 29168/php tcp6 0 0 :::80 :::* LISTEN 29155/apache2 after the daemon has restarted apache2 and stops itself (or i have to kill him), netstat shows up the following: tcp 0 0 10.0.0.1:8133 0.0.0.0:* LISTEN 31490/apache2 tcp6 0 0 :::80 :::* LISTEN 31490/apache2 so i cant restart the daemon because apache uses that port/ip (or socket?) after invoking "/etc/init.d/apache2 restart" on the shell, everything is fine again and im able to start the daemon. btw, the same with the openvpn service. (mysql doesnt act like apache or openvpn). Am i missing something? Or is that the default behavior of linux/apache/php/sockets ??? Additional Information about OS etc. Server/Client Debian Lenny Apache 2.2.9 PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 06:06:53) Client/Server Ubuntu Lucid Apache 2.2.14 PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:49:46) Ive tested it both way: Ubuntu as Server, Debian as Client and vice versa. The Ubuntu System (my workstation) is in our Office and the Debian System is in the datacentre@ our provider... Any help would be great! Thanks in advance, kind regards Ronny -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php