Req #49341 [Opn->Csd]: add SO_REUSEPORT support for socket_set_option()

From: Date: Thu, 10 Jun 2021 16:55:59 +0000
Subject: Req #49341 [Opn->Csd]: add SO_REUSEPORT support for socket_set_option()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234360@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49341&edit=1 ID: 49341 Updated by: cmb@php.net Reported by: jolan at gormsby dot com Summary: add SO_REUSEPORT support for socket_set_option() -Status: Open +Status: Closed Type: Feature/Change Request Package: Sockets related Operating System: OpenBSD 4.6-current PHP Version: 5.2.10 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: SO_REUSEPORT is available as of PHP 5.4.10 and 5.5.3, respectively, if supported by the OS (Linux as of 3.9). Previous Comments: ------------------------------------------------------------------------ [2017-08-29 11:48:54] michal dot brzuchalski at gmail dot com Actually it works on my Ubuntu, I've tested it. --- uname -a Linux thinkpad 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux --- ------------------------------------------------------------------------ [2009-09-09 20:26:34] jolan at gormsby dot com I believe SO_REUSEPORT is *BSD only. What OS are you using? ------------------------------------------------------------------------ [2009-09-09 06:11:03] netnghia at yahoo dot com After I add define SO_REUSEPORT to ext/sockets/sockets.c I configure, make, make install php-5.2.9 again, I have error: Warning: socket_set_option(): unable to set socket option [92]: Protocol not available in /usr/share/gds_ftps/gds_ftpd.php on line 985 I don't know what to do to fix. It seem SO_REUSEPORT still cannot use. Any suggestion? ------------------------------------------------------------------------ [2009-08-24 00:26:04] jolan at gormsby dot com Description: ------------ SO_REUSEPORT is needed to allow separate processes to bind to the same port. Add the following to ext/sockets/sockets.c after SO_REUSEADDR: #ifdef SO_REUSEPORT REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_CS | CONST_PERSISTENT); #endif I believe SO_REUSEPORT is not available under Windows, hence the ifdef. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=49341&edit=1

« previous php.bugs (#234360) next »