Do you have a question? Post it now! No Registration Necessary. Now with pictures!
May 31, 2009, 7:17 pm
rate this thread
I have the following code that works in php 4.0.6 but does not work in
I get the following error: Call to undefined function: read()
function bufRead($len, $err = 0)
echo "In bufRead(), $len = $len<br>\n";
$buf = "";
$inBytes = 0;
$buf = "";
$inBytes += read($this->m_socket->getSocket(),
if($inBytes < 0) $inBytes = 0;
$ibuf .= $buf;
}while((SOCKET_ALWAYS_NONBLOCK == 1) && (strlen($buf)
< $len) &\
& ($err != 1));
Can someone help me out here. I would prefer not to upgrade to php 5
as that would require pretty much a complete rewrite of this script.
This is someone else script I'm trying to adapt which has not been
maintained since 2002
Re: Help with read() function
Why are you still using 4.x? It's been unsupported for almost a year
now. And it should not require a complete rewrite of the script -
unless the script is pretty bad to start with (in which case it would
benefit from a complete rewrite). Almost all of my code has transferred
over with no changes.
As for the lack of a read() function - there is none in PHP. You need
to figure out what you installed to get it, and install that on the new
It doesn't exist in PHP5, either.
Remove the "x" from my email address
JDS Computer Training Corp.