ID: 22199 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Suspended Bug Type: Sockets related Operating System: Suse Linux 7.2 PHP Version: 4CVS-2003-02-12 (stable) New Comment:
Suspending until you can provide the short, self contained, reproducing script we have requested. Previous Comments: ------------------------------------------------------------------------ [2003-02-13 08:31:07] [EMAIL PROTECTED] Ok, as it seems the socket functions do work. So I will use them for now with PHP 4.3.x ... still the bug in fgets() is there. Trust me. It's not my stupidity. ------------------------------------------------------------------------ [2003-02-13 08:10:22] [EMAIL PROTECTED] Btw, i check SmartIRC, that [EMAIL PROTECTED] is using. Actually this class does not use fgets() at all, because it either uses real sockets or fread(). ------------------------------------------------------------------------ [2003-02-13 07:33:51] [EMAIL PROTECTED] Sockets are set to non-blocking after searching a while in doc after first notice of this problem. Tho it did not effect the main problem i have. If fgets() would return a false, then the while function would stop. This does not happen, so fgets() does not return a false. Yes, i used stream_set_timeout() with php 4.3.x (not needed in 4.2.3) with a timeout of 600 seconds. This is clearly enough, because my server pings every 60s anyway. As already said before, the irc services are 100% working with php 4.2.3 and they are running for over 5 month already. I only updated to 4.3.x and the problems started. First i had to find out, that there are now new functions needed (mainly to set to non-blocking - setting a timeout is not really needed i think), but somehow this did not solve the main problem i had. The code i sent you is ofc much too short, but still it's the main functions that produce the error, none else are needed. All the handshakes and stuff are left away, because of security issues. I'm for sure using correct server2server protocol for my ircd (see above) ------------------------------------------------------------------------ [2003-02-13 07:22:41] [EMAIL PROTECTED] We need a short script to reproduce this problem, and more information. Are your sockets blocking or non-blocking? Do you check for the case where fgets() returns false? Do you use socket_set_timeout() (now known as stream_set_timeout())? Are you 100% sure that your code is correct and follows the IRC protocol correctly? IRC servers don't send any data until you have successfully connected (the 5 line script you provided will just sit and wait for the server to respond, while the server waits for the script to send data). ------------------------------------------------------------------------ [2003-02-13 06:44:24] [EMAIL PROTECTED] I had it enabled and not. This does not make a difference. Also this is reproducable. Everytime i change from php 4.2.3 to 4.3.x this start to happen. Going back to 4.2.3 and everything works smoothly again. And about that, check your code statement. I actually did check my code for hours after finally deciding, that this is not my fault. Also it's hard to make something wrong in 5 lines 5 lines of code. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22199 -- Edit this bug report at http://bugs.php.net/?id=22199&edit=1