#49199 [NEW]: when i use microsoft ado to insert data ,there has a bug
From: lzt dot liang at tom dot com Operating system: window xp and 2003 PHP version: 5.2.10 PHP Bug Type: Unknown/Other Function Bug description: when i use microsoft ado to insert data ,there has a bug Description: microsoft com in ado has a bug Reproduce code: --- open("provider=sqloledb;data source=192.168.0.2,1433;User ID=sa;pwd=123;Initial Catalog=tmp"); $rs=new COM("ADODB.Recordset"); $sql="SELECT * FROM [dbo].[tmp]"; $rs->open($sql,$conn,1,3); $rs->addnew; $rs["text"]="²âÊÔ¿´¿´"; $rs->update; ?> Expected result: please see this pic http://www.gdlydf.com/longyan/Image/2009080717103050286.jpg -- Edit bug report at http://bugs.php.net/?id=49199&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49199&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49199&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49199&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49199&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49199&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49199&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49199&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49199&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49199&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49199&r=support Expected behavior: http://bugs.php.net/fix.php?id=49199&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49199&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49199&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49199&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49199&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49199&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49199&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49199&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49199&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49199&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49199&r=mysqlcfg
#49198 [Opn]: Incorrect result for .*
ID: 49198 Updated by: paj...@php.net Reported By: inf3rno dot hu at gmail dot com Status: Open Bug Type: PCRE related -Operating System: Windows XP +Operating System: * PHP Version: 5.2.10 New Comment: Not windows specific Previous Comments: [2009-08-08 20:08:15] inf3rno dot hu at gmail dot com Description: For pattern: .* there is an empty match at the end of the string. Reproduce code: --- $p1='/.*/'; $p2='/.*$/'; $p3='/^.*/'; $p4='/^.*$/'; $test='some text'; function test($p,$t) { preg_match_all($p,$t,$m,PREG_SET_ORDER); echo $p.''; if (count($m)==1) echo 'ok'; else echo 'bug'; echo ''.var_export($m,true).''; echo ''; } test($p1,$test); test($p2,$test); test($p3,$test); test($p4,$test); Expected result: I'm expecting one match in the preg_match_all result array, and I will get two instead of one. The second match is empty. Actual result: -- /.*/ bug array ( 0 => array ( 0 => 'some text', ), 1 => array ( 0 => '', ), ) /.*$/ bug array ( 0 => array ( 0 => 'some text', ), 1 => array ( 0 => '', ), ) /^.*/ ok array ( 0 => array ( 0 => 'some text', ), ) /^.*$/ ok array ( 0 => array ( 0 => 'some text', ), ) -- Edit this bug report at http://bugs.php.net/?id=49198&edit=1
#49198 [NEW]: Incorrect result for .*
From: inf3rno dot hu at gmail dot com Operating system: Windows XP PHP version: 5.2.10 PHP Bug Type: PCRE related Bug description: Incorrect result for .* Description: For pattern: .* there is an empty match at the end of the string. Reproduce code: --- $p1='/.*/'; $p2='/.*$/'; $p3='/^.*/'; $p4='/^.*$/'; $test='some text'; function test($p,$t) { preg_match_all($p,$t,$m,PREG_SET_ORDER); echo $p.''; if (count($m)==1) echo 'ok'; else echo 'bug'; echo ''.var_export($m,true).''; echo ''; } test($p1,$test); test($p2,$test); test($p3,$test); test($p4,$test); Expected result: I'm expecting one match in the preg_match_all result array, and I will get two instead of one. The second match is empty. Actual result: -- /.*/ bug array ( 0 => array ( 0 => 'some text', ), 1 => array ( 0 => '', ), ) /.*$/ bug array ( 0 => array ( 0 => 'some text', ), 1 => array ( 0 => '', ), ) /^.*/ ok array ( 0 => array ( 0 => 'some text', ), ) /^.*$/ ok array ( 0 => array ( 0 => 'some text', ), ) -- Edit bug report at http://bugs.php.net/?id=49198&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49198&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49198&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49198&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49198&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49198&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49198&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49198&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49198&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49198&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49198&r=support Expected behavior: http://bugs.php.net/fix.php?id=49198&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49198&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49198&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49198&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49198&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49198&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49198&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49198&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49198&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49198&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49198&r=mysqlcfg
#49193 [Opn]: gd_compat > gdJpegGetVersionString should return const char* not int
ID: 49193 User updated by: th at drillich dot com Reported By: th at drillich dot com Status: Open Bug Type: GD related -Operating System: linux-amd64 +Operating System: All 64Bit systems PHP Version: 5.3.0 New Comment: Here's the patch which fixes the bug: --- php5-5.3.0/ext/gd/libgd/gd_compat.hgdJpegGetVersionString_returnsInt 2009-08-07 19:09:40.0 +0200 +++ php5-5.3.0/ext/gd/libgd/gd_compat.h 2009-08-07 19:09:54.0 +0200 @@ -8,7 +8,7 @@ #endif const char * gdPngGetVersionString(); -int gdJpegGetVersionString(); +const char * gdJpegGetVersionString(); int gdJpegGetVersionInt(); int overflow2(int a, int b); --- php5-5.3.0/ext/gd/libgd/gd_compat.c.gdJpegGetVersionString_returnsInt 2009-08-07 19:09:07.0 +0200 +++ php5-5.3.0/ext/gd/libgd/gd_compat.c 2009-08-07 19:10:11.0 +0200 @@ -14,7 +14,7 @@ return JPEG_LIB_VERSION; } -int gdJpegGetVersionString() +const char * gdJpegGetVersionString() { switch(JPEG_LIB_VERSION) { case 62: Previous Comments: [2009-08-07 17:14:16] th at drillich dot com Description: In gd_compat.[hc] gdJpegGetVersionString() is declared as returning int not const char*, but sizeof(int) != sizeof(const char*) on some systems like here sizeof(int) == 4 and sizeof(const char*) == 8. this causes a segfault on phpinfo(). cu thomas Actual result: -- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f996e9c3740 (LWP 17235)] strlen () at ../sysdeps/x86_64/strlen.S:48 48 ../sysdeps/x86_64/strlen.S: No such file or directory. in ../sysdeps/x86_64/strlen.S Current language: auto; currently asm (gdb) bt #0 strlen () at ../sysdeps/x86_64/strlen.S:48 #1 0x7f9969a207c8 in format_converter (odp=0x7fff76a001f0, fmt=0x7f9964f364d0 "s", ap=0x7fff76a00150) at src/php5/php5-5.3.0/main/snprintf.c:964 #2 0x7f9969a213ac in strx_printv (ccp=0x7fff76a0020c, buf=0x7f996e9c36f0 "(X\206n\231\177", len=1990197800, format=0x7f9964f364cf "%s", ap=0x0) at src/php5/php5-5.3.0/main/snprintf.c:1211 #3 0x7f9969a21554 in ap_php_snprintf (buf=0x7fff76a002db "", len=1855731440, format=0x0) at src/php5/php5-5.3.0/main/snprintf.c:1256 #4 0x7f9964f32b44 in zm_info_gd (zend_module=0x13c2bb0) at src/php5/php5-5.3.0/ext/gd/gd.c:1296 #5 0x7f99699c06e0 in _display_module_info_func (module=0x64f37878) at src/php5/php5-5.3.0/ext/standard/info.c:123 #6 0x7f9969a7c6d5 in zend_hash_apply (ht=0x7fff76a00520, apply_func=0x7f99699c06d0 <_display_module_info_func>) at src/php5/php5-5.3.0/Zend/zend_hash.c:673 #7 0x7f99699c1a5a in php_print_info (flag=32767) at src/php5/php5-5.3.0/ext/standard/info.c:903 #8 0x7f99699c1e61 in zif_phpinfo (ht=1693677688, return_value=0x130f858, return_value_ptr=0x7fff76a00228, this_ptr=0x0, return_value_used=-16843009) at src/php5/php5-5.3.0/ext/standard/info.c:1217 #9 0x7f9969ac1e5b in zend_do_fcall_common_helper_SPEC (execute_data=0x7f996a17c580) at src/php5/php5-5.3.0/Zend/zend_vm_execute.h:313 #10 0x7f9969a9b299 in execute (op_array=0x130eea8) at src/php5/php5-5.3.0/Zend/zend_vm_execute.h:104 #11 0x7f9969a700c1 in zend_execute_scripts (type=0, retval=0x7fff76a00770, file_count=3) at src/php5/php5-5.3.0/Zend/zend.c:1188 #12 0x7f9969a1c805 in php_execute_script (primary_file=Cannot access memory at address 0x8000769ff690 ) at src/php5/php5-5.3.0/main/main.c:2196 #13 0x7f9969afa775 in php_handler (r=0x43c055) at src/php5/php5-5.3.0/sapi/apache2handler/sapi_apache2.c:663 #14 0x0043b8d3 in ap_run_handler () #15 0x0043ee9f in ap_invoke_handler () #16 0x0044c11e in ap_process_request () #17 0x00449158 in ?? () #18 0x00442dd3 in ap_run_process_connection () #19 0x00450720 in ?? () #20 0x00450a38 in ?? () #21 0x00451050 in ap_mpm_run () #22 0x00428425 in main () (gdb) -- Edit this bug report at http://bugs.php.net/?id=49193&edit=1
#49197 [NEW]: FILTER_VALIDATE_URL does not validate urls
From: matt dot farina at gmail dot com Operating system: PHP version: 5.2.10 PHP Bug Type: Filter related Bug description: FILTER_VALIDATE_URL does not validate urls Description: FILTER_VALIDATE_URL doesn't actually validate a url. It passes the url through parse_url (which according to the documentation is not meant to validate a url). When tested against a test set this can be seen. Instead of this method PHP should use a regex or some other method to actually validate it. See http://api.drupal.org/api/function/valid_url/6 for an example that is to RFC 3986. I would hope for PHP 6 we can have it look for a valid IRL (with international characters) as well. -- Edit bug report at http://bugs.php.net/?id=49197&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49197&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49197&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49197&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49197&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49197&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49197&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49197&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49197&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49197&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49197&r=support Expected behavior: http://bugs.php.net/fix.php?id=49197&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49197&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49197&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49197&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49197&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49197&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49197&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49197&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49197&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49197&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49197&r=mysqlcfg
#49196 [Opn]: PHP could not understand multi files Web Forms 2.0 request
ID: 49196 User updated by: mikhail dot v dot gavrilov at gmail dot com Reported By: mikhail dot v dot gavrilov at gmail dot com Status: Open Bug Type: HTTP related Operating System: * PHP Version: 5.3.0 New Comment: Expected that array $_FILES would be filled, but instead recieve all content in $_POST array, for example: Array ( [file] => WABJYWB4BD24HFXX0Tt6AT Content-Disposition: form-data; name="file"; filename="test.php" Content-Type: application/octet-stream Content of first file WABJYWB4BD24HFXX0Tt6AT Content-Disposition: form-data; name="file"; filename="SP092171.XML" Content-Type: text/xml Content of second file WABJYWB4BD24HFXX0Tt6AT-- [submit] => Upload ) Previous Comments: [2009-08-08 07:53:02] mikhail dot v dot gavrilov at gmail dot com Description: Opera browser a support Web Forms 2.0, it allows easy build uploading multiple files form. Below given a fragment of html code demonstrates it. (In file open dialog you can select few files) Now the problem is that PHP does not understand http request from a browser with multiple file's selected. ($_FILES array is empty). Reproduce code: --- Upload to server a few files through Opera, by described above method. -- Edit this bug report at http://bugs.php.net/?id=49196&edit=1
#49196 [NEW]: PHP could not understand multi files Web Forms 2.0 request
From: mikhail dot v dot gavrilov at gmail dot com Operating system: * PHP version: 5.3.0 PHP Bug Type: HTTP related Bug description: PHP could not understand multi files Web Forms 2.0 request Description: Opera browser a support Web Forms 2.0, it allows easy build uploading multiple files form. Below given a fragment of html code demonstrates it. (In file open dialog you can select few files) Now the problem is that PHP does not understand http request from a browser with multiple file's selected. ($_FILES array is empty). Reproduce code: --- Upload to server a few files through Opera, by described above method. -- Edit bug report at http://bugs.php.net/?id=49196&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49196&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49196&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49196&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49196&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49196&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49196&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49196&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49196&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49196&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49196&r=support Expected behavior: http://bugs.php.net/fix.php?id=49196&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49196&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49196&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49196&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49196&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=49196&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49196&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49196&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49196&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49196&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49196&r=mysqlcfg