php5-cli + openssl bug on edgy 64bit (amd)

Bug #80852 reported by saintdev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: php5

referring to this previous bug's report on official php website;
http://bugs.php.net/bug.php?id=32979 <-- please read first.

i have installed php5(5.1.6), php5-cli with openssl, apache2's, and mysql-5.x. oh my Dual Opteron AMD 64Bit, 2.6.19.Kernel SMP (compiled) on my Ubuntu-Edgy (6.10)

here's the problem reviews;
----------------------------------------------------------------------------------------
Description:
------------
Using stream_socket_client or stream_socket_server to open a connection
fails to report correct values with stream_select. Using fread to get
one byte before stream_select suddenly makes stream_select work as
expected.
Without it stream_select returns 0 changed streams even though there is
data waiting. Service used as an endpoint is persistent and doesn't
close the connection after it's output. PHP is CLI-version.

Reproduce code:
---------------
$c = stream_socket_client("tcp://127.0.0.1:80");
while (1)
{
  $streams = array($c);
  if (stream_select($streams, $write=NULL, $except=NULL, 0, 5000)) {
    print "Data received\n";
  }
}

// IP:Port can be anything which outputs something after connection.

Expected result:
----------------
Text "Data received" after connection and output from the service. The
service can be anything which just outputs something right after
connect.
--------------------------------------------------------------------------------------------------------

the *newest* package from apt-get still not working with the previous php5 + bug.
it will create an infinite loops and eat the cpu 100%
any idea how to fix it?

Revision history for this message
Soren Hansen (soren) wrote :

If it's already been reported upstream, there's not much more we can sensibly do about it.

Changed in php5:
status: New → Triaged
Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed for hardy.

Regards
chuck

Changed in php5:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.