From:             linuxapps at yahoo dot com
Operating system: Fedora Core 4
PHP version:      5.1.2
PHP Bug Type:     Sockets related
Bug description:  FD_SETSIZE error

Description:
------------
When compiled with --disable-cgi, PHP CLI throws an 
error on socket_select() when socket count > 1024.

It appears that the CLI installation defaults to 
FD_SETSIZE=1024 regardless of what is set at compile 
time via --enable-fd-setsize. PHP CGI, however, works 
properly.

This error happens identically to both sockets and 
socket streams (e.g. stream_select()). The code example 
uses sockets.



Reproduce code:
---------------
http://fourthround.com/bugs/server.txt
http://fourthround.com/bugs/stester.txt

Expected result:
----------------
As long as the OS's open file limit has not been 
exceeded PHP CLI should not throw an error when compiled 
with --enable-fd-setsize=4096 and socket_select on over 
1024 sockets.

Actual result:
--------------
Warning: socket_select(): You MUST recompile PHP with a 
larger value of FD_SETSIZE. It is set to 1024, but you 
have descriptors numbered at least as high as 1054. --
enable-fd-setsize=2048 is recommended, but you may want 
to set it to equal the maximum number of open files 
supported by your system, in order to avoid seeing this 
error again at a later date.


-- 
Edit bug report at http://bugs.php.net/?id=37025&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37025&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): 
http://bugs.php.net/fix.php?id=37025&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37025&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37025&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37025&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37025&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37025&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37025&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37025&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37025&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37025&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37025&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37025&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37025&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37025&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37025&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37025&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37025&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37025&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37025&r=mysqlcfg

Reply via email to