#36906 [Fbk-Opn]: stream_context_set_option() crashes
ID: 36906 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net -Status: Feedback +Status: Open Bug Type: Streams related Operating System: *nix PHP Version: 5.1.2 Assigned To: pollita New Comment: http://snaps.php.net/php5.2-latest.tar.gz does not work either Previous Comments: [2006-05-10 09:14:16] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip [2006-05-10 07:47:51] sqchen at citiz dot net hi...the newest version of php-5.1.2 has not fixed this problem yet...would you please assign it to the php developer? [2006-04-25 10:59:43] sqchen at citiz dot net hi, I have tried the http://snaps.php.net/php5.1-latest.tar.gz version, and found that it does not fixed the problem, would you please check it again? [2006-04-11 11:01:41] [EMAIL PROTECTED] Sara, can you check this out? [2006-04-05 23:16:55] [EMAIL PROTECTED] Verified in HEAD, 5.0 and 5.1 cvs. #0 0x0816d92d in php_stream_context_del_link (context=0x83ce324, stream=0x83b7b24) at /usr/src/php51/main/streams/streams.c:1984 #1 0x08169df7 in _php_stream_free (stream=0x83b7b24, close_options=11) at /usr/src/php51/main/streams/streams.c:326 #2 0x0816c1c3 in stream_resource_regular_dtor (rsrc=0x83ce1a4) at /usr/src/php51/main/streams/streams.c:1373 #3 0x081a7fb5 in list_entry_destructor (ptr=0x83ce1a4) at /usr/src/php51/Zend/zend_list.c:184 #4 0x081a618c in zend_hash_apply_deleter (ht=0x829c7d4, p=0x83c5a24) at /usr/src/php51/Zend/zend_hash.c:576 #5 0x081a63af in zend_hash_graceful_reverse_destroy (ht=0x829c7d4) at /usr/src/php51/Zend/zend_hash.c:642 #6 0x081a80f9 in zend_destroy_rsrc_list (ht=0x829c7d4) at /usr/src/php51/Zend/zend_list.c:240 #7 0x0819c517 in zend_deactivate () at /usr/src/php51/Zend/zend.c:860 #8 0x0815899a in php_request_shutdown (dummy=0x0) at /usr/src/php51/main/main.c:1283 #9 0x082011c3 in main (argc=1, argv=0xbfbfea54) at /usr/src/php51/sapi/cli/php_cli.c:1245 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/36906 -- Edit this bug report at http://bugs.php.net/?id=36906edit=1
#36906 [Asn]: stream_context_set_option() crashes
ID: 36906 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Assigned Bug Type: Streams related Operating System: *nix PHP Version: 5.1.2 Assigned To: pollita New Comment: hi...the newest version of php-5.1.2 has not fixed this problem yet...would you please assign it to the php developer? Previous Comments: [2006-04-25 10:59:43] sqchen at citiz dot net hi, I have tried the http://snaps.php.net/php5.1-latest.tar.gz version, and found that it does not fixed the problem, would you please check it again? [2006-04-11 11:01:41] [EMAIL PROTECTED] Sara, can you check this out? [2006-04-05 23:16:55] [EMAIL PROTECTED] Verified in HEAD, 5.0 and 5.1 cvs. #0 0x0816d92d in php_stream_context_del_link (context=0x83ce324, stream=0x83b7b24) at /usr/src/php51/main/streams/streams.c:1984 #1 0x08169df7 in _php_stream_free (stream=0x83b7b24, close_options=11) at /usr/src/php51/main/streams/streams.c:326 #2 0x0816c1c3 in stream_resource_regular_dtor (rsrc=0x83ce1a4) at /usr/src/php51/main/streams/streams.c:1373 #3 0x081a7fb5 in list_entry_destructor (ptr=0x83ce1a4) at /usr/src/php51/Zend/zend_list.c:184 #4 0x081a618c in zend_hash_apply_deleter (ht=0x829c7d4, p=0x83c5a24) at /usr/src/php51/Zend/zend_hash.c:576 #5 0x081a63af in zend_hash_graceful_reverse_destroy (ht=0x829c7d4) at /usr/src/php51/Zend/zend_hash.c:642 #6 0x081a80f9 in zend_destroy_rsrc_list (ht=0x829c7d4) at /usr/src/php51/Zend/zend_list.c:240 #7 0x0819c517 in zend_deactivate () at /usr/src/php51/Zend/zend.c:860 #8 0x0815899a in php_request_shutdown (dummy=0x0) at /usr/src/php51/main/main.c:1283 #9 0x082011c3 in main (argc=1, argv=0xbfbfea54) at /usr/src/php51/sapi/cli/php_cli.c:1245 [2006-04-05 20:45:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Cannot reproduce. [2006-03-29 08:02:59] sqchen at citiz dot net Description: stream_context_get_options cause segfault, php version is 5.1.2 Reproduce code: --- ?php $dir=opendir(dirname(__FILE__)); stream_context_set_option($dir, pathname, path, /u/quans/); var_dump(stream_context_get_options($dir)); ? Actual result: -- array(1) { [pathname]= array(1) { [path]= string(9) /u/quans/ } } Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=36906edit=1
#36906 [Asn]: stream_context_set_option() crashes
ID: 36906 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Assigned Bug Type: Streams related Operating System: *nix PHP Version: 5.1.2 Assigned To: pollita New Comment: hi, I have tried the http://snaps.php.net/php5.1-latest.tar.gz version, and found that it does not fixed the problem, would you please check it again? Previous Comments: [2006-04-11 11:01:41] [EMAIL PROTECTED] Sara, can you check this out? [2006-04-05 23:16:55] [EMAIL PROTECTED] Verified in HEAD, 5.0 and 5.1 cvs. #0 0x0816d92d in php_stream_context_del_link (context=0x83ce324, stream=0x83b7b24) at /usr/src/php51/main/streams/streams.c:1984 #1 0x08169df7 in _php_stream_free (stream=0x83b7b24, close_options=11) at /usr/src/php51/main/streams/streams.c:326 #2 0x0816c1c3 in stream_resource_regular_dtor (rsrc=0x83ce1a4) at /usr/src/php51/main/streams/streams.c:1373 #3 0x081a7fb5 in list_entry_destructor (ptr=0x83ce1a4) at /usr/src/php51/Zend/zend_list.c:184 #4 0x081a618c in zend_hash_apply_deleter (ht=0x829c7d4, p=0x83c5a24) at /usr/src/php51/Zend/zend_hash.c:576 #5 0x081a63af in zend_hash_graceful_reverse_destroy (ht=0x829c7d4) at /usr/src/php51/Zend/zend_hash.c:642 #6 0x081a80f9 in zend_destroy_rsrc_list (ht=0x829c7d4) at /usr/src/php51/Zend/zend_list.c:240 #7 0x0819c517 in zend_deactivate () at /usr/src/php51/Zend/zend.c:860 #8 0x0815899a in php_request_shutdown (dummy=0x0) at /usr/src/php51/main/main.c:1283 #9 0x082011c3 in main (argc=1, argv=0xbfbfea54) at /usr/src/php51/sapi/cli/php_cli.c:1245 [2006-04-05 20:45:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Cannot reproduce. [2006-03-29 08:02:59] sqchen at citiz dot net Description: stream_context_get_options cause segfault, php version is 5.1.2 Reproduce code: --- ?php $dir=opendir(dirname(__FILE__)); stream_context_set_option($dir, pathname, path, /u/quans/); var_dump(stream_context_get_options($dir)); ? Actual result: -- array(1) { [pathname]= array(1) { [path]= string(9) /u/quans/ } } Segmentation fault -- Edit this bug report at http://bugs.php.net/?id=36906edit=1
#35900 [Csd]: stream_select() should warning when tv_sec is negative
ID: 35900 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Closed Bug Type: Streams related Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: hi. I have tried it with the snapshot version and found that it's actully not fixed correctory.. file: streamsfuncs.c line: 757 if(sec0). while sec here is a address, so it should be: if (Z_LVAL(*sec) 0)... Previous Comments: [2006-02-23 19:28:44] [EMAIL PROTECTED] This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. [2006-02-23 03:26:33] sqchen at citiz dot net sorry for my late response, I have tried the cvs version http://snaps.php.net/php5.1-latest.tar.gz, and the problem remains as before [2006-01-15 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2006-01-05 10:05:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2006-01-05 03:39:51] sqchen at citiz dot net Description: int stream_select ( array read, array write, array except, int tv_sec [, int tv_usec] ) when tv_sec= -1, tv_usec=600, it should warning, not wait 5 seconds. Reproduce code: --- ?php $read = array(STDIN); if($num_changed_streams = stream_select($read, $write=NULL , $except = NULL, -1,600)) { echo Pass; } else { echo Fail; } ? Expected result: warning: Invalid argument (max_fd=0) Actual result: -- wait 5 seconds for input -- Edit this bug report at http://bugs.php.net/?id=35900edit=1
#36886 [NEW]: memory leaks in stream problems
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Streams related Bug description: memory leaks in stream problems Description: It seems that stream function can cause memory leaks so easily. We hope the stream developer fix it as soon as possible. Here is another one: it leaks when you add ./configure --enable-debug Reproduce code: --- ?php class upper_filter extends php_user_filter{ function filter($in, $out, $consumed, $closing) { while($bucket=stream_bucket_make_writeable($in)){ $fp=fopen(2.txt, w); $bucket=stream_bucket_new($fp, Abc\n); $bucket-data = strtoupper($bucket-data); $consumed += $bucket-datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register(upper, upper_filter); $fp=fopen(2.txt, w); stream_filter_append($fp, upper); fread($fp, 1024); fwrite($fp, Thank you\n); fclose($fp); readfile(2.txt); unlink(2.txt); ? Actual result: -- [EMAIL PROTECTED] sqchen]$ $php tt.php ABC ~ [Tue Mar 28 16:54:43 2006] Script: 'tt.php' /home/sqchen/sqchen/php-5.1.2/main/streams/filter.c(129) : Freeing 0x083EE864 (10 bytes), script=tt.php [Tue Mar 28 16:54:43 2006] Script: 'tt.php' /home/sqchen/sqchen/php-5.1.2/main/streams/filter.c(126) : Freeing 0x083EE814 (32 bytes), script=tt.php === Total 2 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=36886edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36886r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36886r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36886r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36886r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36886r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36886r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36886r=needscript Try newer version:http://bugs.php.net/fix.php?id=36886r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36886r=support Expected behavior:http://bugs.php.net/fix.php?id=36886r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36886r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36886r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36886r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36886r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36886r=dst IIS Stability:http://bugs.php.net/fix.php?id=36886r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36886r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36886r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36886r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36886r=mysqlcfg
#36906 [NEW]: stream_context_get_options cause segfault
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Streams related Bug description: stream_context_get_options cause segfault Description: stream_context_get_options cause segfault, php version is 5.1.2 Reproduce code: --- ?php $dir=opendir(dirname(__FILE__)); stream_context_set_option($dir, pathname, path, /u/quans/); var_dump(stream_context_get_options($dir)); ? Actual result: -- array(1) { [pathname]= array(1) { [path]= string(9) /u/quans/ } } Segmentation fault -- Edit bug report at http://bugs.php.net/?id=36906edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36906r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36906r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36906r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36906r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36906r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36906r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36906r=needscript Try newer version:http://bugs.php.net/fix.php?id=36906r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36906r=support Expected behavior:http://bugs.php.net/fix.php?id=36906r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36906r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36906r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36906r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36906r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36906r=dst IIS Stability:http://bugs.php.net/fix.php?id=36906r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36906r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36906r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36906r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36906r=mysqlcfg
#36508 [NEW]: fgetcsv($fp, 2147483647) will cause segfault
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Date/time related Bug description: fgetcsv($fp, 2147483647) will cause segfault Description: fgetcsv($fp, 2147483647) will cause segfault, this behavior is same as fgets .. Reproduce code: --- ?php $fp =fopen(1.txt, r); fgetcsv($fp, 2147483647); ? Actual result: -- FATAL: emalloc(): Unable to allocate -2147483648 bytes Segmentation fault -- Edit bug report at http://bugs.php.net/?id=36508edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36508r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36508r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36508r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36508r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36508r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36508r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36508r=needscript Try newer version:http://bugs.php.net/fix.php?id=36508r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36508r=support Expected behavior:http://bugs.php.net/fix.php?id=36508r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36508r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36508r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36508r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36508r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36508r=dst IIS Stability:http://bugs.php.net/fix.php?id=36508r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36508r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36508r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36508r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36508r=mysqlcfg
#35900 [NoF-Opn]: stream_select() should warning when tv_sec is negative
ID: 35900 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net -Status: No Feedback +Status: Open Bug Type: Streams related Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: sorry for my late response, I have tried the cvs version http://snaps.php.net/php5.1-latest.tar.gz, and the problem remains as before Previous Comments: [2006-01-15 01:00:03] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2006-01-05 10:05:56] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip [2006-01-05 03:39:51] sqchen at citiz dot net Description: int stream_select ( array read, array write, array except, int tv_sec [, int tv_usec] ) when tv_sec= -1, tv_usec=600, it should warning, not wait 5 seconds. Reproduce code: --- ?php $read = array(STDIN); if($num_changed_streams = stream_select($read, $write=NULL , $except = NULL, -1,600)) { echo Pass; } else { echo Fail; } ? Expected result: warning: Invalid argument (max_fd=0) Actual result: -- wait 5 seconds for input -- Edit this bug report at http://bugs.php.net/?id=35900edit=1
#36492 [NEW]: stream_filter_register cause memory leaks
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Streams related Bug description: stream_filter_register cause memory leaks Description: stream_filter_register cause memory leaks when the php version is 5.1.2 and add --enable-debug parameter Reproduce code: --- ?php class strtolower_filter extends php_user_filter{} stream_filter_register(strtolower, strtolower_filter); $fp = fopen(foo-bar.txt, w); stream_filter_append($fp, strtolower); fwrite($fp, Line1\n); fwrite($fp, WORD - 2\n); fwrite($fp, Easy As 123\n); fclose($fp); readfile(foo-bar.txt); ? Actual result: -- [Thu Feb 23 13:32:38 2006] Script: 'stream_filter_register.php' /home/sqchen/sqchen/php-5.1.2/main/streams/filter.c(78) : Freeing 0x083EEC14 (32 bytes), script=stream_filter_register.php Last leak repeated 2 times === Total 3 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=36492edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36492r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36492r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36492r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36492r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36492r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36492r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36492r=needscript Try newer version:http://bugs.php.net/fix.php?id=36492r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36492r=support Expected behavior:http://bugs.php.net/fix.php?id=36492r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36492r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36492r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36492r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36492r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36492r=dst IIS Stability:http://bugs.php.net/fix.php?id=36492r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36492r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36492r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36492r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36492r=mysqlcfg
#36456 [NEW]: proc_terminte($process,22) cause system hang
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: proc_terminte($process,22) cause system hang Description: proc_terminte($process,22) cause system hangs Reproduce code: --- $process = proc_open('/bin/ls', $descriptorspec, $pipes, $cwd, $env); proc_terminte($process,22) Expected result: something happens Actual result: -- system hang -- Edit bug report at http://bugs.php.net/?id=36456edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36456r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36456r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36456r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36456r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36456r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36456r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36456r=needscript Try newer version:http://bugs.php.net/fix.php?id=36456r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36456r=support Expected behavior:http://bugs.php.net/fix.php?id=36456r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36456r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36456r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36456r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36456r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36456r=dst IIS Stability:http://bugs.php.net/fix.php?id=36456r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36456r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36456r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36456r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36456r=mysqlcfg
#36457 [NEW]: glob(*.txt, 50) segment fault on linux
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: glob(*.txt, 50) segment fault on linux Description: glob(*.txt, 50) segment fault on linux Reproduce code: --- glob(*.txt, 50) ans also when the second parameter is 48 or 64 or some others Actual result: -- segfault -- Edit bug report at http://bugs.php.net/?id=36457edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36457r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36457r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36457r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36457r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36457r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36457r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36457r=needscript Try newer version:http://bugs.php.net/fix.php?id=36457r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36457r=support Expected behavior:http://bugs.php.net/fix.php?id=36457r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36457r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36457r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36457r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36457r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36457r=dst IIS Stability:http://bugs.php.net/fix.php?id=36457r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36457r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36457r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36457r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36457r=mysqlcfg
#36410 [NEW]: usleep() do strange behavior
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: usleep() do strange behavior Description: there are two questions: first: usleep(21474809); usleep(21474909); second: usleep(-1); usleep(-21474809); Actual result: -- first: usleep(21474809) wait for a long time (I am not sure hong long?) usleep(21474909) wait for 1 second second: usleep(-1) wait for a long time usleep(-21474809) wait for 0 second -- Edit bug report at http://bugs.php.net/?id=36410edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36410r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36410r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36410r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36410r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36410r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36410r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36410r=needscript Try newer version:http://bugs.php.net/fix.php?id=36410r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36410r=support Expected behavior:http://bugs.php.net/fix.php?id=36410r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36410r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36410r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36410r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36410r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36410r=dst IIS Stability:http://bugs.php.net/fix.php?id=36410r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36410r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36410r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36410r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36410r=mysqlcfg
#36064 [NEW]: RecursiveDirectoryIterator::hasChildren 's problem
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: RecursiveDirectoryIterator::hasChildren 's problem Description: php manual says RecursiveDirectoryIterator::hasChildren() Returns whether current entry is a directory and not '.' or '..' () Reproduce code: --- ?php $obj = new RecursiveDirectoryIterator(bbb); $obj-rewind(); for($i=0;$i5;$i++){ var_dump($obj-key()); var_dump($obj-hasChildren()); $obj-next(); } ? directory bbb included: 1.txt cccp.txt //ccc is a directory Expected result: string(9) bbb/1.txt bool(false) string(7) bbb/ccc bool(true) string(9) bbb/p.txt bool(false) string(4) bbb/ bool(false) string(4) bbb/ bool(false) Actual result: -- string(9) bbb/1.txt bool(false) string(7) bbb/ccc bool(true) string(9) bbb/p.txt bool(false) string(4) bbb/ bool(true) string(4) bbb/ bool(true) -- Edit bug report at http://bugs.php.net/?id=36064edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36064r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36064r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36064r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36064r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36064r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36064r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=36064r=needscript Try newer version:http://bugs.php.net/fix.php?id=36064r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36064r=support Expected behavior:http://bugs.php.net/fix.php?id=36064r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36064r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36064r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36064r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36064r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36064r=dst IIS Stability:http://bugs.php.net/fix.php?id=36064r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36064r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36064r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36064r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=36064r=mysqlcfg
#35967 [NEW]: control statement return problen
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: control statement return problen Description: the return control statement will cause segfault Reproduce code: --- ?php funciton foo() { return foo(); } foo(); Actual result: -- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=35967edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35967r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35967r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35967r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35967r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35967r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35967r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35967r=needscript Try newer version:http://bugs.php.net/fix.php?id=35967r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35967r=support Expected behavior:http://bugs.php.net/fix.php?id=35967r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35967r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35967r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35967r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35967r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35967r=dst IIS Stability:http://bugs.php.net/fix.php?id=35967r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35967r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35967r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35967r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35967r=mysqlcfg
#35916 [Opn]: stream_socket_append() twice will cause segfault
ID: 35916 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Open Bug Type: Unknown/Other Function Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: sorry, it's stream_bucket_append and stream_bucket_prepend Previous Comments: [2006-01-06 06:59:53] sqchen at citiz dot net Description: stream_socket_append() twice will cause segfault, the same as stream_socket_prepend() Reproduce code: --- ?php class strtoupper_filter extends php_user_filter{ function filter($in, $out, $consumed, $closing) { while($bucket=stream_bucket_make_writeable($in)){ $bucket-data = strtoupper($bucket-data); $consumed += $bucket-datalen; stream_bucket_append($out, $bucket); /*here twice will cause segfault*/ stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } function onCreate(){ echo fff\n; } function onClose(){ echo hello\n; } } stream_filter_register(strtoupper, strtoupper_filter); $fp=fopen(1.txt, w); stream_filter_append($fp, strtoupper); fread($fp, 1024); fwrite($fp, Thank you\n); fclose($fp); readfile(1.txt); unlink(1.txt); ? Actual result: -- segfault -- Edit this bug report at http://bugs.php.net/?id=35916edit=1
#35914 [NEW]: Does fflush() readly works?
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Filesystem function related Bug description: Does fflush() readly works? Description: Do you this think fflush() realy works? plese see following code if you answer it's not a bug, please give me a example how to use fflush() correctly. Reproduce code: --- before fflush ?php $fp = fopen(1.txt, w); while(1) { fwrite($fp, a); sleep(1); } ? after fflush ?php $fp1 = fopen(1.txt, w); $fp2 = fopen(2.txt, w); while(1) { fwrite($fp1, a); fflush($fp2); sleep(1); } ? Expected result: ---before fflush--- no contents in file 1.txt until it's buffer is full ---after fflush--- a a a a. in file 2.txt immediately Actual result: -- ---before fflush--- a a a a. in file 1.txt immediately ---after fflush--- empty in file 2.txt -- Edit bug report at http://bugs.php.net/?id=35914edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35914r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35914r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35914r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35914r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35914r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35914r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35914r=needscript Try newer version:http://bugs.php.net/fix.php?id=35914r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35914r=support Expected behavior:http://bugs.php.net/fix.php?id=35914r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35914r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35914r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35914r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35914r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35914r=dst IIS Stability:http://bugs.php.net/fix.php?id=35914r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35914r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35914r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35914r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35914r=mysqlcfg
#35916 [NEW]: stream_socket_append() twice will cause segfault
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_socket_append() twice will cause segfault Description: stream_socket_append() twice will cause segfault, the same as stream_socket_prepend() Reproduce code: --- ?php class strtoupper_filter extends php_user_filter{ function filter($in, $out, $consumed, $closing) { while($bucket=stream_bucket_make_writeable($in)){ $bucket-data = strtoupper($bucket-data); $consumed += $bucket-datalen; stream_bucket_append($out, $bucket); /*here twice will cause segfault*/ stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } function onCreate(){ echo fff\n; } function onClose(){ echo hello\n; } } stream_filter_register(strtoupper, strtoupper_filter); $fp=fopen(1.txt, w); stream_filter_append($fp, strtoupper); fread($fp, 1024); fwrite($fp, Thank you\n); fclose($fp); readfile(1.txt); unlink(1.txt); ? Actual result: -- segfault -- Edit bug report at http://bugs.php.net/?id=35916edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35916r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35916r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35916r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35916r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35916r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35916r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35916r=needscript Try newer version:http://bugs.php.net/fix.php?id=35916r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35916r=support Expected behavior:http://bugs.php.net/fix.php?id=35916r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35916r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35916r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35916r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35916r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35916r=dst IIS Stability:http://bugs.php.net/fix.php?id=35916r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35916r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35916r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35916r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35916r=mysqlcfg
#35917 [NEW]: stream_copy_to_stream() cause data lost when copy from stream to same stream
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_copy_to_stream() cause data lost when copy from stream to same stream Description: This problem is same as copy() function Reproduce code: --- ?php $des5 = fopen(1.txt, r); //hello in 1.txt $des6 = fopen(1.txt, w); stream_copy_to_stream($des5, $des6); readfile(1.txt); ? Expected result: hello Actual result: -- none -- Edit bug report at http://bugs.php.net/?id=35917edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35917r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35917r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35917r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35917r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35917r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35917r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35917r=needscript Try newer version:http://bugs.php.net/fix.php?id=35917r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35917r=support Expected behavior:http://bugs.php.net/fix.php?id=35917r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35917r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35917r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35917r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35917r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35917r=dst IIS Stability:http://bugs.php.net/fix.php?id=35917r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35917r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35917r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35917r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35917r=mysqlcfg
#35900 [NEW]: stream_select() should warning when tv_sec is negative
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_select() should warning when tv_sec is negative Description: int stream_select ( array read, array write, array except, int tv_sec [, int tv_usec] ) when tv_sec= -1, tv_usec=600, it should warning, not wait 5 seconds. Reproduce code: --- ?php $read = array(STDIN); if($num_changed_streams = stream_select($read, $write=NULL , $except = NULL, -1,600)) { echo Pass; } else { echo Fail; } ? Expected result: warning: Invalid argument (max_fd=0) Actual result: -- wait 5 seconds for input -- Edit bug report at http://bugs.php.net/?id=35900edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35900r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35900r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35900r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35900r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35900r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35900r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35900r=needscript Try newer version:http://bugs.php.net/fix.php?id=35900r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35900r=support Expected behavior:http://bugs.php.net/fix.php?id=35900r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35900r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35900r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35900r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35900r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35900r=dst IIS Stability:http://bugs.php.net/fix.php?id=35900r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35900r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35900r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35900r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35900r=mysqlcfg
#35849 [NEW]: stream_copy_to_stream() do strange behavior
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_copy_to_stream() do strange behavior Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des1); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des1); readfile(des2.txt); //hello, world ? -- Edit bug report at http://bugs.php.net/?id=35849edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35849r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35849r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35849r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35849r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35849r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35849r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35849r=needscript Try newer version:http://bugs.php.net/fix.php?id=35849r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35849r=support Expected behavior:http://bugs.php.net/fix.php?id=35849r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35849r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35849r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35849r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35849r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35849r=dst IIS Stability:http://bugs.php.net/fix.php?id=35849r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35849r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35849r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35849r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35849r=mysqlcfg
#35849 [Opn]: stream_copy_to_stream() do strange behavior
ID: 35849 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Open Bug Type: Unknown/Other Function Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: SORRY, I have make a mistake on the code above, Below is the right code Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des2); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des2); readfile(des2.txt); //hello, world ? Previous Comments: [2005-12-30 07:43:17] sqchen at citiz dot net Description: stream_copy_to_stream() do strange behavior when the maxlength parameter is negative, see the following codes: Reproduce code: --- ?php $src = fopen(1.txt, r); //hell, world in 1.txt $dest1 = fopen(des1.txt, w); $dest2 = fopen(des2.txt, w); /*seg1--*/ stream_copy_to_stream($src, $des1, -2); readfile(des1.txt); //hello, world stream_copy_to_stream($src, $des1); readfile(des2.txt); //nothing? why? /* please compare it with seg2*/ /*seg2---*/ stream_copy_to_stream($src, $des1, 2); readfile(des1.txt); //he stream_copy_to_stream($src, $des1); readfile(des2.txt); //hello, world ? -- Edit this bug report at http://bugs.php.net/?id=35849edit=1
#35781 [NEW]: stream_filter_append will cause segfault
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Unknown/Other Function Bug description: stream_filter_append will cause segfault Description: stream_filter_append($fp, string.rot13, -49) will cause Segmentation fault Reproduce code: --- ?php $fp = fopen(test.txt, w); stream_filter_append($fp, string.rot13, -49); fwrite($fp, This is a test\n); rewind($fp); fpassthru($fp); fclose($fp); ? Actual result: -- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=35781edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35781r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35781r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35781r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35781r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35781r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35781r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35781r=needscript Try newer version:http://bugs.php.net/fix.php?id=35781r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35781r=support Expected behavior:http://bugs.php.net/fix.php?id=35781r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35781r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35781r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35781r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35781r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35781r=dst IIS Stability:http://bugs.php.net/fix.php?id=35781r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35781r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35781r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35781r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35781r=mysqlcfg
#35738 [Bgs]: how to declare a non static method
ID: 35738 User updated by: sqchen at citiz dot net Reported By: sqchen at citiz dot net Status: Bogus Bug Type: Class/Object related Operating System: redhat 7.3 PHP Version: 5.1.1 New Comment: sorry , my code is not clearly: and here is the right code: ?php class A{ public function foo() { echo [foo]\n; } public static function static_foo() { echo [static_foo]; } } A::foo(); A::static_foo(); ? expected result: warning [static_foo] actual result: [foo] [static_foo] Previous Comments: [2005-12-20 08:25:07] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. . [2005-12-20 05:24:43] sqchen at citiz dot net Description: as php manual says: http://www.php.net/manual/en/language.oop5.static.php if a method is declared as just public, it will be no static method, right? it not, how to declared a no static method Reproduce code: --- ?php class A{ public function foo(){ //no static method? echo [foo]\n;} } public static function static_foo(){//static method? echo [static_foo];} } A::foo(); //[foo] A::static_foo(); //[static_foo] ? Expected result: warning: [static_foo] Actual result: -- [foo] [static_foo] -- Edit this bug report at http://bugs.php.net/?id=35738edit=1
#35756 [NEW]: ecalloc in fgets() does't not check its return value
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Filesystem function related Bug description: ecalloc in fgets() does't not check its return value Description: file ext/standard/file.c line 1028 buf = ecalloc(len + 1, sizeof(char)); if (php_stream_get_line(stream, buf, len, line_len) == NULL) { goto exit_failed; } here doesn't check the availablity of 'buf', so if ecalloc doesn't calloc a memory, it will return NULL, it will cause some problem Reproduce code: --- $fp=fopen(1.txt, r); fgets($fp, 2147483640); on some platform, when ecalloc failed, it will return NULL, so segmentation fault will prompt. the same as fread function -- Edit bug report at http://bugs.php.net/?id=35756edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35756r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35756r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35756r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35756r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35756r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35756r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35756r=needscript Try newer version:http://bugs.php.net/fix.php?id=35756r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35756r=support Expected behavior:http://bugs.php.net/fix.php?id=35756r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35756r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35756r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35756r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35756r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35756r=dst IIS Stability:http://bugs.php.net/fix.php?id=35756r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35756r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35756r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35756r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35756r=mysqlcfg
#35738 [NEW]: how to declare a non static method
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.1 PHP Bug Type: Class/Object related Bug description: how to declare a non static method Description: as php manual says: http://www.php.net/manual/en/language.oop5.static.php if a method is declared as just public, it will be no static method, right? it not, how to declared a no static method Reproduce code: --- ?php class A{ public function foo(){ //no static method? echo [foo]\n;} } public static function static_foo(){//static method? echo [static_foo];} } A::foo(); //[foo] A::static_foo(); //[static_foo] ? Expected result: warning: [static_foo] Actual result: -- [foo] [static_foo] -- Edit bug report at http://bugs.php.net/?id=35738edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35738r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35738r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35738r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35738r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35738r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35738r=needtrace Need Reproduce Script:http://bugs.php.net/fix.php?id=35738r=needscript Try newer version:http://bugs.php.net/fix.php?id=35738r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35738r=support Expected behavior:http://bugs.php.net/fix.php?id=35738r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35738r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35738r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35738r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35738r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35738r=dst IIS Stability:http://bugs.php.net/fix.php?id=35738r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35738r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35738r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35738r=nozend MySQL Configuration Error:http://bugs.php.net/fix.php?id=35738r=mysqlcfg