PHP 4.0 Bug #7341 Updated: php_read() causes funky effects

From: Date: Sun, 22 Oct 2000 23:55:19 +0000
Subject: PHP 4.0 Bug #7341 Updated: php_read() causes funky effects
Groups: php.dev 
Request: Send a blank email to php-dev+get-35825@lists.php.net to get a copy of this message
ID: 7341 Updated by: chrisv Reported By: vincent.negrier@mixad.com Status: Assigned Bug Type: Sockets related Assigned To: chrisv Comments: More info from bug #7343: [vincent.negrier@mixad.com] I think this might help : - I'm using nonblocking sockets - I think the old behavior was okay and I don't see the point of changing it (stop reading after CR/LF/\0 ...). Having another function (reads() ?) for this would be better ... I think the problems comes from me using nonblocking sockets, and that php_read() IS blocking. Previous Comments: --------------------------------------------------------------------------- [2000-10-22 19:50:03] chrisv@php.net The php read() function never called the C read() function directly.. I made some changes to it so that it would be possible to choose whether you wanted to use the wrapper or the original function (which seem to work for me) by setting sockets.use_system_read in the php.ini file in the latest CVS. Try that and see how it works. --------------------------------------------------------------------------- [2000-10-19 11:19:38] vincent.negrier@mixad.com since 4.0.3 (or is it pl1 ?) the PHP read() fucntion doesn't call the C read() directly but passes thru php_read(). I had to disable php_read (using read() instead) in sockets.c because my script suddenly took 99% of system resources and didn't work anymore. I also noticed the return value of php_read() was not the same .. read() returns 0 if connection is lost where php_read returns a negative value. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7341

« previous php.dev (#35825) next »