Bug #61141 [Com]: curl_multi_select returns -1
Edit report at https://bugs.php.net/bug.php?id=61141&edit=1 ID: 61141 Comment by: amoo_miki at yahoo dot com Reported by:amoo_miki at yahoo dot com Summary:curl_multi_select returns -1 Status: Assigned Type: Bug Package:cURL related Operating System: Windows 7 x64 PHP Version:5.3.10 Assigned To:pierrick Block user comment: N Private report: N New Comment: PHP 5.3.17 and 5.4.7 too suffer from this bug. Previous Comments: [2012-06-06 20:57:57] ihate at spam dot com Always returns -1 on Windows 7 64bit. Tried on 5.4 and 5.4.3. It worked a couple of months ago, perhaps some Win7 update changed something. [2012-05-30 02:48:04] larue...@php.net Pierrick, could you please look at this? :) [2012-05-29 11:52:09] amoo_miki at yahoo dot com I can confirm that PHP 5.4.3 (cli) (built: May 8 2012 00:23:27) suffers from the same bug. [2012-05-25 12:08:45] kulminaator at gmail dot com Running PHP 5.4.0 on Windows 7 has the same issue, curl_multi_select always returns -1 PHP Version => 5.4.0 System => Windows NT MSA-3644048 6.1 build 7601 (Windows 7 Enterprise Edition Service Pack 1) i586 cURL support => enabled cURL Information => 7.24.0 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => Yes IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8t ZLib Version => 1.2.5 libSSH Version => libssh2/1.3.0 [2012-04-03 16:26:35] bompus at gmail dot com Related to 60790 and 61240 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 https://bugs.php.net/bug.php?id=61141 -- Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1
Bug #61141 [Opn]: curl_multi_select returns -1
Edit report at https://bugs.php.net/bug.php?id=61141&edit=1 ID: 61141 User updated by:amoo_miki at yahoo dot com Reported by:amoo_miki at yahoo dot com Summary:curl_multi_select returns -1 Status: Open Type: Bug Package:cURL related Operating System: Windows 7 x64 PHP Version:5.3.10 Block user comment: N Private report: N New Comment: I can confirm that PHP 5.4.3 (cli) (built: May 8 2012 00:23:27) suffers from the same bug. Previous Comments: [2012-05-25 12:08:45] kulminaator at gmail dot com Running PHP 5.4.0 on Windows 7 has the same issue, curl_multi_select always returns -1 PHP Version => 5.4.0 System => Windows NT MSA-3644048 6.1 build 7601 (Windows 7 Enterprise Edition Service Pack 1) i586 cURL support => enabled cURL Information => 7.24.0 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => Yes IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8t ZLib Version => 1.2.5 libSSH Version => libssh2/1.3.0 [2012-04-03 16:26:35] bompus at gmail dot com Related to 60790 and 61240 ---------------- [2012-02-29 08:17:12] amoo_miki at yahoo dot com The curl details on 5.3.9 are: cURL support => enabled cURL Information => 7.21.7 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => Yes IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8r ZLib Version => 1.2.5 libSSH Version => libssh2/1.2.7 meaning the changes are related to one of the following: 5.3.9 -> 5.3.10 libcURL: 7.21.7 -> 7.24.0 GSS/Negotiate: Yes -> NO SSPI:Yes -> No OpenSSL: 0.9.8r -> 0.9.8t libSSH:1.2.7 -> 1.3.0 I don't see a reason for the last 2 effecting anything. [2012-02-28 22:09:05] bompus at gmail dot com I hope this helps. curl_multi_select works fine on my PHP 5.3.6 under Windows 7 x64 with the following CURL information: cURL support => enabled cURL Information => 7.21.2 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => No IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/1.0.0d ZLib Version => 1.2.3 libSSH Version => libssh2/1.2.7 - Under PHP 5.3.10 on Windows 7 x64, curl_multi_select is always returning -1 with the following CURL information: cURL support => enabled cURL Information => 7.24.0 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => No IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => No krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8t ZLib Version => 1.2.5 libSSH Version => libssh2/1.3.0 I am trying to make GET requests to https:// is that helps. I noticed that there are different versions of libcurl and OpenSSL used, so it could end up being an issue with either one of those, most likely libcurl or PHP itself. Hope this helps! [2012-02-28 16:52:26] bompus at gmail dot com Same exact problem and has been driving me nuts. I keep having to revert back to PHP 5.3.6 -- I have not tried 5.3.9 yet, but did try 5.3.10 and had the same issue. I am running loops with curl_multi_select and they always time out because of an infinite loop since it's always returning -1 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 https://bugs.php.net/bug.php?id=61141 -- Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1
Bug #61141 [Opn]: curl_multi_select returns -1
Edit report at https://bugs.php.net/bug.php?id=61141&edit=1 ID: 61141 User updated by:amoo_miki at yahoo dot com Reported by:amoo_miki at yahoo dot com Summary:curl_multi_select returns -1 Status: Open Type: Bug Package:cURL related Operating System: Windows 7 x64 PHP Version:5.3.10 Block user comment: N Private report: N New Comment: The curl details on 5.3.9 are: cURL support => enabled cURL Information => 7.21.7 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => Yes IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8r ZLib Version => 1.2.5 libSSH Version => libssh2/1.2.7 meaning the changes are related to one of the following: 5.3.9 -> 5.3.10 libcURL: 7.21.7 -> 7.24.0 GSS/Negotiate: Yes -> NO SSPI:Yes -> No OpenSSL: 0.9.8r -> 0.9.8t libSSH:1.2.7 -> 1.3.0 I don't see a reason for the last 2 effecting anything. Previous Comments: [2012-02-28 22:09:05] bompus at gmail dot com I hope this helps. curl_multi_select works fine on my PHP 5.3.6 under Windows 7 x64 with the following CURL information: cURL support => enabled cURL Information => 7.21.2 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => No IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => Yes krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/1.0.0d ZLib Version => 1.2.3 libSSH Version => libssh2/1.2.7 - Under PHP 5.3.10 on Windows 7 x64, curl_multi_select is always returning -1 with the following CURL information: cURL support => enabled cURL Information => 7.24.0 Age => 3 Features AsynchDNS => Yes Debug => No GSS-Negotiate => No IDN => No IPv6 => Yes Largefile => Yes NTLM => Yes SPNEGO => No SSL => Yes SSPI => No krb4 => No libz => Yes CharConv => No Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, pop3, pop3s, rtsp, scp, sftp, smtp, smtps, telnet, tftp Host => i386-pc-win32 SSL Version => OpenSSL/0.9.8t ZLib Version => 1.2.5 libSSH Version => libssh2/1.3.0 I am trying to make GET requests to https:// is that helps. I noticed that there are different versions of libcurl and OpenSSL used, so it could end up being an issue with either one of those, most likely libcurl or PHP itself. Hope this helps! [2012-02-28 16:52:26] bompus at gmail dot com Same exact problem and has been driving me nuts. I keep having to revert back to PHP 5.3.6 -- I have not tried 5.3.9 yet, but did try 5.3.10 and had the same issue. I am running loops with curl_multi_select and they always time out because of an infinite loop since it's always returning -1 [2012-02-20 20:28:50] amoo_miki at yahoo dot com I put some debug code and got to "curl_multi_select" returning -1 no matter what, which seems to mean failure from the underlying select system call. So I guess, the conversation between Win7 x64 and cURL in 5.3.10 is not going smooth. [2012-02-20 11:42:47] amoo_miki at yahoo dot com I used these URLs just to make sure the content is small while my original code looks at various news feeds. I did make sure the URLs return stuff, via simple usage of cURL too. The timeout happens within the loop that performs the curl_multi_select. [2012-02-20 10:46:59] ras...@php.net There were no code changes between 5.3.9 and 5.3.10 that could possibly have caused this. I notice you are using php.net sites in your test script. We had some dns problems around the time you reported this. Are you sure this wasn't related to that? 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 https://bugs.php.net/bug.php?id=61141 -- Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1
Bug #61141 [Fbk->Opn]: curl_multi_select returns -1
Edit report at https://bugs.php.net/bug.php?id=61141&edit=1 ID: 61141 User updated by:amoo_miki at yahoo dot com Reported by:amoo_miki at yahoo dot com -Summary:curl_multi_exec functionality broken +Summary:curl_multi_select returns -1 -Status: Feedback +Status: Open Type: Bug Package:cURL related Operating System: Windows 7 x64 PHP Version:5.3.10 Block user comment: N Private report: N New Comment: I put some debug code and got to "curl_multi_select" returning -1 no matter what, which seems to mean failure from the underlying select system call. So I guess, the conversation between Win7 x64 and cURL in 5.3.10 is not going smooth. Previous Comments: [2012-02-20 11:42:47] amoo_miki at yahoo dot com I used these URLs just to make sure the content is small while my original code looks at various news feeds. I did make sure the URLs return stuff, via simple usage of cURL too. The timeout happens within the loop that performs the curl_multi_select. [2012-02-20 10:46:59] ras...@php.net There were no code changes between 5.3.9 and 5.3.10 that could possibly have caused this. I notice you are using php.net sites in your test script. We had some dns problems around the time you reported this. Are you sure this wasn't related to that? [2012-02-20 10:24:15] amoo_miki at yahoo dot com Description: Trying to run multiple curl calls, fails with a timeout while checking for activity. PHP 5.3.9 and before work just fine. Test script: --- http://windows.php.net/downloads/releases/md5sum.txt";); curl_setopt($ch1, CURLOPT_HEADER, 0); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch2, CURLOPT_URL, "http://windows.php.net/downloads/releases/sha1sum.txt";); curl_setopt($ch2, CURLOPT_HEADER, 0); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1); $mh = curl_multi_init(); curl_multi_add_handle($mh,$ch1); curl_multi_add_handle($mh,$ch2); $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) if (curl_multi_select($mh) != -1) do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); echo strlen(curl_multi_getcontent($ch1))."-".strlen(curl_multi_getcontent($ch2)); curl_multi_remove_handle($mh, $ch1); curl_multi_remove_handle($mh, $ch2); curl_multi_close($mh); ?> Expected result: Seen on PHP 5.3.9: 531-1375 Actual result: -- Seen on PHP 5.3.10: Fatal error: Maximum execution time of 30 seconds exceeded in on line 15 -- Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1
Bug #61141 [Com]: curl_multi_exec functionality broken
Edit report at https://bugs.php.net/bug.php?id=61141&edit=1 ID: 61141 Comment by: amoo_miki at yahoo dot com Reported by:amoo_miki at yahoo dot com Summary:curl_multi_exec functionality broken Status: Feedback Type: Bug Package:cURL related Operating System: Windows 7 x64 PHP Version:5.3.10 Block user comment: N Private report: N New Comment: I used these URLs just to make sure the content is small while my original code looks at various news feeds. I did make sure the URLs return stuff, via simple usage of cURL too. The timeout happens within the loop that performs the curl_multi_select. Previous Comments: [2012-02-20 10:46:59] ras...@php.net There were no code changes between 5.3.9 and 5.3.10 that could possibly have caused this. I notice you are using php.net sites in your test script. We had some dns problems around the time you reported this. Are you sure this wasn't related to that? [2012-02-20 10:24:15] amoo_miki at yahoo dot com Description: Trying to run multiple curl calls, fails with a timeout while checking for activity. PHP 5.3.9 and before work just fine. Test script: --- http://windows.php.net/downloads/releases/md5sum.txt";); curl_setopt($ch1, CURLOPT_HEADER, 0); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch2, CURLOPT_URL, "http://windows.php.net/downloads/releases/sha1sum.txt";); curl_setopt($ch2, CURLOPT_HEADER, 0); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1); $mh = curl_multi_init(); curl_multi_add_handle($mh,$ch1); curl_multi_add_handle($mh,$ch2); $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) if (curl_multi_select($mh) != -1) do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); echo strlen(curl_multi_getcontent($ch1))."-".strlen(curl_multi_getcontent($ch2)); curl_multi_remove_handle($mh, $ch1); curl_multi_remove_handle($mh, $ch2); curl_multi_close($mh); ?> Expected result: Seen on PHP 5.3.9: 531-1375 Actual result: -- Seen on PHP 5.3.10: Fatal error: Maximum execution time of 30 seconds exceeded in on line 15 -- Edit this bug report at https://bugs.php.net/bug.php?id=61141&edit=1
[PHP-BUG] Bug #61141 [NEW]: curl_multi_exec functionality broken
From: Operating system: Windows 7 x64 PHP version: 5.3.10 Package: cURL related Bug Type: Bug Bug description:curl_multi_exec functionality broken Description: Trying to run multiple curl calls, fails with a timeout while checking for activity. PHP 5.3.9 and before work just fine. Test script: --- http://windows.php.net/downloads/releases/md5sum.txt";); curl_setopt($ch1, CURLOPT_HEADER, 0); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch2, CURLOPT_URL, "http://windows.php.net/downloads/releases/sha1sum.txt";); curl_setopt($ch2, CURLOPT_HEADER, 0); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1); $mh = curl_multi_init(); curl_multi_add_handle($mh,$ch1); curl_multi_add_handle($mh,$ch2); $active = null; do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); while ($active && $mrc == CURLM_OK) if (curl_multi_select($mh) != -1) do { $mrc = curl_multi_exec($mh, $active); } while ($mrc == CURLM_CALL_MULTI_PERFORM); echo strlen(curl_multi_getcontent($ch1))."-".strlen(curl_multi_getcontent($ch2)); curl_multi_remove_handle($mh, $ch1); curl_multi_remove_handle($mh, $ch2); curl_multi_close($mh); ?> Expected result: Seen on PHP 5.3.9: 531-1375 Actual result: -- Seen on PHP 5.3.10: Fatal error: Maximum execution time of 30 seconds exceeded in on line 15 -- Edit bug report at https://bugs.php.net/bug.php?id=61141&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61141&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61141&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61141&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61141&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61141&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61141&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61141&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61141&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61141&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61141&r=support Expected behavior: https://bugs.php.net/fix.php?id=61141&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61141&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61141&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61141&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61141&r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=61141&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61141&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61141&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61141&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61141&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61141&r=mysqlcfg
#44607 [Opn]: stream_get_line unable to correctly identify the "ending" in the stream content
ID: 44607 User updated by: amoo_miki at yahoo dot com -Summary: stream_get_line return incorrect values Reported By: amoo_miki at yahoo dot com Status: Open Bug Type: Streams related Operating System: * -PHP Version: 5.x upto 5.3-alpha2 and even 6.0 +PHP Version: 5.2.5, 5.2.6, 5.2.7-dev, 5.3-alpha1, 6.0.0-dev New Comment: Doing some more investigation: if the "ending" is just a character, the function works fine and return the correct value, always. stream_get_line in ./ext/standard/streamfuncs.c passes the action to php_stream_get_record in ./main/streams/streams.c where there is an explicit condition: if delim_len == 1 the result is directly fetched using memchr() else php_memnstr() is requested to process the stream. ./main/php.h defines php_memnstr as zend_memnstr, and looking at ./Zend/zend_operatprs.h the function zend_memnstr uses memchr() and memcmp() and I should suspect something going wrong there. The patch that sometimes forces the function to work correctly is a proof that all these functions work correct but there is a variable whose value is not being set correctly, ie not being initialized (maybe?) Anyway, this function is a very useful one and it's really unfortunate that it has not been fixed in almost 5 months. Previous Comments: [2008-08-19 15:30:10] amoo_miki at yahoo dot com I just got PHP 6.0.0-dev (built: Jul 28 2008 02:06:04) also configured and installed. that too has this problem of not working correctly. [2008-08-19 15:24:58] amoo_miki at yahoo dot com The bug still persists. [2008-07-14 21:54:02] amoo_miki at yahoo dot com I should also add that the workaround (that works for this example file) does not always work. [2008-07-14 21:45:58] amoo_miki at yahoo dot com Also tried with the latest CVS snapshot of 5.2.7-dev and it still gives incorrect results. [2008-07-14 21:30:22] amoo_miki at yahoo dot com Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. 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/44607 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Opn]: stream_get_line return incorrect values
ID: 44607 User updated by: amoo_miki at yahoo dot com Reported By: amoo_miki at yahoo dot com Status: Open Bug Type: Streams related Operating System: * -PHP Version: 5.x upto 5.3-alpha2 +PHP Version: 5.x upto 5.3-alpha2 and even 6.0 New Comment: I just got PHP 6.0.0-dev (built: Jul 28 2008 02:06:04) also configured and installed. that too has this problem of not working correctly. Previous Comments: [2008-08-19 15:24:58] amoo_miki at yahoo dot com The bug still persists. [2008-07-14 21:54:02] amoo_miki at yahoo dot com I should also add that the workaround (that works for this example file) does not always work. [2008-07-14 21:45:58] amoo_miki at yahoo dot com Also tried with the latest CVS snapshot of 5.2.7-dev and it still gives incorrect results. [2008-07-14 21:30:22] amoo_miki at yahoo dot com Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. [2008-04-02 12:14:33] amoo_miki at yahoo dot com Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 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/44607 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Opn]: stream_get_line return incorrect values
ID: 44607 User updated by: amoo_miki at yahoo dot com Reported By: amoo_miki at yahoo dot com Status: Open Bug Type: Streams related Operating System: * -PHP Version: 5.2CVS-2008-07-14 +PHP Version: 5.x upto 5.3-alpha2 New Comment: The bug still persists. Previous Comments: [2008-07-14 21:54:02] amoo_miki at yahoo dot com I should also add that the workaround (that works for this example file) does not always work. [2008-07-14 21:45:58] amoo_miki at yahoo dot com Also tried with the latest CVS snapshot of 5.2.7-dev and it still gives incorrect results. [2008-07-14 21:30:22] amoo_miki at yahoo dot com Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. [2008-04-02 12:14:33] amoo_miki at yahoo dot com Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 [2008-04-02 11:56:25] amoo_miki at yahoo dot com Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Opn]: stream_get_line return incorrect values
ID: 44607 User updated by: amoo_miki at yahoo dot com Reported By: amoo_miki at yahoo dot com Status: Open Bug Type: Streams related Operating System: * PHP Version: 5.2.6 New Comment: I should also add that the workaround (that works for this example file) does not always work. Previous Comments: [2008-07-14 21:45:58] amoo_miki at yahoo dot com Also tried with the latest CVS snapshot of 5.2.7-dev and it still gives incorrect results. [2008-07-14 21:38:15] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-07-14 21:30:22] amoo_miki at yahoo dot com Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. [2008-04-02 12:14:33] amoo_miki at yahoo dot com Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 [2008-04-02 11:56:25] amoo_miki at yahoo dot com Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Fbk->Opn]: stream_get_line return incorrect values
ID: 44607 User updated by: amoo_miki at yahoo dot com Reported By: amoo_miki at yahoo dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: * PHP Version: 5.2.6 New Comment: Also tried with the latest CVS snapshot of 5.2.7-dev and it still gives incorrect results. Previous Comments: [2008-07-14 21:38:15] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi [2008-07-14 21:30:22] amoo_miki at yahoo dot com Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. [2008-04-02 12:14:33] amoo_miki at yahoo dot com Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 [2008-04-02 11:56:25] amoo_miki at yahoo dot com Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Opn]: stream_get_line return incorrect values
ID: 44607 User updated by: amoo_miki at yahoo dot com -Summary: stream_get_line not working as expected Reported By: amoo_miki at yahoo dot com Status: Open Bug Type: Streams related -Operating System: Win32 +Operating System: All -PHP Version: 5.2CVS-2008-04-02 +PHP Version: 5.2.6 New Comment: Tested this with PHP v5.2.6 on Windows 2008 Server and FreeBSD 7.0 and it still returns incorrect results. Previous Comments: [2008-04-02 12:14:33] amoo_miki at yahoo dot com Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 [2008-04-02 11:56:25] amoo_miki at yahoo dot com Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [Fbk->Opn]: stream_get_line not working as expected
ID: 44607 User updated by: amoo_miki at yahoo dot com Reported By: amoo_miki at yahoo dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Win32 PHP Version: 5.2.5 New Comment: Using: PHP 5.2.6RC4-dev (cli) (built: Apr 2 2008 08:04:44) Still i get the faulty output: Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Previous Comments: [2008-04-02 12:03:55] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi Already was fixed a similar bug, try a snapshot. [2008-04-02 11:56:25] amoo_miki at yahoo dot com Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit this bug report at http://bugs.php.net/?id=44607&edit=1
#44607 [NEW]: stream_get_line not working as expected
From: amoo_miki at yahoo dot com Operating system: Win32 PHP version: 5.2.5 PHP Bug Type: Streams related Bug description: stream_get_line not working as expected Description: On some occasions stream_get_line acts weired by attempting the first seek without considering the "end of line" string. Below is the sample code that shows the problem with a workaround to temporarily solve the issue (that might ring some bells for the person who plans on fixing this). The code uses a small binary JPX file that can be fetched from http://barahmand.com/streambug/sample.txt Reproduce code: --- ', file_get_contents($filename)); echo "Found in source at ".strlen($arr[0])."\n\n"; $fp = fopen($filename, "rb"); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; rewind($fp); echo "\nAttempting fix...\n"; stream_get_line($fp, 1, ""); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; echo "Rewinding...\n"; rewind($fp); stream_get_line($fp, 15000, ""); echo "Location in stream: ".ftell($fp)."\n"; fclose($fp); ?> Expected result: Found in source at 9295 Location in stream: 9307 Rewinding... Location in stream: 9307 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 Actual result: -- Found in source at 9295 Location in stream: 15000 Rewinding... Location in stream: 15000 Attempting fix... Location in stream: 9307 Rewinding... Location in stream: 9307 -- Edit bug report at http://bugs.php.net/?id=44607&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44607&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44607&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44607&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44607&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44607&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44607&r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=44607&r=needscript Try newer version:http://bugs.php.net/fix.php?id=44607&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44607&r=support Expected behavior:http://bugs.php.net/fix.php?id=44607&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44607&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44607&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44607&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44607&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44607&r=dst IIS Stability:http://bugs.php.net/fix.php?id=44607&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44607&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44607&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44607&r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=44607&r=mysqlcfg
#41350 [Com]: Error in my_thread_global_end()
ID: 41350 Comment by: amoo_miki at yahoo dot com Reported By: graham at directhostinguk dot com Status: No Feedback Bug Type: MySQL related Operating System: Windows 2003 PHP Version: 5.2.3 New Comment: This is caused by windows security: to be sure: 1) Check if the drive where PHP is installed is an NTFS partition. 2) If yes, "Read & Execute" for "Everyone" for the "ext" folder. php -v at the command-line should not show you the error anymore. Previous Comments: [2008-01-07 12:14:01] jaco at jump dot co dot za I was able to reproduce this on a very basic instalation: Apache 2.2.4 PHP 5.2.5 Windows 2003 Server NO Database installed This executes 100%, and gives no errors, but as soon as I stop apache, it gives me the message in the apache error log Error in my_thread_global_end(): 1 threads didn't exit So it seems to me more of a sockets problem than a mysql problem. When I run the same script in CLI, I get no error. [2008-01-04 21:44:17] jaco at jump dot co dot za I am having the same and more problems. I am running: Apache 2.2.6 MySQL 5.0.45 PHP 5.2.5 Windows Server 2003 R2 Standard SP2 2 x Quad Core Xeon 4Gb RAM IIS Installed for SMTP, FTP and WWW on port 443 for a single .NET Webservice access (NO PHP connectors installed for IIS). But I am sure this is not IIS related, becuase it still happens even with IIS stopped Whenever apache tries to recycle threads I get: ** Apache Error Log ** [Fri Jan 04 22:37:38 2008] [notice] Child 324: All worker threads have exited. Error in my_thread_global_end(): 1 threads didn't exit exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process. [Fri Jan 04 22:37:42 2008] [notice] Parent: Received restart signal -- Restarting the server. Note the time difference between the first log and the last log This then causes my Apache to crash and restart. Then I tried to download the latest snapshot of PHP, installed it, but then Apache woould not start at all, just gives me a starting status, but does not het out of it. My problem is also that there is hundreds of php files running and our site is very active, and I have NO idea what is causing this problem. The PHP error log is clean, but the following also shows up AFTER apache crashes. 080104 11:24:26 [Warning] Aborted connection 16865 to db: '' user: '*' host: 'localhost' (Got an error reading communication packets) But I am sure that this is just caused by apache that have crashed and the already open calls to the database that was not terminated by the php script. These messages apears in the event log after the crash: Faulting application httpd.exe, version 2.2.6.0, faulting module libapr-1.dll, version 1.2.11.0, fault address 0x79a0. Faulting application httpd.exe, version 2.2.6.0, faulting module php5ts.dll, version 5.2.5.5, fault address 0xacb9. We are using both mysql and mysqli connectors and I have tried to download the ones from the mysql site and again apache refused to start. This is quite serious for us at the moment, becuase its in a live enviroment and the dev servers never had this problem. Hope we can find a solution soon. [2008-01-04 18:28:12] jcmelcher at gmail dot com This worked for me... IIS 6.0 with PHP 5.2.5 on Win2K3 SP2 If you download the latest PHP - MySQL connector files direct from MySQL this problem goes away:- http://dev.mysql.com/downloads/connector/php/ [2008-01-04 14:30:55] benjamin dot azan at gmail dot com I could not find the new version of mysql connector but I changed the PHP mode from CGI/fastCGI to Apache 2.0 Handler and it fixed the problem. [2008-01-04 11:54:05] benjamin dot azan at gmail dot com The mySQL bug http://bugs.mysql.com/bug.php?id=25621 says : " MySQL 5.0.54BK on WinXP localhost does not exhibit the error. " and the PHP 5.2.5 show Client API version 5.0.45 So I think the next version of PHP should contain this new version of the MySQL connector. I'm gonna try to upgrade the mySQL connector on a 5.2.5 PHP version to see if it fixs the bug 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/41350 -- Edit this bug report at http://bugs.php.net/?id=41350&edit=1