#19421 [NEW]: fget* doesn't work when socket resource is stored in class variable

From: Date: Sun, 15 Sep 2002 21:35:22 +0000
Subject: #19421 [NEW]: fget* doesn't work when socket resource is stored in class variable
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19412@lists.php.net to get a copy of this message
From: taco@osisoft.nl Operating system: Red Hat 7.1 PHP version: 4.2.2 PHP Bug Type: Class/Object related Bug description: fget* doesn't work when socket resource is stored in class variable 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 bug report at http://bugs.php.net/?id=19421&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=19421&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=19421&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=19421&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=19421&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=19421&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=19421&r=support Expected behavior: http://bugs.php.net/fix.php?id=19421&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=19421&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=19421&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=19421&r=globals

« previous php.bugs (#19412) next »