#19421 [Opn->Fbk]: fget* doesn't work when socket resource is stored in class variable
| From: | sniper@php.net | Date: | Thu, 19 Sep 2002 00:21:58 +0000 |
| Subject: | #19421 [Opn->Fbk]: fget* doesn't work when socket resource is stored in class variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-19683@lists.php.net to get a copy of this message | ||
ID: 19421
Updated by: sniper@php.net
Reported By: taco@osisoft.nl
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: Red Hat 7.1
PHP Version: 4.2.2
New Comment:
Please provide a short but complete example script which shows what
you're trying to do.
Previous Comments:
------------------------------------------------------------------------
[2002-09-15 16:35:22] taco@osisoft.nl
I made a class which connects to the POP3 server at localhost. I used
fsockopen to connect to the server. When I use a local variable
("$socket") then it works allright. When I store the resource in a
class variable ($this->socket) the script will stall on fget*.
Work around for me: I want to use the socket resource in other member
functions. After the connection is initialized a class variable
references to the local variable ($this->socket =& $socket). In the
member function I first must make a local variable and refer it to the
class variable ($socket =& $this->socket). I can't use $this->socket
directly.
So in short: I can't use a class variable with fwrite and fgets, but
instead I must use local variables.
(Hope may description was clear.)
Greetings from Holland
Taco Jan Osinga
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=19421&edit=1