Reply to Re: [PHP] Socket connection reset by pear

Your name:

Reply:


Posted by Richard Lynch on 05/06/05 07:50

On Thu, May 5, 2005 5:20 am, Martín Marqués said:
> I'm trying to build some communication aside of the server thin client
> stuff,
> with a socket daemon and a socket client.
>
> The daemon is the same that everybody can find in the PHP docs (example
> 1).
> The client simply opens a connection to the daemon and writes data using
> the
> socket Object from PEAR (last stable version). The problem is that it
> fails
> to make a socket_read() with this message (on the daemon side):
>
> Warning: socket_read() unable to read from socket [54]: Connection reset
> by
> peer
> in
> /space/home/martin/programacion/siprebi-1.2/ext/impresion/printSocket.php
> on line 42
> socket_read() failed: reason: Operation not permitted
>
>
> If I open a telnet conection to the daemon, everything works like a
> charme. It
> writes and quits OK.
>
> What can be going wrong?

Operation not permitted would make me guess you've got a user read/write
permissions problem.

When you open that telnet connection, are you logged in as the same user
as the PHP user that is running the client script?

I'm guessing not...

You have to clarify, for yourself, which user is doing what when to which
files/devices/sockets, and what chown permissions are in effect.

That generally makes you go "Duh" and fix the problem pretty quick.

--
Like Music?
http://l-i-e.com/artists.htm

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация