Trouble with socket-server on AMD64

[email protected] (Kasper Johansen) Mon, 28 Apr 2008 11:08:44 +0200
Newsgroups php.gtk.general
Message-ID <[email protected]>
Hi.

I just changed my OS to Ubuntu Hardy AMD64 instead of Ubuntu Hardy I386. 
Suddenly an socket-server-application that was working fine on I386, 
doesnt work as expected on AMD64.

The problem is with this code:
<?
$this->socket = stream_socket_server("tcp://" . $this->ip . ":" . 
$this->port) or die("Could not open socket on port " . $this->port . ".\n");
$this->watch = Gtk::io_add_watch($this->socket, GObject::IO_IN, 
array($this, "socketAccept"));
?>


As soon as the "watcher" is set, the function "socketAccept()" will be 
called - even though there is no connection to the socket. This causes 
the code to hang, because "socketAccept()" runs this command:
<?
$client_socket = stream_socket_accept($this->socket);
?>


I have recompiled my PHP-GTK like 3 or 4 times now with the same result.

Has anyone else experienced or fixed this problem?


-- 
Regards
Kasper Johansen