RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
> I dont get that error > > Warning: socket_write() expects parameter 1 to be resource, null given in > /path/script.php on line 34 > > but just the original error msg > > Warning: socket_write(): unable to write to socket [32]: Broken pipe in Multiple times still? Or just the one time? Use h

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
PROTECTED]> > To: > Sent: Monday, October 08, 2007 7:43 PM > Subject: RE: [PHP] Socket how to die if connection broken > > > > Remove the @ and see if you get any useful message. > > > From: [EMAIL PROTECTED] > > To: [EMAIL PROTECTED] > > CC: php-g

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
, October 08, 2007 7:43 PM Subject: RE: [PHP] Socket how to die if connection broken Remove the @ and see if you get any useful message. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: php-general@lists.php.net Date: Mon, 8 Oct 2007 19:04:45 +0100 Subject: Re: [PHP] Socket how to die if conn

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
et how to die if connection broken Remove the @ and see if you get any useful message. From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: php-general@lists.php.net Date: Mon, 8 Oct 2007 19:04:45 +0100 Subject: Re: [PHP] Socket how to die if connection broken Hi Stut Ive tried your example but still can

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
Remove the @ and see if you get any useful message. > From: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > CC: php-general@lists.php.net > Date: Mon, 8 Oct 2007 19:04:45 +0100 > Subject: Re: [PHP] Socket how to die if connection broken > > Hi Stut Ive tried your example but

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
Hi Stut Ive tried your example but still cant get it to work. - Original Message - From: "Stut" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: Sent: Monday, October 08, 2007 5:26 PM Subject: Re: [PHP] Socket how to die if connection broken [EMAIL PROTECTE

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread chris
AIL PROTECTED]> To: Sent: Monday, October 08, 2007 5:27 PM Subject: RE: [PHP] Socket how to die if connection broken But if the socket connection gets broken it creates an error msg Warning: socket_write(): unable to write to socket [32]: Broken pipe in Warning: socket_write(): unable to wri

RE: [PHP] Socket how to die if connection broken

2007-10-08 Thread Instruct ICC
> But if the socket connection gets broken it creates an error msg > > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > Warning: socket_write(): unable to write to socket [32]: Broken pipe in > >

Re: [PHP] Socket how to die if connection broken

2007-10-08 Thread Stut
[EMAIL PROTECTED] wrote: Hi I have a socket connection like so.. $sourceip = '84.234.18.16'; // ip you want to bind to $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); socket_bind($sock, $sourceip); socket_connect($sock, 'dac.nic.uk', 2043); if ($socket === false) { $errorcode = socket