#43508 [Bgs->Fbk]: ImageCreateFromPNG does not set transparent color
ID: 43508 Updated by: [EMAIL PROTECTED] Reported By: vbhunt at silverfox dot com -Status: Bogus +Status: Feedback Bug Type: GD related Operating System: Windows XP Professional Ver 2SP2 PHP Version: 5.2.5 Assigned To: pajoye New Comment: "Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels." Exactly, there is not transparent color set but a white color with 100% transparency. The alpha channel is correctly read and the resulting image can use it correctly. Take the "alert.png" image, the top left pixel is transparent (at 0,0), using a white color with 100% transparency but it is not the bgd color. Or am I still missing your point? Previous Comments: [2008-11-03 00:55:18] vbhunt at silverfox dot com This is NOT a bogus bug. Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels. No alpha channels are shown in either ImageReady or Photoshop. Every single one of the submitted test images properly display with proper png transparency in both IE7 and Firefox3 as well as ImageReady 7.01 and Photoshop 7.01 as was originally reported. Yet the ImageCreateFromPNG function cannot find this transparency. Therefore I continue to conclude that this is NOT a bogus bug. Can you demonstrate any working example that preserves transparency using ImageCreateFromPNG? I suspect not. I have provided you with many examples that cause this function to fail, yet have clear transparency as shown in both the development and display tools. [2008-11-02 18:30:25] [EMAIL PROTECTED] There is no transparent color (or known as background color). The alert.png for example uses the alpha channel, and the borders of the images is filled with the white color and 100% alpha. A png image can use either the alpha channel or the transparent color but not both. [2008-11-02 18:15:25] vbhunt at silverfox dot com Sorry, permissions were changed in a security sweep. I've corrected the permissions so you can get at the images: https://www.republiclocomotiveworks.com/buttons/icons/alert.png https://www.republiclocomotiveworks.com/buttons/icons/.png replace with one of the following as the first example shows. alert, group, home, left, mail, right, send, stop, stop1, trash, user Again, thanks for looking at this! /bruce [2008-11-02 15:15:24] [EMAIL PROTECTED] None of the images work, please provide a link to existing images. [2008-11-02 13:20:04] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ 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/43508 -- Edit this bug report at http://bugs.php.net/?id=43508&edit=1
#46467 [Opn->Bgs]: htmlentities() does not use default_charset when mbstring.so is loaded
ID: 46467 Updated by: [EMAIL PROTECTED] Reported By: hostmaster at uuism dot net -Status: Open +Status: Bogus Bug Type: mbstring related Operating System: Fedora Core 4 PHP Version: 5.2.6 New Comment: Yes, they fail for everyone and especially with braindead libc's. Previous Comments: [2008-11-02 22:46:37] hostmaster at uuism dot net Description: When I run test scripts ext/standard/tests/strings/htmlentitiesXX.phpt where XX is 10, 11, and 13, the tests fail when mbstring.so is loaded and pass when mbstring.so is not loaded. If I change the test script INI value for mbstring.internal_encoding to the default_charset, the test will pass. Also, they will pass of the $charset is included in the command htmlentities. I am using the php.ini-recommended with extension_dir = "/usr/local/src/php-5.2.6/modules" I placed the php.ini in directory /usr/local/src/php-5.2.6/sapi/cli so sapi/cli/php would use it. All the php.ini values for mbstring are commented out: # grep mbstring /usr/local/src/php-5.2.6/sapi/cli/php.ini ;extension=php_mbstring.dll [mbstring] ;mbstring.language = Japanese ;mbstring.internal_encoding = EUC-JP ;mbstring.http_input = auto ;mbstring.http_output = SJIS ; mbstring.internal_encoding setting. Input chars are ;mbstring.encoding_translation = Off ;mbstring.detect_order = auto ;mbstring.substitute_character = none; ; overload(replace) single byte functions by mbstring functions. ;mbstring.func_overload = 0 ;mbstring.strict_encoding = Off ; With mbstring support this will automatically be converted into the encoding ; given by corresponding encode setting. When empty mbstring.internal_encoding Here is the run without mbstring.so loaded: ]# TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php ext/standard/tests/strings/htmlentities*phpt = PHP : sapi/cli/php PHP_SAPI: cli PHP_VERSION : 5.2.6 ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov 8 14:19:44 EST 2007 i686 INI actual : /usr/local/src/php-5.2.6/sapi/cli/php.ini More .INIs : /etc/php.d/mysql.ini,/etc/php.d/mysqli.ini CWD : /usr/local/src/php-5.2.6 Extra dirs : = Running selected tests. [snip] PASS htmlentities() test 10 (default_charset / cp1252) [ext/standard/tests/strings/htmlentities10.phpt] PASS htmlentities() test 11 (default_charset / ISO-8859-15) [ext/standard/tests/strings/htmlentities11.phpt] PASS htmlentities() test 12 (default_charset / ISO-8859-1) [ext/standard/tests/strings/htmlentities12.phpt] PASS htmlentities() test 13 (default_charset / EUC-JP) [ext/standard/tests/strings/htmlentities13.phpt] [snip] = Number of tests : 2014 Tests skipped :6 ( 30.0%) Tests warned:0 ( 0.0%) ( 0.0%) Tests failed:0 ( 0.0%) ( 0.0%) Tests passed: 14 ( 70.0%) (100.0%) - Time taken :1 seconds = Here is the run WITH mbstring.so loaded: # TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php ext/standard/tests/strings/htmlentities*phpt = PHP : sapi/cli/php PHP_SAPI: cli PHP_VERSION : 5.2.6 ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov 8 14:19:44 EST 2007 i686 INI actual : /usr/local/src/php-5.2.6/sapi/cli/php.ini More .INIs : /etc/php.d/mbstring.ini,/etc/php.d/mysql.ini,/etc/php.d/mysqli.ini CWD : /usr/local/src/php-5.2.6 Extra dirs : = Running selected tests. [snip] FAIL htmlentities() test 10 (default_charset / cp1252) [ext/standard/tests/strings/htmlentities10.phpt] FAIL htmlentities() test 11 (default_charset / ISO-8859-15) [ext/standard/tests/strings/htmlentities11.phpt] PASS htmlentities() test 12 (default_charset / ISO-8859-1) [ext/standard/tests/strings/htmlentities12.phpt] FAIL htmlentities() test 13 (default_charset / EUC-JP) [ext/standard/tests/strings/htmlentities13.phpt] [snip] = Number of tests : 2020 Tests skipped :0 ( 0.0%) Tests warned:3 ( 15.0%) ( 15.0%) Tests failed:3 ( 15.0%) ( 15.0%) Tests passed: 14 ( 70.0%) ( 70.0%) - Time taken :2 seconds = ==
#46466 [Bgs]: Imagecolorallocate,imagettftext,rand combined bug
ID: 46466 User updated by: laszlo dot janszky at gmail dot com Reported By: laszlo dot janszky at gmail dot com Status: Bogus Bug Type: GD related Operating System: windows xp PHP Version: 5.2.6 New Comment: Now I checked it manually, i saved all the settings in a table, and loaded it. It's generating the bug without rand() too. Here is the table: $c $char $r$b $g $a$s $l $t 1; 0;0;237;150;6;20;15; 31 9; 1;5;250;142;3;20;30; 33 17;2;23; 237;130;9;19;45; 33 25;3;21; 255;147;10; 18;60; 37 33;4;28; 240;150;8;19;75; 30 41;5;10; 243;124;5;21;90; 36 49;6;8;240;149;7;18;105;35 57;7;18; 247;128;1;21;120;30 65;8;2;249;142;5;22;135;36 72;9;17; 225;138;3;22;150;34 80;a;5;230;131;6;19;165;35 88;b;22; 240;145;4;18;180;39 96;c;24; 226;132;9;20;195;30 104; d;3;249;129;10; 21;210;40 112; e;22; 230;146;8;18;225;34 120; f;9;255;144;1;20;240;36 127; g;8;255;129;3;18;255;36 135; h;8;246;136;6;19;270;34 143; i;6;233;142;7;20;285;37 151; j;18; 225;131;5;20;300;33 159; k;24; 236;140;10; 19;315;36 167; l;7;240;137;6;22;330;30 175; m;25; 229;124;4;18;345;35 183; n;25; 233;146;9;18;360;35 211; o;17; 254;142;0;18;375;32 218; p;10; 254;138;1;21;390;32 224; q;25; 243;132;2;22;405;30 232; r;8;242;135;4;20;420;32 239; s;26; 239;143;10; 22;435;37 245; t;22; 248;147;4;18;450;30 252; v;14; 237;143;5;20;465;36 FALSE; w;6;243;136;3;22;480;38 FALSE; x;28; 246;150;9;22;495;34 FALSE; y;22; 247;142;8;18;510;39 FALSE; z;0;232;133;3;21;525;34 $c is the returnValue of colorallocate function, $char is the current character, $r,$b,$g -> red,green,blue, $a -> angle, $s -> font size, $l,$t -> font left and top. As you see, the returnValue of the colorallocate function behaves very strange. Previous Comments: [2008-11-02 23:12:50] laszlo dot janszky at gmail dot com Nah I wrote wrong code in my previous comment, here is the right one: $c=imagecolorallocate($image,$r,$b,$g); if (!$c) { echo($r.','.$b.','.$g.''); } imagettftext($image,$s,$a,$l,$t,$c,'xfont.ttf',$char); [2008-11-02 23:09:02] laszlo dot janszky at gmail dot com http://hu.php.net/imagecolorallocate I had read the documentation before I sent the report. I wrote an if in my code like this: $c=imagecolorallocate($image,$r,$b,$g); imagettftext($image,$s,$a,$l,$t,$c,'xfont.ttf',$char); $c was false, but the $r,$b,$g parameters were valid, and they weren's the same as the background. I checked it with another ttf file, but nothing changed. I'll check it tomorrow without rand manually, but I'm afraid it's caused by that function. [2008-11-02 22:23:42] [EMAIL PROTECTED] what about checking the colors you get? Like the random values may be duplicated or ends using the bg color. There is no bug in either the ttf or the color function. Try to predefine the colors to verify it. [2008-11-02 21:59:54] laszlo dot janszky at gmail dot com Description: I'm calling imagecolorallocate and imagettftext functions with random parameters in a loop, but after some call the imagecolorallocate function returns FALSE. I checked the random parameters, but nothing strange about them. I think the bug is associated with the rand function, because the more I call the rand function, the earlier the bug comes in loop. If I delete the rand from the 5 times I call, and replace it with constant number, the bug comes later in cycle. With this settings it's about character 'w', but not on a constant place, somtimes 'x' or 'y'. Reproduce code: --- $text=str_split('0123456789abcdefghijklmnopqrstvwxyz',1); $image=imagecreate(600,50); $bgcolor=imagecolorallocate($imag
#46462 [Opn->Fbk]: The PHP installer isn't adding the Addypte to httpd.conf
ID: 46462 Updated by: [EMAIL PROTECTED] Reported By: admin at kobashicomputing dot com -Status: Open +Status: Feedback Bug Type: Windows Installer Operating System: Windows XP SP 3 PHP Version: 5.2.6 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: [2008-11-02 03:28:04] admin at kobashicomputing dot com Description: PHP pages are not loading on Windows installations. This is because the PHP installer is failing to add the following: The installer puts this in at the end of the httpd.conf file: #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir "C:/PHP/" LoadModule php5_module "C:/PHP/php5apache2_2.dll" #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL But fails to add this: AddType application/x-httpd-php .php - Kerry Kobashi -- Edit this bug report at http://bugs.php.net/?id=46462&edit=1
#46456 [Opn->Fbk]: zip_entry_name() mangling national characters
ID: 46456 Updated by: [EMAIL PROTECTED] Reported By: mkurpel at gmail dot com -Status: Open +Status: Feedback Bug Type: Zip Related Operating System: FreeBSD 6.2-RELEASE-p8 PHP Version: 5.2.6 New Comment: Ditch those mb_* calls and remove that setlocale() call too. Then replace utf8_encode() with utf8_decode().. Previous Comments: [2008-11-01 19:01:04] mkurpel at gmail dot com No, it does not, it outputs some garbled characters :( [2008-11-01 18:16:38] [EMAIL PROTECTED] First of all, don't use utf8_encode... does it work then? [2008-11-01 17:33:51] mkurpel at gmail dot com The characters in Actual results got converted into html entities in this bug tracking system. The script has output actual characters, not entities. [2008-11-01 17:31:52] mkurpel at gmail dot com Description: I am reading a ZIP file containing one XLS file named "µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls". However, I am getting mangled characters from the zip_entry_name() function. I am working in UTF-8 so I utf_8_encoded it prior to echoing. All my php files are saved in utf-8 too. Non-national characters are returned just fine. Reproduce code: --- header('Content-Type: text/html; charset: utf-8'); setlocale(LC_ALL, 'sk_SK.utf8'); mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); $zip = zip_open(realpath($somezipfile)); while ($zip_entry = @zip_read($zip)) { echo $path = utf8_encode(zip_entry_name($zip_entry)); } @zip_close($zip); Expected result: should echo this string: µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls Actual result: -- echoed this string: –矜§ì ¡‚£“å„¢ØÔý’”‰ •欛¦íµÖéâÕŽà·Òü‘™Óš.xls -- Edit this bug report at http://bugs.php.net/?id=46456&edit=1
#46444 [Opn->Fbk]: invalid session.save_path crashes -
ID: 46444 Updated by: [EMAIL PROTECTED] -Summary: invalid session.save_path should not cause a segfault - still does Reported By: hostmaster at uuism dot net -Status: Open +Status: Feedback Bug Type: Session related Operating System: Fedora Core 4 PHP Version: 5.2CVS-2008-10-31 New Comment: Try this configure line (exactly this): # ./configure --disable-all --disable-cgi --enable-session # make clean && make test Previous Comments: [2008-11-02 00:55:56] hostmaster at uuism dot net Modules: mbstring.so; mysql.so; mysqli.so; soap.so; and xmlrpc.so I reran the test without any modules and the results were the same. Configuration string: --build=i386-redhat-linux --host=i386-redhat-linux --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-regex=/usr/local --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-pear=/usr/share/pear --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr/local --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-fastcgi --with-pcre-dir=/usr/local --enable-xmlreader=shared --with-mcrypt --with-mhash --with-config-file-path=/etc/php-5.2.6 --with-config-file-scan-dir=/etc/php-5.2.6/php.d Should it make any difference that I used --disable-debug? I went back and ran configure again with --enable-debug and all the same other parameters. This time the test PASSED. I don't understand. Jim Jim [2008-11-01 23:21:35] [EMAIL PROTECTED] And what was the configure line you used to compile PHP? [2008-11-01 23:20:54] [EMAIL PROTECTED] Are you loading any shared extensions? [2008-11-01 22:49:16] hostmaster at uuism dot net I ran the test again with the php.ini-recommended and only the extension_dir changed. Same results. Jim [2008-11-01 22:37:17] hostmaster at uuism dot net I ran the test again with php.ini-dist (only changed extension_dir) and got the same results: [snip] Core was generated by `sapi/cli/php -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_func'. Program terminated with signal 11, Segmentation fault. #0 php_session_start () at /usr/local/src/php5.2-200810312330/ext/session/session.c:621 621 if (PG(register_long_arrays)) { (gdb) bt #0 php_session_start () at /usr/local/src/php5.2-200810312330/ext/session/session.c:621 #1 0x08190520 in zif_session_start (ht=0, return_value=0xb7ca107c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /usr/local/src/php5.2-200810312330/ext/session/session.c:1824 #2 0x082b8f5a in zend_do_fcall_common_helper_SPEC (execute_data=0xbf9b735c) at /usr/local/src/php5.2-200810312330/Zend/zend_vm_execute.h:200 #3 0x082a894f in execute (op_array=0xb7ca1544) at /usr/local/src/php5.2-200810312330/Zend/zend_vm_execute.h:92 #4 0x08287eb0 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php5.2-200810312330/Zend/zend.c:1134 #5 0x08240d23 in php_execute_script (primary_file=0xbf9b9758) at /usr/local/src/php5.2-200810312330/main/main.c:2011 #6 0x0831013b in main (argc=59, argv=0xbf9b9874) at /usr/local/src/php5.2-200810312330/sapi/cli/php_cli.c:1134 (gdb) quit [EMAIL PROTECTED] php5.2-200810312330]# diff php.ini-dist /etc/php-5.2.6/php.ini | more 486c486 < extension_dir = "./" --- > extension_dir = "/usr/local/src/php5.2-200810312330/
#46466 [Bgs->Fbk]: Imagecolorallocate,imagettftext,rand combined bug
ID: 46466 Updated by: [EMAIL PROTECTED] Reported By: laszlo dot janszky at gmail dot com -Status: Bogus +Status: Feedback Bug Type: GD related Operating System: windows xp PHP Version: 5.2.6 -Assigned To: +Assigned To: pajoye New Comment: Please provide a small script to reproduce it. Do not use anything but the image function and the PHP core functions (no rand, db, input data, etc.). And keep in mind that palette images can have maximum 256 colors (255 + bgd). Previous Comments: [2008-11-03 08:34:32] laszlo dot janszky at gmail dot com Now I checked it manually, i saved all the settings in a table, and loaded it. It's generating the bug without rand() too. Here is the table: $c $char $r$b $g $a$s $l $t 1; 0;0;237;150;6;20;15; 31 9; 1;5;250;142;3;20;30; 33 17;2;23; 237;130;9;19;45; 33 25;3;21; 255;147;10; 18;60; 37 33;4;28; 240;150;8;19;75; 30 41;5;10; 243;124;5;21;90; 36 49;6;8;240;149;7;18;105;35 57;7;18; 247;128;1;21;120;30 65;8;2;249;142;5;22;135;36 72;9;17; 225;138;3;22;150;34 80;a;5;230;131;6;19;165;35 88;b;22; 240;145;4;18;180;39 96;c;24; 226;132;9;20;195;30 104; d;3;249;129;10; 21;210;40 112; e;22; 230;146;8;18;225;34 120; f;9;255;144;1;20;240;36 127; g;8;255;129;3;18;255;36 135; h;8;246;136;6;19;270;34 143; i;6;233;142;7;20;285;37 151; j;18; 225;131;5;20;300;33 159; k;24; 236;140;10; 19;315;36 167; l;7;240;137;6;22;330;30 175; m;25; 229;124;4;18;345;35 183; n;25; 233;146;9;18;360;35 211; o;17; 254;142;0;18;375;32 218; p;10; 254;138;1;21;390;32 224; q;25; 243;132;2;22;405;30 232; r;8;242;135;4;20;420;32 239; s;26; 239;143;10; 22;435;37 245; t;22; 248;147;4;18;450;30 252; v;14; 237;143;5;20;465;36 FALSE; w;6;243;136;3;22;480;38 FALSE; x;28; 246;150;9;22;495;34 FALSE; y;22; 247;142;8;18;510;39 FALSE; z;0;232;133;3;21;525;34 $c is the returnValue of colorallocate function, $char is the current character, $r,$b,$g -> red,green,blue, $a -> angle, $s -> font size, $l,$t -> font left and top. As you see, the returnValue of the colorallocate function behaves very strange. [2008-11-02 23:12:50] laszlo dot janszky at gmail dot com Nah I wrote wrong code in my previous comment, here is the right one: $c=imagecolorallocate($image,$r,$b,$g); if (!$c) { echo($r.','.$b.','.$g.''); } imagettftext($image,$s,$a,$l,$t,$c,'xfont.ttf',$char); [2008-11-02 23:09:02] laszlo dot janszky at gmail dot com http://hu.php.net/imagecolorallocate I had read the documentation before I sent the report. I wrote an if in my code like this: $c=imagecolorallocate($image,$r,$b,$g); imagettftext($image,$s,$a,$l,$t,$c,'xfont.ttf',$char); $c was false, but the $r,$b,$g parameters were valid, and they weren's the same as the background. I checked it with another ttf file, but nothing changed. I'll check it tomorrow without rand manually, but I'm afraid it's caused by that function. [2008-11-02 22:23:42] [EMAIL PROTECTED] what about checking the colors you get? Like the random values may be duplicated or ends using the bg color. There is no bug in either the ttf or the color function. Try to predefine the colors to verify it. [2008-11-02 21:59:54] laszlo dot janszky at gmail dot com Description: I'm calling imagecolorallocate and imagettftext functions with random parameters in a loop, but after some call the imagecolorallocate function returns FALSE. I checked the random parameters, but nothing strange about them. I think the bug is associated with the rand function, because the more I call the rand function, the earlier the bug comes
#43073 [Opn->Asn]: TrueType bounding box is wrong for angle<>0
ID: 43073 Updated by: [EMAIL PROTECTED] Reported By: lbayuk at pobox dot com -Status: Open +Status: Assigned Bug Type: GD related Operating System: Linux -PHP Version: 5.2.6 +PHP Version: 5.2CVS-2008-11-02 Assigned To: pajoye Previous Comments: [2008-11-02 22:16:31] lbayuk at pobox dot com I tried php5.2-200811022130 (PHP 5.2.7RC3-dev). The problem is still there, and the image is identical to PHP-5.2.6. (I was using 5.2.4 when I originally submitted this report, so I changed the version in the report to 5.2.6). [2008-11-02 13:07:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2007-10-23 00:18:33] lbayuk at pobox dot com Description: The bounding box returned from imagettfbbox() and imagettftext() is incorrect for anything except horizontal text at 0 degrees. For all other angles, the text is partially or completely outside the returned bounding box. (Yes, somebody reported the same problem in #37730, but that was marked "no feedback" and is not getting any attention. Could someone please-please look at this issue?) The PHP script below demonstrates. Using the bundled GD library, and any TrueType font. Change $font to point to any TrueType font file you have. Run via PHP CLI, sending out to filename.png and view, or access via browser. I wrote an equivalent C program with gd-2.0.35 (Slackware 12.0 Linux distribution), and the bounding boxes are correct. So there is probably something wrong in the GD library bundled with PHP. Reproduce code: --- http://bugs.php.net/?id=43073&edit=1
#46468 [Opn->Fbk]: System Crash when running test script ext/openssl/tests/004.php
ID: 46468 Updated by: [EMAIL PROTECTED] Reported By: hostmaster at uuism dot net -Status: Open +Status: Feedback Bug Type: OpenSSL related Operating System: Fedora Core 4 PHP Version: 5.2CVS-2008-11-03 (snap) -Assigned To: +Assigned To: pajoye New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: [2008-11-03 03:04:26] hostmaster at uuism dot net That last sentence should be: When I run test script ext/openssl/tests/004.phpt NOW, it passes. Jim [2008-11-03 03:03:31] hostmaster at uuism dot net I installed OpenSSL 0.9.8i 15 Sep 2008 and compiled PHP again, keeping everything else the same, except that I ran configure with --disable-debug. When I run test script ext/openssl/tests/004.phpt not, it passes. Jim [2008-11-03 01:21:21] hostmaster at uuism dot net My php.ini file is exactly the same as php.ini-recommended [2008-11-03 01:19:39] hostmaster at uuism dot net Description: When I run test script ext/openssl/tests/004.php, I get a Core Dump when it executes this part of the code: //this leaks $a = array(1,2); $b = array(1,2); var_dump(openssl_csr_new($a, $b)); Here is a back-trace from gdb: #0 0x004c48a5 in memcpy () from /lib/libc.so.6 #1 0x083ebdcd in ASN1_STRING_set () #2 0x0057dff4 in ?? () from /lib/libc.so.6 #3 0x0057f880 in ?? () from /lib/libc.so.6 #4 0x in ?? () I ran configure with this string: ./configure --build=i386-redhat-linux --host=i386-redhat-linux --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-regex=/usr/local --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-pear=/usr/share/pear --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr/local --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-fastcgi --with-pcre-dir=/usr/local --enable-xmlreader=shared --with-mcrypt --with-mhash --with-config-file-path=/etc/php-testing --with-config-file-scan-dir=/etc/php-testing/php.d Here is how I ran the test: # TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php ext/openssl/tests/004.phpt = PHP : sapi/cli/php PHP_SAPI: cli PHP_VERSION : 5.2.7RC3-dev ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov 8 14:19:44 EST 2007 i686 INI actual : /etc/php-testing/php.ini More .INIs : /etc/php-testing/php.d/mbstring.ini,/etc/php-testing/php.d/mysql.ini,/etc/php-testing/php.d/mysqli.ini,/etc/php-testing/php.d/soap.ini,/etc/php-testing/php.d/xmlrpc.ini CWD : /usr/local/src/php5.2-200811022130 Extra dirs : VALGRIND: Not used = Running selected tests. FAIL openssl_csr_new() tests [ext/openssl/tests/004.phpt] ===
#40158 [Csd->Asn]: Artifact left on transparent pngs using image filters
ID: 40158 Updated by: [EMAIL PROTECTED] Reported By: henus at mail dot ru -Status: Closed +Status: Assigned Bug Type: GD related Operating System: Windows XP PHP Version: 5.2.0 Assigned To: pajoye New Comment: not fixed, imagefill was opened in another bug report. Previous Comments: [2007-01-19 16:08:00] [EMAIL PROTECTED] For the record, the imagefill bug is fixed in cvs, it will be in 5.2.1 . [2007-01-19 12:14:57] [EMAIL PROTECTED] Ok, good, thanks for the test. I will disable alpha blending and restore it on exit in imagefilter. About the imagefill bug, it happens only with small images (< 4 pixels large), thanks for the notice. [2007-01-19 12:11:56] henus at mail dot ru Yes, it work [2007-01-19 12:02:41] [EMAIL PROTECTED] Can you *PLEASE* confirm that it works when you disable alpha blending? Answer should be Yes or No, I got the details already. I really do not have the time to explain/ask again and again the same thing. About imagefill, yes, that's a bug. Please open a new one if you like. I will fix it as soon as possible. [2007-01-19 11:53:03] henus at mail dot ru Yes, the is global problem with alphablending in libgd\gd.c but about "imagealphablending($mask, false); //<<< Important!": i absolutely should not care about ebabling\disabling imagealphablending before imagefilter, because of function shoud colorize image by new values of red,gree,blue (!!!there is no alpha in parameters) if IMG_FILTER_COLORIZE will have in parameters alpha, if alphablending enable, value of alpha should allow for calculation of new color values (in gdImageColor it will before new_pxl = gdImageColorAllocateAlpha(src, (int)r, (int)g, (int)b, a);) and gdImageSetPixel shoul with disabled alphablending. otherwise function work like merging of two images with alphablending. where: first image - source image from function parameters. second image - correct colorized copy of source image. it is not logically. it is incorrect. another bug in imagefill: this function not only fill image, it is also disable alphablending. php example: before 1 - "; print_r($c01); print"after 1 - "; print_r($c1); print"before 2 - "; print_r($c02); print"after 2 - "; print_r($c2); ?> results: before 1- Array ( [red] => 255 [green] => 0 [blue] => 0 [alpha] => 63 ) after 1 - Array ( [red] => 0 [green] => 255 [blue] => 0 [alpha] => 63 ) before 2- Array ( [red] => 0 [green] => 255 [blue] => 0 [alpha] => 63 ) after 2 - Array ( [red] => 126 [green] => 128 [blue] => 0 [alpha] => 31 ) where: after 1 - correct result of IMG_FILTER_COLORIZE, because of imagefill disable alphablending after 2 - incorrect result of IMG_FILTER_COLORIZE, because of after imagefill i manually enable alphablending disabling alphablending in code it is good solutions for gdImageColor, but after it is necessary to restore old value of alphaBlendingFlag. 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/40158 -- Edit this bug report at http://bugs.php.net/?id=40158&edit=1
#46465 [Opn->Fbk]: libxml expects DTD declaration while validating XML against RelaxNG or XSD
ID: 46465 Updated by: [EMAIL PROTECTED] Reported By: faw217 at gmail dot com -Status: Open +Status: Feedback Bug Type: XML related Operating System: GNU/Linux PHP Version: 5.3.0alpha2 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a short but complete example script to be able to reproduce this bug ourselves. A proper reproducing script starts with , is max. 10-20 lines long and does not require any external resources such as databases, etc. If the script requires a database to demonstrate the issue, please make sure it creates all necessary tables, stored procedures etc. Please avoid embedding huge scripts into the report. Previous Comments: [2008-11-02 17:55:16] faw217 at gmail dot com Description: I experienced it using XMLReader, I don't know if it affects other tools too: Even if I set XMLReader to validate XML document against RelaxNG or XSD schema, then libxml_get_errors() will obtain an error: Validation failed: no DTD found! Reproduce code: --- libxml_use_internal_errors(true); $XMLReader = new XMLReader; $XMLReader->open('./path/to/file.xml'); $XMLReader->setRelaxNGSchema('./path/to/schema'); $XMLReader->setParserProperty(XMLReader::VALIDATE, true); do { $element = @XMLReader->read(); } while ($element); var_dump(libxml_get_errors()); Expected result: array(0) { } Actual result: -- array(1) { [0]=> object(LibXMLError)#2 (6) { ["level"]=> int(X) ["code"]=> int(X) ["column"]=> int(X) ["message"]=> string(33) "Validation failed: no DTD found !" ["file"]=> string(X) "./path/to/file.xml" ["line"]=> int(X) } } -- Edit this bug report at http://bugs.php.net/?id=46465&edit=1
#41489 [Fbk->Opn]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 User updated by: n dot escuder at intra-links dot com Reported By: n dot escuder at intra-links dot com -Status: Feedback +Status: Open Bug Type: Streams related Operating System: Linux 2.6 -PHP Version: 5.2.5 +PHP Version: 5.2-cvs Assigned To: iliaa New Comment: Ok now it's good we got ACCEPT can i not what the problem was ? Previous Comments: [2008-11-02 12:44:38] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-02-14 12:59:50] n dot escuder at intra-links dot com After searching in the change since PHP 5.2.1 I found the change who break this. The change is in the IMAP extension : diff -Naur php-5.2.5/ext/imap/config.m4 php-5.2.5-atl/ext/imap/config.m4 --- php-5.2.5/ext/imap/config.m42007-02-11 10:25:32.0 +0100 +++ php-5.2.5-atl/ext/imap/config.m42007-01-23 13:37:21.0 +0100 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.69.4.7 2007/02/11 09:25:32 tony2001 Exp $ +dnl $Id: config.m4,v 1.69.4.6 2007/01/23 12:37:21 bjori Exp $ dnl AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then @@ -137,7 +137,7 @@ if test "$ac_cv_utf8_mime2text" = "new"; then AC_DEFINE(HAVE_NEW_MIME2TEXT, 1, [Whether utf8_mime2text() has new signature]) fi -CFLAGS=$old_CFLAGS +CFLAGS=$old_CPPFLAGS old_CFLAGS=$CFLAGS CFLAGS="-I$IMAP_INC_DIR" @@ -152,7 +152,7 @@ ac_cv_u8t_canonical=no ]) ) -CFLAGS=$old_CFLAGS +CFLAGS=$old_CPPFLAGS if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.]) I don't understand why this change break select on ssl but i think it break something in configure. If i revert this change on php-5.2.5 code tree and i do an autoreconf command and compile the code, all works fine. [2008-02-08 17:33:39] jjohnson at insidesales dot com I'm using 5.2.5 and having similar issues with stream_select and a tcp stream_socket_server. I'm using NULL for the timeout, so that the function call shouldn't return until a stream is available. $sock = stream_socket_server("tcp://".$address.":".$port, $errno, $errstr); $ready = stream_select($reads, $writes, $e = NULL, NULL); stream_select is returning when there is a stream available, but the return value is 0 (I've verified that $ready == 0 and $ready !== false). [2007-11-20 09:44:37] n dot escuder at intra-links dot com The same appear in 5.2.5. It's seem to be a memory corruption problem. The retval value change in PHP_FUNCTION(stream_select) just after executing the line : if (r_array != NULL) stream_array_from_fd_set(r_array, &rfds TSRMLS_CC); Please tell me how can i help you to solve this problem. I can't upgrade from PHP 5.2.1. See You [2007-07-13 21:29:56] n dot escuder at intra-links dot com I try without any certificat and the same problem appear. I try launch server.php with php-5.2-dev and client with php-5.2.1 and the same problem appear. So i decide to lookup into the code. A strange result append i try to explain : code in ext/standard/streamsfuncs.c : retval = php_select(max_fd+1, &rfds, &wfds, &efds, tv_p); printf("%d %d\n", max_fd, retval ); if (retval == -1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to select [%d]: %s (max_fd=%d)", errno, strerror(errno), max_fd); RETURN_FALSE; } printf("%d\n", retval ); if (r_array != NULL) stream_array_from_fd_set(r_array, &rfds TSRMLS_CC); if (w_array != NULL) stream_array_from_fd_set(w_array, &wfds TSRMLS_CC); if (e_array != NULL) stream_array_from_fd_set(e_array, &efds TSRMLS_CC); printf("%d\n", retval ); RETURN_LONG(retval); As you can see i had three printf for debug :o) I add an var_dump to the result of stream_select in server.php The strange result i have after i launch client.php is : 3 1 -> First printf with max_fd and retval 1 -> Second printf with retval 0 -> Third printf with retval but the value as changed int(0) -> The var_dump in server.php So the value change between the second and third printf ;o) I hope this help 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/41489 -- Edit
#41489 [Opn->Csd]: stream_select does not work on ssl stream_socket_server (works in 5.2.1!) on 64b
ID: 41489 Updated by: [EMAIL PROTECTED] Reported By: n dot escuder at intra-links dot com -Status: Open +Status: Closed Bug Type: Streams related Operating System: Linux 2.6 PHP Version: 5.2-cvs Assigned To: iliaa New Comment: Seems like the patch you provided had been applied (or same change, without any links to this report though). Previous Comments: [2008-11-03 13:28:48] n dot escuder at intra-links dot com Ok now it's good we got ACCEPT can i not what the problem was ? [2008-11-02 12:44:38] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-02-14 12:59:50] n dot escuder at intra-links dot com After searching in the change since PHP 5.2.1 I found the change who break this. The change is in the IMAP extension : diff -Naur php-5.2.5/ext/imap/config.m4 php-5.2.5-atl/ext/imap/config.m4 --- php-5.2.5/ext/imap/config.m42007-02-11 10:25:32.0 +0100 +++ php-5.2.5-atl/ext/imap/config.m42007-01-23 13:37:21.0 +0100 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.69.4.7 2007/02/11 09:25:32 tony2001 Exp $ +dnl $Id: config.m4,v 1.69.4.6 2007/01/23 12:37:21 bjori Exp $ dnl AC_DEFUN([IMAP_INC_CHK],[if test -r "$i$1/c-client.h"; then @@ -137,7 +137,7 @@ if test "$ac_cv_utf8_mime2text" = "new"; then AC_DEFINE(HAVE_NEW_MIME2TEXT, 1, [Whether utf8_mime2text() has new signature]) fi -CFLAGS=$old_CFLAGS +CFLAGS=$old_CPPFLAGS old_CFLAGS=$CFLAGS CFLAGS="-I$IMAP_INC_DIR" @@ -152,7 +152,7 @@ ac_cv_u8t_canonical=no ]) ) -CFLAGS=$old_CFLAGS +CFLAGS=$old_CPPFLAGS if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.]) I don't understand why this change break select on ssl but i think it break something in configure. If i revert this change on php-5.2.5 code tree and i do an autoreconf command and compile the code, all works fine. [2008-02-08 17:33:39] jjohnson at insidesales dot com I'm using 5.2.5 and having similar issues with stream_select and a tcp stream_socket_server. I'm using NULL for the timeout, so that the function call shouldn't return until a stream is available. $sock = stream_socket_server("tcp://".$address.":".$port, $errno, $errstr); $ready = stream_select($reads, $writes, $e = NULL, NULL); stream_select is returning when there is a stream available, but the return value is 0 (I've verified that $ready == 0 and $ready !== false). [2007-11-20 09:44:37] n dot escuder at intra-links dot com The same appear in 5.2.5. It's seem to be a memory corruption problem. The retval value change in PHP_FUNCTION(stream_select) just after executing the line : if (r_array != NULL) stream_array_from_fd_set(r_array, &rfds TSRMLS_CC); Please tell me how can i help you to solve this problem. I can't upgrade from PHP 5.2.1. See You 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/41489 -- Edit this bug report at http://bugs.php.net/?id=41489&edit=1
#42855 [Opn->Csd]: [PATCH] dns_get_record() doesn't return all text from TXT record
ID: 42855 Updated by: [EMAIL PROTECTED] Reported By: misc at e2007 dot cynergi dot com -Status: Open +Status: Closed Bug Type: Network related Operating System: * PHP Version: 5.2.6 New Comment: 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. Previous Comments: [2008-03-02 12:08:52] a dot u dot savchuk at gmail dot com i reproduce this and create a patch for problem solving. it works for me: $ ./sapi/cli/php -r '$x = dns_get_record("bravo._domainkey.yahoogroups.co.uk", DNS_TXT); var_dump($x);' array(1) { [0]=> array(5) { ["host"]=> string(34) "bravo._domainkey.yahoogroups.co.uk" ["type"]=> string(3) "TXT" ["txt"]=> string(179) "k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZUKJQrqcmVSvG7oT3r7Fwo6aCHMMuL+IZdEpbb9ZU8xomQIDAP//" ["class"]=> string(2) "IN" ["ttl"]=> int(21130) } } Here is code: $ cat /home/sawoy/dns.c.patch --- ../source/php-5.2.5/ext/standard/dns.c 2007-06-26 04:04:55.0 -0700 +++ ./ext/standard/dns.c2008-03-02 03:56:21.0 -0800 @@ -474,12 +474,17 @@ static u_char *php_parserr(u_char *cp, q break; case DNS_T_TXT: add_assoc_string(*subarray, "type", "TXT", 1); - n = cp[0]; - tp = emalloc(n + 1); - memcpy(tp, cp + 1, n); - tp[n] = '\0'; + tp = emalloc(dlen + 1); + int ll = 0; + while ( ll < dlen) + { + n = cp[ll]; + memcpy(tp + ll , cp + ll + 1, n); + ll = ll + n + 1; + } + tp[dlen] = '\0'; cp += dlen; - add_assoc_stringl(*subarray, "txt", tp, n, 0); + add_assoc_stringl(*subarray, "txt", tp, dlen, 0); break; case DNS_T_SOA: add_assoc_string(*subarray, "type", "SOA", 1); [2007-10-04 13:24:20] misc at e2007 dot cynergi dot com I'm tired... 3rd paragraph in the "description" should have read: "The following code examples where compiled when under Windows the command ... returned:", and the "expected result" string length should be greater than 127, of course. [2007-10-04 13:12:33] misc at e2007 dot cynergi dot com Description: dns_get_record() doesn't return all text from TXT record. RFC 1035 states that TXT record values can't have "compression", but can have multiple strings for the same DNS record. Although uncommon, such long TXT strings actualy exist to make publicly available public key data for DomainKeys e-mail protocols (used by Yahoo! and Gmail). The following code examples where compiled when under Windows, the command "nslookup -type=TXT bravo._domainkey.yahoogroups.co.uk" returned: (...) Non-authoritative answer: bravo._domainkey.yahoogroups.co.uk text = "k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZU" "KJQrqcmVSvG7oT3r7Fwo6aCHMMuL+IZdEpbb9ZU8xomQIDAP//" Reproduce code: --- $x = dns_get_record("bravo._domainkey.yahoogroups.co.uk", DNS_TXT); var_dump($x); Expected result: array(1) { [0]=> array(5) { ["host"]=> string(34) "bravo._domainkey.yahoogroups.co.uk" ["type"]=> string(3) "TXT" ["txt"]=> string(127) "k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZUKJQrqcmVSvG7oT3r7Fwo6aCHMMuL+IZdEpbb9ZU8xomQIDAP//" ["class"]=> string(2) "IN" ["ttl"]=> int(17428) } } Actual result: -- array(1) { [0]=> array(5) { ["host"]=> string(34) "bravo._domainkey.yahoogroups.co.uk" ["type"]=> string(3) "TXT" ["txt"]=> string(127) "k=rsa; p=MHwwDQYJKoZIhvcNAQEBBQADawAwaAJhAKt1OprXeH+okFnh8XxMeVV9iYAbhIOMq3ODHpcBm7JSl3Orusqv53BIn55a0JaP1iqbIWu5j3TVIpqbG7MHZU" ["class"]=> string(2) "IN" ["ttl"]=> int(17428) } } -- Edit this bug report at http://bugs.php.net/?id=42855&edit=1
#46414 [Com]: firebird with php 5.26
ID: 46414 Comment by: mapopa at gmail dot com Reported By: mario_s1985 at o2 dot pl Status: Open Bug Type: InterBase related Operating System: CentOS PHP Version: 5.2.6 New Comment: ./configure --with-interbase=/opt/interbase Here is one related building guide http://tech.groups.yahoo.com/group/firebird-php/message/2703 Previous Comments: [2008-11-03 10:44:22] mapopa at gmail dot com you don't need to specify =shared the firebird module is builded by default as shared module [2008-10-29 09:31:06] mario_s1985 at o2 dot pl Description: ./configure --with-interbase=shared,/opt/interbase Reproduce code: --- http://www.maildir.net/2008/10/02/installing-firebird-interbase-support-on-php-as-shared-module/#comment-4002 Expected result: create interbase.so -- Edit this bug report at http://bugs.php.net/?id=46414&edit=1
#46471 [NEW]: Performance problem when reading XML columns
From: rgpublic at gmx dot net Operating system: Linux PHP version: 5.2.6 PHP Bug Type: OCI8 related Bug description: Performance problem when reading XML columns Description: Reading an XML column seems to be unnecessarily slow. -- Edit bug report at http://bugs.php.net/?id=46471&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46471&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46471&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46471&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46471&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46471&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46471&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46471&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46471&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46471&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46471&r=support Expected behavior: http://bugs.php.net/fix.php?id=46471&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46471&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46471&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46471&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46471&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46471&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46471&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46471&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46471&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46471&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46471&r=mysqlcfg
#46471 [Com]: Performance problem when reading XML columns
ID: 46471 Comment by: rgpublic at gmx dot net Reported By: rgpublic at gmx dot net Status: Open Bug Type: OCI8 related Operating System: Linux PHP Version: 5.2.6 New Comment: Example source code: http://oberon.q-one-hosting.com/ocidemo.txt This script does the following: Create a table with an XML column and fills it with data. Now, the simple approach to read back the data would be: SELECT mytab.xml.getClobVal() AS xml FROM xmltest mytab; This approach takes about twice the time as the second example which does the reading inside a PL/SQL function and concatenates the result separated by a chr(0)-character i.e. transferring the whole data in a single string. I'm wondering why there is such a loss of performance. Previous Comments: [2008-11-03 14:20:36] rgpublic at gmx dot net Description: Reading an XML column seems to be unnecessarily slow. -- Edit this bug report at http://bugs.php.net/?id=46471&edit=1
#44327 [Opn->Asn]: PDORow::queryString property & numeric offsets / Crash
ID: 44327 Updated by: [EMAIL PROTECTED] Reported By: uwendel at mysql dot com -Status: Open +Status: Assigned Bug Type: PDO related Operating System: Linux PHP Version: 5.3CVS-2008-03-04 (snap) -Assigned To: +Assigned To: felipe Previous Comments: [2008-07-04 17:12:10] [EMAIL PROTECTED] Part one of my report is bogus and the crash seems to be gone. Can anybody verify and close it? [2008-04-14 09:06:06] uwendel at mysql dot com Adding "Crash" to Summary. [2008-04-14 09:03:12] uwendel at mysql dot com Crash with CVS snapshot [EMAIL PROTECTED]:~/php53_libmysql> sapi/cli/php -v PHP 5.3.0-dev (cli) (built: Apr 11 2008 12:02:49) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [EMAIL PROTECTED]:~/php53_libmysql> sapi/cli/php -r '$db = new PDO("sqlite:/tmp/foo"); $stmt = $db->query("SELECT 1"); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row->{0}); var_dump($row->queryString); get_class($row);' string(1) "1" string(1) "1" Speicherzugriffsfehler [2008-03-04 17:21:29] uwendel at mysql dot com Description: What kind of thing is the PDORow::queryString property? PDORow objects are generated and returned by PDOStatement::fetch(PDO::FETCH_LAZY). PDORow objects seem a bit special in some ways. 1) "PDO::FETCH_LAZY = PDO::FETCH_OBJ + PDO::FETCH_BOTH" PDO::FETCH_BOTH means that the returned data is both indexed by the column name and a column offset number. For example, a query like SELECT id FROM test should return an object (resp. array) with the properties {0} and id. You can access both properties and you get what you want. But var_dump() will report only the column name based property and not the property based on the numeric column offset. I have no idea if this is a var_dump() or a PDO flaw. 2) The magic queryString property var_dump() reports a queryString property for PDORow objects returned by PDOStatement::fetch(). In all my testing I found the queryString propery value to be the query string which has constructed the corresponding PDOStatement object. However, I cannot access this property. I see it, but I have no access. That makes it a bit "magic". Also, note how var_dump(), var_export() and debug_zval_dump report different things. Johannes already explained to me that the functions might do different things, but anyway it looks confusing to me. Reproduce code: --- 1, FETCH_LAZY and numeric offset -- sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->{0}); var_dump($row->one); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> string(1) "1" string(1) "1" 2, magic PDORow::queryString() - sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> UNKNOWN:0 sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $db->exec("DROP TABLE test"); $db->exec("CREATE TABLE test (id INT)"); $db->exec("INSERT INTO test(id) VALUES (1)"); $stmt = $db->prepare("SELECT id FROM test"); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); var_export($row->queryString); print "\n"; debug_zval_dump($row->queryString);' --> UNKNOWN:0 NULL UNKNOWN:0 -- Edit this bug report at http://bugs.php.net/?id=44327&edit=1
#46473 [NEW]: php segfaults on some queries using pdo_odbc & ibm-db2 on a 64bits platform
From: philippe dot marasse at ac-poitiers dot fr Operating system: Linux Red Hat EL5 x86_64 PHP version: 5.2.6 PHP Bug Type: PDO related Bug description: php segfaults on some queries using pdo_odbc & ibm-db2 on a 64bits platform Description: On our both platforms (32 & 64 bits), we have php compiled with support for IBM DB2 database via pdo_odbc extension. We ran into unexpected segfaults deploying a new application on a 64 bits server. We have tested several client version of DB2 but nothing helped. At last, it seemed that pdo_odbc extensions did not compile properly, as we got several warnings like : passing argument 2 of 'SQLRowCount' from incompatible pointer type Bug #32830 (related to odbc, not pdo_odbc) points out the same issue. We wrote a little patch that works for us (tm), available at : http://huan.ac-poitiers.fr/pdo_odbc_db2-x86_64.patch Rgds. Reproduce code: --- query($req); $truc = $machin->fetchObject(); ?> Expected result: nothing indeed :-), it's just a script we used to isolate a query which crashes only on our 64bits servers (of course, it works fine on 32bits platform). Actual result: -- segfault... unless the value of ETA_DENOMINATION is not NULL. -- Edit bug report at http://bugs.php.net/?id=46473&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46473&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46473&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46473&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46473&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46473&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46473&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46473&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46473&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46473&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46473&r=support Expected behavior: http://bugs.php.net/fix.php?id=46473&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46473&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46473&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46473&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46473&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46473&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46473&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46473&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46473&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46473&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46473&r=mysqlcfg
#46105 [Asn->WFx]: mysql_fetch_object calls constructor on object after setting up properties
ID: 46105 Updated by: [EMAIL PROTECTED] Reported By: ninzya at inbox dot lv -Status: Assigned +Status: Wont fix Bug Type: MySQL related Operating System: Windows XP PHP Version: 5.3.0alpha2 Assigned To: mysql New Comment: Yes, the behavior can be considered wrong, unfortunately we can't change it as code might rely on that order, like doing work with the data in the constructor ... Previous Comments: [2008-09-17 12:35:52] ninzya at inbox dot lv Description: when using custom object return through mysql_fetch_object, function allocates specified in second parameter object, sets up all properties and then calls constructor. I think this is wrong. Newly instantiated object's constructor must be called before any other operation on the object is performed. Reproduce code: --- /** * Object class * */ class Object { /** * Array of properties * * @var array */ protected $_props =array(); /** * Construct object * * @param array $props */ public function __construct( $props =array()) { var_dump( 'constr'); $this->_props =$props; } /** * Magic method override * * @param string $key */ public function __isset( $key) { var_dump( 'isset'); return array_key_exists( $key, $this->_props); } /** * Magic method override * * @param string $key * @return mixed/null */ public function __get( $key) { var_dump( 'get'); if( !array_key_exists( $key, $this->_props)) return null;// entry does not exist // return obtained value return $this->_props[ $key]; } /** * Magic method override * * @param string $key * @param mixed $value */ public function __set( $key, $value) { var_dump( 'set'); $this->_props[ $key] =$value; } /** * Magic method override * * @param string $key */ public function __unset( $key) { var_dump( 'unset'); unset( $this->_props[ $key]); } /** * Get associated array * * @return array */ public function __invoke() { var_dump( 'invoke'); return $this->_props; } /** * Get object name * * @return string */ public function __toString() { return __CLASS__; } } .. mysql_fetch_object( $result, 'Object'); Expected result: string(6) "constr" string(3) "set" string(3) "set" string(3) "set" string(3) "set" Actual result: -- string(3) "set" string(3) "set" string(3) "set" string(3) "set" string(6) "constr" -- Edit this bug report at http://bugs.php.net/?id=46105&edit=1
#43353 [Opn->Csd]: wrong detection of 'data' wrapper causes notice
ID: 43353 Updated by: [EMAIL PROTECTED] Reported By: gk at gknw dot de -Status: Open +Status: Closed Bug Type: Streams related Operating System: NetWare only PHP Version: 5.2CVS-2008-11-01 New Comment: 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. Previous Comments: [2008-11-02 11:53:12] gk at gknw dot de Hi Jani, it seems this bug is not yet fixed with recent snapshot from 01-Nov-2008; also I see no commit related to this issue: http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?view=log just use my sample - it works on every platform, no need to run it on NetWare. Günter. [2008-10-30 17:03:04] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2007-11-20 23:25:46] gk at gknw dot de Description: On NetWare we have volume names similar to drive letters on Win32; however the volume names are not just one char, but can be up to 16 chars, so an valid absolute path can look like: data1:/myfolder/otherfolder Now if I use f.e. is_dir(data1:/myfolder/otherfolder) then I get: Notice: is_file() [function.is-file]: Unable to find the wrapper "data1" - did you forget to enable it when you configured PHP? in data1:/web/project/tstpaths.php on line 13 It seems to me that the problem is in ./main/streams/streams.c at line 1519; I did modify this line as below, and the issue is then gone: --- streams.c.orig Wed Aug 08 08:01:50 2007 +++ streams.c Tue Nov 20 23:45:45 2007 @@ -1516,7 +1516,7 @@ n++; } - if ((*p == ':') && (n > 1) && (!strncmp("//", p+1, 2) || !memcmp("data", path, 4))) { + if ((*p == ':') && (n > 1) && (!strncmp("//", p+1, 2))) { protocol = path; } else if (n == 5 && strncasecmp(path, "zlib:", 5) == 0) { /* BC with older php scripts and zlib wrapper */ however I'm not sure if now the 'data' wrapper still works; but formerly due to the '||' everything beginning with 'data' did match. I cant see a reason why the test for 'data' has to be handled without checking for '://', but then I'm not familar with the 'data' wrapper at all. Reproduce code: --- Expected result: is_dir ( data:/myfolder/another/folder ) = false is_dir ( data1:/myfolder/another/folder ) = false is_dir ( data2:/myfolder/another/folder ) = false Actual result: -- is_dir ( data:/myfolder/another/folder ) = false Notice: is_dir() [function.is-dir]: Unable to find the wrapper "data1" - did you forget to enable it when you configured PHP? in sys:/www/tstphp/temp/wrapper_bug.php on line 10 Notice: is_dir() [function.is-dir]: Unable to find the wrapper "data1" - did you forget to enable it when you configured PHP? in sys:/www/tstphp/temp/wrapper_bug.php on line 10 is_dir ( data1:/myfolder/another/folder ) = false Notice: is_dir() [function.is-dir]: Unable to find the wrapper "data2" - did you forget to enable it when you configured PHP? in sys:/www/tstphp/temp/wrapper_bug.php on line 13 Notice: is_dir() [function.is-dir]: Unable to find the wrapper "data2" - did you forget to enable it when you configured PHP? in sys:/www/tstphp/temp/wrapper_bug.php on line 13 is_dir ( data2:/myfolder/another/folder ) = false -- Edit this bug report at http://bugs.php.net/?id=43353&edit=1
#46409 [Opn->Asn]: __invoke method called outside of object context when using array_map
ID: 46409 Updated by: [EMAIL PROTECTED] Reported By: phpbugs at sevenlight dot com -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: Mac OSX 10.5.5 PHP Version: 5.3.0alpha2 -Assigned To: +Assigned To: dmitry Previous Comments: [2008-10-28 20:17:51] phpbugs at sevenlight dot com Description: When using a custom class as a callback object, the array_map (and possibly other methods) call the method outside of the object's context. I was using this as the __invoke() method to test: if (!isset($this)) { die('Outside of object context.'); } else { return $this->val; } This may be the best way to setup the PHP unit test script. Again I did not test this on other callback functions, but it very easily could be happening on those as well. Reproduce code: --- val; } } $cb = new Callback(); // straight callback if ($cb() != 'hello, world') { die('error'); } // array_map $a = array(1, 2, 3); $b = array_map($cb, $a); print_r($b); ?> Expected result: Array ( [0] => hello, world [1] => hello, world [2] => hello, world ) Actual result: -- PHP Fatal error: Using $this when not in object context in /srv/www/test/closure.php on line 8 -- Edit this bug report at http://bugs.php.net/?id=46409&edit=1
#46326 [Asn]: error_reporting ignored in php-cli.ini
ID: 46326 User updated by: RQuadling at GMail dot com Reported By: RQuadling at GMail dot com Status: Assigned Bug Type: PHP options/info functions Operating System: Windows XP SP3 PHP Version: 5.3CVS-2008-10-17 (snap) Assigned To: pajoye New Comment: It seems as if the entire INI file is ignored. I was playing with activating some more modules and there is no change to php -m output for the 5.3 alphas. Same INI file for 5.2.6 and all is well. Previous Comments: [2008-10-23 13:24:39] RQuadling at GMail dot com Wouldn't surprise me. [2008-10-22 11:25:29] [EMAIL PROTECTED] So it's most likely Windows only issue. (can't reproduce here..) [2008-10-21 19:09:45] RQuadling at GMail dot com "real"? But no. I'm all windows here. [2008-10-21 09:29:02] [EMAIL PROTECTED] Can you reproduce this with some real OS, line Linux? [2008-10-17 13:25:38] RQuadling at GMail dot com Oh and supplying the INI file via the command line on the 5.3 alpha makes no difference either ... C:\>c:\PHP5\php.exe -c C:\php\PHP5\INI\php-cli.ini z:\phpdetails.php php_sapi_name() = cli phpversion()= 5.3.0alpha3-dev php_ini_loaded_file() = C:\PHP\PHP5\INI\php-cli.ini php_ini_scanned_files() = error_reporting() = 22519 INI error_reporting = error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR 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/46326 -- Edit this bug report at http://bugs.php.net/?id=46326&edit=1
#44327 [Asn->Csd]: PDORow::queryString property & numeric offsets / Crash
ID: 44327 Updated by: [EMAIL PROTECTED] Reported By: uwendel at mysql dot com -Status: Assigned +Status: Closed Bug Type: PDO related Operating System: Linux PHP Version: 5.3CVS-2008-03-04 (snap) Assigned To: felipe New Comment: 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. Previous Comments: [2008-07-04 17:12:10] [EMAIL PROTECTED] Part one of my report is bogus and the crash seems to be gone. Can anybody verify and close it? [2008-04-14 09:06:06] uwendel at mysql dot com Adding "Crash" to Summary. [2008-04-14 09:03:12] uwendel at mysql dot com Crash with CVS snapshot [EMAIL PROTECTED]:~/php53_libmysql> sapi/cli/php -v PHP 5.3.0-dev (cli) (built: Apr 11 2008 12:02:49) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies [EMAIL PROTECTED]:~/php53_libmysql> sapi/cli/php -r '$db = new PDO("sqlite:/tmp/foo"); $stmt = $db->query("SELECT 1"); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row->{0}); var_dump($row->queryString); get_class($row);' string(1) "1" string(1) "1" Speicherzugriffsfehler [2008-03-04 17:21:29] uwendel at mysql dot com Description: What kind of thing is the PDORow::queryString property? PDORow objects are generated and returned by PDOStatement::fetch(PDO::FETCH_LAZY). PDORow objects seem a bit special in some ways. 1) "PDO::FETCH_LAZY = PDO::FETCH_OBJ + PDO::FETCH_BOTH" PDO::FETCH_BOTH means that the returned data is both indexed by the column name and a column offset number. For example, a query like SELECT id FROM test should return an object (resp. array) with the properties {0} and id. You can access both properties and you get what you want. But var_dump() will report only the column name based property and not the property based on the numeric column offset. I have no idea if this is a var_dump() or a PDO flaw. 2) The magic queryString property var_dump() reports a queryString property for PDORow objects returned by PDOStatement::fetch(). In all my testing I found the queryString propery value to be the query string which has constructed the corresponding PDOStatement object. However, I cannot access this property. I see it, but I have no access. That makes it a bit "magic". Also, note how var_dump(), var_export() and debug_zval_dump report different things. Johannes already explained to me that the functions might do different things, but anyway it looks confusing to me. Reproduce code: --- 1, FETCH_LAZY and numeric offset -- sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->{0}); var_dump($row->one); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> string(1) "1" string(1) "1" 2, magic PDORow::queryString() - sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $stmt = $db->prepare("SELECT 1 AS \"one\""); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); ' object(PDORow)#3 (2) { ["queryString"]=> string(17) "SELECT 1 AS "one"" ["one"]=> string(1) "1" } --> UNKNOWN:0 sapi/cli/php -r '$db = new PDO("mysql:dbname=phptest;unix_socket=/tmp/mysql.sock", "root", "root"); $db->exec("DROP TABLE test"); $db->exec("CREATE TABLE test (id INT)"); $db->exec("INSERT INTO test(id) VALUES (1)"); $stmt = $db->prepare("SELECT id FROM test"); $stmt->execute(); $row = $stmt->fetch(PDO::FETCH_LAZY); var_dump($row); var_dump($row->queryString); var_export($row->queryString); print "\n"; debug_zval_dump($row->queryString);' --> UNKNOWN:0 NULL UNKNOWN:0 -- Edit this bug report at http://bugs.php.net/?id=44327&edit=1
#46105 [WFx]: mysql_fetch_object calls constructor on object after setting up properties
ID: 46105 User updated by: ninzya at inbox dot lv Reported By: ninzya at inbox dot lv Status: Wont fix Bug Type: MySQL related Operating System: Windows XP PHP Version: 5.3.0alpha2 Assigned To: mysql New Comment: Well, then you should't fix any bugs at all and have bugtracker, because some folk's code may rely on those bugs. This is not a valid behavior, you HAVE TO fix this, and if necessary, warn users about the change. If this "feature" is not documented, there should be a slight warning about this. Previous Comments: [2008-11-03 15:48:53] [EMAIL PROTECTED] Yes, the behavior can be considered wrong, unfortunately we can't change it as code might rely on that order, like doing work with the data in the constructor ... [2008-09-17 12:35:52] ninzya at inbox dot lv Description: when using custom object return through mysql_fetch_object, function allocates specified in second parameter object, sets up all properties and then calls constructor. I think this is wrong. Newly instantiated object's constructor must be called before any other operation on the object is performed. Reproduce code: --- /** * Object class * */ class Object { /** * Array of properties * * @var array */ protected $_props =array(); /** * Construct object * * @param array $props */ public function __construct( $props =array()) { var_dump( 'constr'); $this->_props =$props; } /** * Magic method override * * @param string $key */ public function __isset( $key) { var_dump( 'isset'); return array_key_exists( $key, $this->_props); } /** * Magic method override * * @param string $key * @return mixed/null */ public function __get( $key) { var_dump( 'get'); if( !array_key_exists( $key, $this->_props)) return null;// entry does not exist // return obtained value return $this->_props[ $key]; } /** * Magic method override * * @param string $key * @param mixed $value */ public function __set( $key, $value) { var_dump( 'set'); $this->_props[ $key] =$value; } /** * Magic method override * * @param string $key */ public function __unset( $key) { var_dump( 'unset'); unset( $this->_props[ $key]); } /** * Get associated array * * @return array */ public function __invoke() { var_dump( 'invoke'); return $this->_props; } /** * Get object name * * @return string */ public function __toString() { return __CLASS__; } } .. mysql_fetch_object( $result, 'Object'); Expected result: string(6) "constr" string(3) "set" string(3) "set" string(3) "set" string(3) "set" Actual result: -- string(3) "set" string(3) "set" string(3) "set" string(3) "set" string(6) "constr" -- Edit this bug report at http://bugs.php.net/?id=46105&edit=1
#45303 [Opn->Csd]: Opening php:// wrapper in append mode results in a warning
ID: 45303 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Closed Bug Type: Streams related Operating System: Linux (Debian) PHP Version: 5.2CVS-2008-06-18 (CVS) New Comment: 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. Previous Comments: [2008-06-18 18:24:38] [EMAIL PROTECTED] Description: When attempting to fopen any php:// wrapper in append mode (which should be equivalent to writing), PHP gives the following warning before returning the resource: fopen(): cannot seek on a pipe The resource returned behaves properly. Reproduce code: --- Expected result: Warning: fopen(): cannot seek on a pipe in <...> on line 2 resource(5) of type (stream) Warning: fopen(): cannot seek on a pipe in <...> on line 3 resource(6) of type (stream) Warning: fopen(): cannot seek on a pipe in <...> on line 4 resource(7) of type (stream) Actual result: -- resource(5) of type (stream) resource(6) of type (stream) resource(7) of type (stream) -- Edit this bug report at http://bugs.php.net/?id=45303&edit=1
#46432 [Asn->Fbk]: xml_parse_into_struct() doesn't return correct data
ID: 46432 Updated by: [EMAIL PROTECTED] Reported By: jmpons at arenamobile dot com -Status: Assigned +Status: Feedback Bug Type: XML related Operating System: * PHP Version: 5.2CVS-2008-10-31 Assigned To: rrichards New Comment: Do you happen to be using libxml2 2.7.x when testing with 5.2.6? If so, this is the same as bug #45996. Previous Comments: [2008-10-31 18:04:51] [EMAIL PROTECTED] Tested by compiling with libexpat and it works. When compiled with libxml it does not work. So it's just incompatibility between libexpat and libxml. Rob, can you check this out? [2008-10-30 16:33:29] jmpons at arenamobile dot com Description: With php 5.2.6, parsing xml code with html inside, return a bad parsed string... I have checked it with php 5.2.5 and it works fine... Reproduce code: --- bla bla bla
url; blah... Expected result: Array ( [0] => Array ( [tag] => tree [type] => open [level] => 1 ) [1] => Array ( [tag] => node [type] => complete [level] => 2 [value] => bla bla bla http://www.google.com";>url blah... ) [2] => Array ( [tag] => tree [type] => close [level] => 1 ) ) Actual result: -- Array ( [0] => Array ( [tag] => tree [type] => open [level] => 1 ) [1] => Array ( [tag] => node [type] => complete [level] => 2 [value] => bla bla bla br/a href="http://www.google.com"url/a blah... ) [2] => Array ( [tag] => tree [type] => close [level] => 1 ) ) -- Edit this bug report at http://bugs.php.net/?id=46432&edit=1
#46414 [Com]: firebird with php 5.26
ID: 46414 Comment by: mapopa at gmail dot com Reported By: mario_s1985 at o2 dot pl Status: Open Bug Type: InterBase related Operating System: CentOS PHP Version: 5.2.6 New Comment: you don't need to specify =shared the firebird module is builded by default as shared module Previous Comments: [2008-10-29 09:31:06] mario_s1985 at o2 dot pl Description: ./configure --with-interbase=shared,/opt/interbase Reproduce code: --- http://www.maildir.net/2008/10/02/installing-firebird-interbase-support-on-php-as-shared-module/#comment-4002 Expected result: create interbase.so -- Edit this bug report at http://bugs.php.net/?id=46414&edit=1
#46475 [NEW]: CCS event on button not working
From: mark dot lynch at crowley dot com Operating system: win2003 PHP version: 5.2.6 PHP Bug Type: IIS related Bug description: CCS event on button not working Description: I have recently upgraded my OS from windows 2000 to windows 2003. In the process we upgrade our php from 5.1.4 to 5.2.6 as 5.1.4 did not work with 2003. We have found that our only page which uses standard html button does not bind to its event handler on the server. $Login->DoLogin->CCSEvents["OnClick"] = "Login_DoLogin_OnClick"; The function "Login_DoLogin_OnClick" never gets called. Is there a feature I need to install to get this working. All the other CCS event binding seem to be work, Load, unload type etc. Mark. Reproduce code: --- DoLogin->CCSEvents["OnClick"] = "Login_DoLogin_OnClick"; } function Login_DoLogin_OnClick() { echo("Here2"); die(); } ?> Expected result: The Page should show the message "Here2" Actual result: -- Page just refreshes and displays the button. -- Edit bug report at http://bugs.php.net/?id=46475&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46475&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46475&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46475&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46475&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46475&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46475&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46475&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46475&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46475&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46475&r=support Expected behavior: http://bugs.php.net/fix.php?id=46475&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46475&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46475&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46475&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46475&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=46475&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46475&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46475&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46475&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46475&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46475&r=mysqlcfg
#46456 [Fbk->Opn]: zip_entry_name() mangling national characters
ID: 46456 User updated by: mkurpel at gmail dot com Reported By: mkurpel at gmail dot com -Status: Feedback +Status: Open Bug Type: Zip Related Operating System: FreeBSD 6.2-RELEASE-p8 PHP Version: 5.2.6 New Comment: Jani, tried it with no luck again, this was the output: http://obrazok.eu/files/bg05v7lyfto1i883czzs.png I have tried many more things, such as iconv and mb_convert_encoding but nothing helped. And I cannot replace those mangled characters by the desirable ones since zip_entry_name() returns the same mangled character for different national characters. Previous Comments: [2008-11-03 08:37:02] [EMAIL PROTECTED] Ditch those mb_* calls and remove that setlocale() call too. Then replace utf8_encode() with utf8_decode().. [2008-11-01 19:01:04] mkurpel at gmail dot com No, it does not, it outputs some garbled characters :( [2008-11-01 18:16:38] [EMAIL PROTECTED] First of all, don't use utf8_encode... does it work then? [2008-11-01 17:33:51] mkurpel at gmail dot com The characters in Actual results got converted into html entities in this bug tracking system. The script has output actual characters, not entities. [2008-11-01 17:31:52] mkurpel at gmail dot com Description: I am reading a ZIP file containing one XLS file named "µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls". However, I am getting mangled characters from the zip_entry_name() function. I am working in UTF-8 so I utf_8_encoded it prior to echoing. All my php files are saved in utf-8 too. Non-national characters are returned just fine. Reproduce code: --- header('Content-Type: text/html; charset: utf-8'); setlocale(LC_ALL, 'sk_SK.utf8'); mb_internal_encoding('UTF-8'); mb_http_output('UTF-8'); $zip = zip_open(realpath($somezipfile)); while ($zip_entry = @zip_read($zip)) { echo $path = utf8_encode(zip_entry_name($zip_entry)); } @zip_close($zip); Expected result: should echo this string: µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls Actual result: -- echoed this string: –矜§ì ¡‚£“å„¢ØÔý’”‰ •欛¦íµÖéâÕŽà·Òü‘™Óš.xls -- Edit this bug report at http://bugs.php.net/?id=46456&edit=1
#46456 [Opn->Fbk]: zip_entry_name() mangling national characters
ID: 46456 Updated by: [EMAIL PROTECTED] Reported By: mkurpel at gmail dot com -Status: Open +Status: Feedback Bug Type: Zip Related Operating System: FreeBSD 6.2-RELEASE-p8 PHP Version: 5.2.6 -Assigned To: +Assigned To: pajoye New Comment: Please post a link to the zip archive you use for your tests as well as an image to show us how the text should be displayed (if it is using non ascii chars :). Previous Comments: [2008-11-03 18:38:30] mkurpel at gmail dot com Jani, tried it with no luck again, this was the output: http://obrazok.eu/files/bg05v7lyfto1i883czzs.png I have tried many more things, such as iconv and mb_convert_encoding but nothing helped. And I cannot replace those mangled characters by the desirable ones since zip_entry_name() returns the same mangled character for different national characters. [2008-11-03 08:37:02] [EMAIL PROTECTED] Ditch those mb_* calls and remove that setlocale() call too. Then replace utf8_encode() with utf8_decode().. [2008-11-01 19:01:04] mkurpel at gmail dot com No, it does not, it outputs some garbled characters :( [2008-11-01 18:16:38] [EMAIL PROTECTED] First of all, don't use utf8_encode... does it work then? [2008-11-01 17:33:51] mkurpel at gmail dot com The characters in Actual results got converted into html entities in this bug tracking system. The script has output actual characters, not entities. 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/46456 -- Edit this bug report at http://bugs.php.net/?id=46456&edit=1
#44848 [Fbk->Opn]: autoload fails with complex loading scheme
ID: 44848 User updated by: nicolas dot grekas+php at gmail dot com Reported By: nicolas dot grekas+php at gmail dot com -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.2CVS-2008-08-03 New Comment: Doesn't work with windows snaps [2008-Nov-03 08:00:00]. I got exactly the same behavior Previous Comments: [2008-10-30 17:06:29] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ [2008-06-05 08:33:59] jille at hexon dot cx I tried creating a work-around for this. However, this didn't work: So class B is half-existent ? You can not define it, but it also doesn't exists... [2008-04-27 21:22:46] nicolas dot grekas+php at gmail dot com Description: Hard to explain, see code... I think that PHP should be able to handle this kind of loading scheme. Here is what I thought this code would do : 1. __autoload('A') is called 2. inside this call for A: 2.1 class B is defined, which extends C 2.2 as C is not defined, __autoload('C') is called 2.3 inside this call for C: 2.3.1 class C is defined 2.3.2 (now we have everything needed for class B, haven't we ?) 2.3.3 class A extends B 2.4 we leave the __autoload('C') context 3. we leave the __autoload('A') context The bug is at step 2.3.3 : "class A extends B" triggers an autoload('B'), which should not occurs, as B should be already defined, thanks to 2.3.2... Reproduce code: --- http://bugs.php.net/?id=44848&edit=1
#46456 [Fbk->Opn]: zip_entry_name() mangling national characters
ID: 46456 User updated by: mkurpel at gmail dot com Reported By: mkurpel at gmail dot com -Status: Feedback +Status: Open Bug Type: Zip Related Operating System: FreeBSD 6.2-RELEASE-p8 PHP Version: 5.2.6 Assigned To: pajoye New Comment: You can find the zip file here: http://kotuha.com/file/zWio7-aaa.html There is a xls file inside with the filename µ¹è»¾ýáíéúôòäóìïøåöëü ¥©È«®ÝÁÍÉÚÔÒÄÓÌÏØÅÖËÜ.xls and it should display the xls filename exactly like it is (with national characters). With the code originally provided it looks like this: http://obrazok.eu/files/6hhmttlsmiwezc8gmo6m.png All non-national characters (if there were any in the xls filename) are retained, national characters get garbled. Previous Comments: [2008-11-03 18:56:48] [EMAIL PROTECTED] Please post a link to the zip archive you use for your tests as well as an image to show us how the text should be displayed (if it is using non ascii chars :). [2008-11-03 18:38:30] mkurpel at gmail dot com Jani, tried it with no luck again, this was the output: http://obrazok.eu/files/bg05v7lyfto1i883czzs.png I have tried many more things, such as iconv and mb_convert_encoding but nothing helped. And I cannot replace those mangled characters by the desirable ones since zip_entry_name() returns the same mangled character for different national characters. [2008-11-03 08:37:02] [EMAIL PROTECTED] Ditch those mb_* calls and remove that setlocale() call too. Then replace utf8_encode() with utf8_decode().. [2008-11-01 19:01:04] mkurpel at gmail dot com No, it does not, it outputs some garbled characters :( [2008-11-01 18:16:38] [EMAIL PROTECTED] First of all, don't use utf8_encode... does it work then? 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/46456 -- Edit this bug report at http://bugs.php.net/?id=46456&edit=1
#34667 [Com]: Notice: Unknown: Unable to find the wrapper "compress.bzip2".....
ID: 34667 Comment by: ansnowflake at gmail dot com Reported By: webmaster at 24-99-92-156 dot no-ip dot com Status: No Feedback Bug Type: Bzip2 Related Operating System: Windows Server 2003 Ent. SP1 PHP Version: 5.0.5 New Comment: If we are not using BZ extension, we may comment the following lines in php.ini: [PHP_BCOMPILER] extension=php_bcompiler.dll to: ;[PHP_BCOMPILER] ;extension=php_bcompiler.dll Previous Comments: [2008-10-05 04:51:22] lelorrain at yahoo dot fr I have the same problem on every PHP script execution. I am using PHP 5.2.6 on Windows Server 2000. gz2 is NOT installed. [2008-01-14 15:43:32] lord dot arrogant at gmail dot com I am running 5.2.5 on WinXP Pro with Apache 2.2.6 and the error is always there when I first open my browser and load a page. If I reload the page immediately the error disappears. I have loaded the bz2. [2008-01-03 18:04:38] jpenn at rcn dot com I am running PHP 5.2.5 Windows 2000 server and IIS 5. I get the same error when "error_reporting = E_ALL" is set in the php.ini file. I have it set to E_STRICT and I am no longer recieving this error. JP [2008-01-03 17:04:39] computerlov at yahoo dot com Here's how to reproduce the bug: you need to have your php.ini file configured to display errors and show errors "E_ALL | E_STRICT" I had E_ALL and it didn't show up. Once adding "E_STRICT", it started popping as reported before. Maybe the new snapshot didn't have E_STRICT in the ini file. Php version i'm using: 5.2.5 (Downloaded it in December 2007) I'm using windows binaries. Cheers. [2007-11-12 13:41:39] abouzekry at gmail dot com The Problem also appears to exist in PHP 5.2.0, on WinXP Professional,...but the probability of it's appear is random!!! 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/34667 -- Edit this bug report at http://bugs.php.net/?id=34667&edit=1
#43508 [Fbk->Opn]: ImageCreateFromPNG does not set transparent color
ID: 43508 User updated by: vbhunt at silverfox dot com Reported By: vbhunt at silverfox dot com -Status: Feedback +Status: Open Bug Type: GD related Operating System: Windows XP Professional Ver 2SP2 PHP Version: 5.2.5 Assigned To: pajoye New Comment: If a layer has 100% transparency, how is it distinguishable from a transparent color? This strikes me as quibbling over a feature clash anomaly that causes the function to not operate correctly. Let's put it another way. Why doesn't the function ImageCreateFromPNG creation preserve the transparency of the white pixels and feed it into the image? If it did that, the function would work exactly as expected. Should the bug be rewritten to say that ImageCreateFromPNG does not preserve the opacity (or transparency) of layers in PNG files? The function simply does not work because it fails to preserve a key characteristic of a PNG file, the transparency of the image. That is the point I've attempted to make. How is this useful if the function cannot preserve key PNG image characteristics? The ImageCreateFromPNG function is broken! It fails to preserve the Transparency of the image layers that is clearly preserved in the rendering from both the leading image development tools and display applications. /Bruce Previous Comments: [2008-11-03 08:08:16] [EMAIL PROTECTED] "Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels." Exactly, there is not transparent color set but a white color with 100% transparency. The alpha channel is correctly read and the resulting image can use it correctly. Take the "alert.png" image, the top left pixel is transparent (at 0,0), using a white color with 100% transparency but it is not the bgd color. Or am I still missing your point? [2008-11-03 00:55:18] vbhunt at silverfox dot com This is NOT a bogus bug. Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels. No alpha channels are shown in either ImageReady or Photoshop. Every single one of the submitted test images properly display with proper png transparency in both IE7 and Firefox3 as well as ImageReady 7.01 and Photoshop 7.01 as was originally reported. Yet the ImageCreateFromPNG function cannot find this transparency. Therefore I continue to conclude that this is NOT a bogus bug. Can you demonstrate any working example that preserves transparency using ImageCreateFromPNG? I suspect not. I have provided you with many examples that cause this function to fail, yet have clear transparency as shown in both the development and display tools. [2008-11-02 18:30:25] [EMAIL PROTECTED] There is no transparent color (or known as background color). The alert.png for example uses the alpha channel, and the borders of the images is filled with the white color and 100% alpha. A png image can use either the alpha channel or the transparent color but not both. [2008-11-02 18:15:25] vbhunt at silverfox dot com Sorry, permissions were changed in a security sweep. I've corrected the permissions so you can get at the images: https://www.republiclocomotiveworks.com/buttons/icons/alert.png https://www.republiclocomotiveworks.com/buttons/icons/.png replace with one of the following as the first example shows. alert, group, home, left, mail, right, send, stop, stop1, trash, user Again, thanks for looking at this! /bruce [2008-11-02 15:15:24] [EMAIL PROTECTED] None of the images work, please provide a link to existing images. 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/43508 -- Edit this bug report at http://bugs.php.net/?id=43508&edit=1
#46475 [Opn->Bgs]: CCS event on button not working
ID: 46475 Updated by: [EMAIL PROTECTED] Reported By: mark dot lynch at crowley dot com -Status: Open +Status: Bogus Bug Type: IIS related Operating System: win2003 PHP Version: 5.2.6 New Comment: 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. Previous Comments: [2008-11-03 17:47:00] mark dot lynch at crowley dot com Description: I have recently upgraded my OS from windows 2000 to windows 2003. In the process we upgrade our php from 5.1.4 to 5.2.6 as 5.1.4 did not work with 2003. We have found that our only page which uses standard html button does not bind to its event handler on the server. $Login->DoLogin->CCSEvents["OnClick"] = "Login_DoLogin_OnClick"; The function "Login_DoLogin_OnClick" never gets called. Is there a feature I need to install to get this working. All the other CCS event binding seem to be work, Load, unload type etc. Mark. Reproduce code: --- DoLogin->CCSEvents["OnClick"] = "Login_DoLogin_OnClick"; } function Login_DoLogin_OnClick() { echo("Here2"); die(); } ?> Expected result: The Page should show the message "Here2" Actual result: -- Page just refreshes and displays the button. -- Edit this bug report at http://bugs.php.net/?id=46475&edit=1
#43508 [Opn->Bgs]: ImageCreateFromPNG does not set transparent color
ID: 43508 Updated by: [EMAIL PROTECTED] Reported By: vbhunt at silverfox dot com -Status: Open +Status: Bogus Bug Type: GD related Operating System: Windows XP Professional Ver 2SP2 PHP Version: 5.2.5 Assigned To: pajoye New Comment: > If a layer has 100% transparency, how is it distinguishable from a > transparent color? This strikes me as quibbling over a feature clash > anomaly that causes the function to not operate correctly. I'm not sure how else I can explain it. It behaves correctly. > Let's put it another way. Why doesn't the function ImageCreateFromPNG > creation preserve the transparency of the white pixels and feed it into > the image? If it did that, the function would work exactly as expected. It doesrespect it, the alpha channel is used. >The function simply does not work because it fails to preserve a key > characteristic of a PNG file, the transparency of the image. What you miss completely is the characteristic of the PNG format. See: http://www.w3.org/TR/PNG/#11tRNS And the code to show the white pixel (taken at 0,0) with 100% alpha: bogus. Previous Comments: [2008-11-03 21:10:33] vbhunt at silverfox dot com If a layer has 100% transparency, how is it distinguishable from a transparent color? This strikes me as quibbling over a feature clash anomaly that causes the function to not operate correctly. Let's put it another way. Why doesn't the function ImageCreateFromPNG creation preserve the transparency of the white pixels and feed it into the image? If it did that, the function would work exactly as expected. Should the bug be rewritten to say that ImageCreateFromPNG does not preserve the opacity (or transparency) of layers in PNG files? The function simply does not work because it fails to preserve a key characteristic of a PNG file, the transparency of the image. That is the point I've attempted to make. How is this useful if the function cannot preserve key PNG image characteristics? The ImageCreateFromPNG function is broken! It fails to preserve the Transparency of the image layers that is clearly preserved in the rendering from both the leading image development tools and display applications. /Bruce [2008-11-03 08:08:16] [EMAIL PROTECTED] "Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels." Exactly, there is not transparent color set but a white color with 100% transparency. The alpha channel is correctly read and the resulting image can use it correctly. Take the "alert.png" image, the top left pixel is transparent (at 0,0), using a white color with 100% transparency but it is not the bgd color. Or am I still missing your point? [2008-11-03 00:55:18] vbhunt at silverfox dot com This is NOT a bogus bug. Both ImageReady 7.01 and Photoshop 7.01 show alert.png as having an opacity layer with 0% opacity (i.e. 100% transparency) that covers the rectangle not covered by RGB pixels. No alpha channels are shown in either ImageReady or Photoshop. Every single one of the submitted test images properly display with proper png transparency in both IE7 and Firefox3 as well as ImageReady 7.01 and Photoshop 7.01 as was originally reported. Yet the ImageCreateFromPNG function cannot find this transparency. Therefore I continue to conclude that this is NOT a bogus bug. Can you demonstrate any working example that preserves transparency using ImageCreateFromPNG? I suspect not. I have provided you with many examples that cause this function to fail, yet have clear transparency as shown in both the development and display tools. [2008-11-02 18:30:25] [EMAIL PROTECTED] There is no transparent color (or known as background color). The alert.png for example uses the alpha channel, and the borders of the images is filled with the white color and 100% alpha. A png image can use either the alpha channel or the transparent color but not both. [2008-11-02 18:15:25] vbhunt at silverfox dot com Sorry, permissions were changed in a security sweep. I've corrected the permissions so you can get at the images: https://www.republiclocomotiveworks.com/buttons/icons/alert.png https://www.republiclocomotiveworks.com/buttons/icons/.png replace with one of the following as the first example shows. alert, group, home, left, mail, right, send, stop, stop1, trash, user Again, thanks for looking at this! /bruce The remainder of the comments f
#45996 [Com]: libxml2 2.7.1 causes breakage with character data in xml_parse()
ID: 45996 Comment by: hjthring at lavabit dot com Reported By: phpbugs at colin dot guthr dot ie Status: Assigned Bug Type: XML related Operating System: Mandriva Linux PHP Version: 5.2.6 Assigned To: rrichards New Comment: any suggestions on how one could go about upgrading cms code to avoid this issue ?? Hayden. Previous Comments: [2008-10-31 14:45:23] sunil at truesparrow dot com I am also facing the same problem on redhat 5 server.I have php 5.2.6 and libxml 2.7.2 Any updates on the bug? Thanks, Sunil [2008-10-30 18:19:16] phpbugs at hm2k dot org This problem is also documented here... http://social.microsoft.com/Forums/en-US/writerbeta/thread/62ad697b-ed19-4b0b-ae6a-32bec06b142b/ [2008-10-25 18:12:57] alykhanii at yahoo dot com This bug has messed up the XMLRPC upload capabilities in Wordpress hopefully a solution is coming soon. [2008-10-24 20:47:08] sanepit at o2 dot pl I have the same problem on Gentoo with new libxml2-2.6.32 In moodle platform this problem disable to restore courses backup. [2008-10-22 11:39:48] markus dot gevers at contenit dot de Hallo, is there a solution yet? I have the same problem on Fedora Core 9. I also have this problem using libxml2-2.6.32 Can anyone help me? Best regards, Markus 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/45996 -- Edit this bug report at http://bugs.php.net/?id=45996&edit=1
#44607 [Opn->Csd]: stream_get_line unable to correctly identify the "ending" in the stream content
ID: 44607 Updated by: [EMAIL PROTECTED] Reported By: amoo_miki at yahoo dot com -Status: Open +Status: Closed Bug Type: Streams related Operating System: * PHP Version: 5CVS, 6CVS (2008-08-19) New Comment: 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. Previous Comments: [2008-08-19 17:13:10] amoo_miki at yahoo dot com 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. [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-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-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
#46379 [Ver->Csd]: Infinite loop when parsing '#' in one line file.
ID: 46379 Updated by: [EMAIL PROTECTED] Reported By: marek dot miska at netart dot pl -Status: Verified +Status: Closed Bug Type: CGI related Operating System: * PHP Version: 5.2CVS-2008-10-24 (only!) New Comment: 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. Previous Comments: [2008-10-24 15:39:18] [EMAIL PROTECTED] verified with current PHP_5_2, not present in PHP_5_3 or HEAD. [2008-10-24 12:26:35] marek dot miska at netart dot pl Description: Given one line script starting with "#" and without end line character, php enters infinite loop. Reproduce code: --- #and no new line Expected result: empty output Actual result: -- Infinite loop. -- Edit this bug report at http://bugs.php.net/?id=46379&edit=1
#46468 [Fbk->Opn]: System Crash when running test script ext/openssl/tests/004.php
ID: 46468 User updated by: hostmaster at uuism dot net Reported By: hostmaster at uuism dot net -Status: Feedback +Status: Open Bug Type: OpenSSL related Operating System: Fedora Core 4 PHP Version: 5.2CVS-2008-11-03 (snap) Assigned To: pajoye New Comment: here is the backtrack; Core was generated by `sapi/cli/php-debug -d output_handler= -d open_basedir= -d safe_mode=0 -d disabl'. Program terminated with signal 11, Segmentation fault. #0 0x004c48a5 in memcpy () from /lib/libc.so.6 (gdb) bt #0 0x004c48a5 in memcpy () from /lib/libc.so.6 #1 0x083ebdcd in ASN1_STRING_set () #2 0x0057dff4 in ?? () from /lib/libc.so.6 #3 0x0057f880 in ?? () from /lib/libc.so.6 #4 0x in ?? () (gdb) frame 0 #0 0x004c48a5 in memcpy () from /lib/libc.so.6 (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x845d2db "openssl_csr_new" (gdb) print (char *)executor_globals.active_op_array->function_name $2 = 0x0 (gdb) print (char *)executor_globals.active_op_array->filename $3 = 0xb7cbb0ac "/usr/local/src/php5.2-200811022130/ext/openssl/tests/004.php" Previous Comments: [2008-11-03 08:14:36] [EMAIL PROTECTED] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. [2008-11-03 03:04:26] hostmaster at uuism dot net That last sentence should be: When I run test script ext/openssl/tests/004.phpt NOW, it passes. Jim [2008-11-03 03:03:31] hostmaster at uuism dot net I installed OpenSSL 0.9.8i 15 Sep 2008 and compiled PHP again, keeping everything else the same, except that I ran configure with --disable-debug. When I run test script ext/openssl/tests/004.phpt not, it passes. Jim [2008-11-03 01:21:21] hostmaster at uuism dot net My php.ini file is exactly the same as php.ini-recommended [2008-11-03 01:19:39] hostmaster at uuism dot net Description: When I run test script ext/openssl/tests/004.php, I get a Core Dump when it executes this part of the code: //this leaks $a = array(1,2); $b = array(1,2); var_dump(openssl_csr_new($a, $b)); Here is a back-trace from gdb: #0 0x004c48a5 in memcpy () from /lib/libc.so.6 #1 0x083ebdcd in ASN1_STRING_set () #2 0x0057dff4 in ?? () from /lib/libc.so.6 #3 0x0057f880 in ?? () from /lib/libc.so.6 #4 0x in ?? () I ran configure with this string: ./configure --build=i386-redhat-linux --host=i386-redhat-linux --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-regex=/usr/local --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-pear=/usr/share/pear --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr/local --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-fastcgi --with-pcre-dir=/usr/local --enable-xmlreader=shared --with-mcrypt --with-mhash --w
#46024 [Opn->Csd]: stream_select() doesn't return the correct number
ID: 46024 Updated by: [EMAIL PROTECTED] Reported By: mike at silverorange dot com -Status: Open +Status: Closed Bug Type: Streams related Operating System: linux PHP Version: 5.2CVS-2008-09-09 (snap) New Comment: 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. Previous Comments: [2008-09-15 02:58:08] mike at silverorange dot com If I use 8192 as the number of bytes for fread(), the correct value is returned. Examining the program with strace() reveals: - PHP always reads 8192 bytes from fread - the requested bytes are returned and the remaining bytes are buffered - stream_select() only invokes a system select() call if the internal buffer is empty - stream_select() returns the wrong value if no actual system select() call is performed. See additional test cases at the above link. [2008-09-09 03:30:03] mike at silverorange dot com The test also fails on the provided snapshot. [2008-09-08 14:33:47] mike at silverorange dot com Description: The stream_select function should return the number of streams ready in the read and write arrays. Sometimes it does and sometimes it doesn't. Reproduce code: --- http://labs.silverorange.com/files/stream-select-bug/ Expected result: selecting ... got 2 Array ( [0] => Resource id #5 ) Array ( [0] => Resource id #6 ) selecting ... got 2 Array ( [0] => Resource id #5 ) Array ( [0] => Resource id #6 ) Actual result: -- selecting ... got 2 Array ( [0] => Resource id #5 ) Array ( [0] => Resource id #6 ) selecting ... got 1 Array ( [0] => Resource id #5 ) Array ( [0] => Resource id #6 ) -- Edit this bug report at http://bugs.php.net/?id=46024&edit=1
#46467 [Bgs]: htmlentities() does not use default_charset when mbstring.so is loaded
ID: 46467 User updated by: hostmaster at uuism dot net Reported By: hostmaster at uuism dot net Status: Bogus Bug Type: mbstring related Operating System: Fedora Core 4 PHP Version: 5.2.6 New Comment: jani, if they fail for everyone, should they have a --XFAIL-- section frankly, based on pure logic, i would not expect this statement to use the default_charset htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, ''); since '' has no meaning as a value for charset, htmlentites should use the same default as when default_charset='' which is ISO-8859-1 on the other hand, this statement should use the default_charset htmlentities("\x82\x86\x99\x9f", ENT_QUOTES); since the third parameter is optional. jim Previous Comments: [2008-11-03 08:34:11] [EMAIL PROTECTED] Yes, they fail for everyone and especially with braindead libc's. [2008-11-02 22:46:37] hostmaster at uuism dot net Description: When I run test scripts ext/standard/tests/strings/htmlentitiesXX.phpt where XX is 10, 11, and 13, the tests fail when mbstring.so is loaded and pass when mbstring.so is not loaded. If I change the test script INI value for mbstring.internal_encoding to the default_charset, the test will pass. Also, they will pass of the $charset is included in the command htmlentities. I am using the php.ini-recommended with extension_dir = "/usr/local/src/php-5.2.6/modules" I placed the php.ini in directory /usr/local/src/php-5.2.6/sapi/cli so sapi/cli/php would use it. All the php.ini values for mbstring are commented out: # grep mbstring /usr/local/src/php-5.2.6/sapi/cli/php.ini ;extension=php_mbstring.dll [mbstring] ;mbstring.language = Japanese ;mbstring.internal_encoding = EUC-JP ;mbstring.http_input = auto ;mbstring.http_output = SJIS ; mbstring.internal_encoding setting. Input chars are ;mbstring.encoding_translation = Off ;mbstring.detect_order = auto ;mbstring.substitute_character = none; ; overload(replace) single byte functions by mbstring functions. ;mbstring.func_overload = 0 ;mbstring.strict_encoding = Off ; With mbstring support this will automatically be converted into the encoding ; given by corresponding encode setting. When empty mbstring.internal_encoding Here is the run without mbstring.so loaded: ]# TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php ext/standard/tests/strings/htmlentities*phpt = PHP : sapi/cli/php PHP_SAPI: cli PHP_VERSION : 5.2.6 ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov 8 14:19:44 EST 2007 i686 INI actual : /usr/local/src/php-5.2.6/sapi/cli/php.ini More .INIs : /etc/php.d/mysql.ini,/etc/php.d/mysqli.ini CWD : /usr/local/src/php-5.2.6 Extra dirs : = Running selected tests. [snip] PASS htmlentities() test 10 (default_charset / cp1252) [ext/standard/tests/strings/htmlentities10.phpt] PASS htmlentities() test 11 (default_charset / ISO-8859-15) [ext/standard/tests/strings/htmlentities11.phpt] PASS htmlentities() test 12 (default_charset / ISO-8859-1) [ext/standard/tests/strings/htmlentities12.phpt] PASS htmlentities() test 13 (default_charset / EUC-JP) [ext/standard/tests/strings/htmlentities13.phpt] [snip] = Number of tests : 2014 Tests skipped :6 ( 30.0%) Tests warned:0 ( 0.0%) ( 0.0%) Tests failed:0 ( 0.0%) ( 0.0%) Tests passed: 14 ( 70.0%) (100.0%) - Time taken :1 seconds = Here is the run WITH mbstring.so loaded: # TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php ext/standard/tests/strings/htmlentities*phpt = PHP : sapi/cli/php PHP_SAPI: cli PHP_VERSION : 5.2.6 ZEND_VERSION: 2.2.0 PHP_OS : Linux - Linux host.uuserver.net 2.6.20.1 #16 SMP Thu Nov 8 14:19:44 EST 2007 i686 INI actual : /usr/local/src/php-5.2.6/sapi/cli/php.ini More .INIs : /etc/php.d/mbstring.ini,/etc/php.d/mysql.ini,/etc/php.d/mysqli.ini CWD : /usr/local/src/php-5.2.6 Extra dirs : = Running selected tests. [snip] FAIL htmlentities() test 10 (default_charset / cp1252) [ext/standard/tests/strings/htmlentities10.phpt] FAIL htmlentities() test 11 (default_charset / ISO-8859-15) [ext/standard/tests/strings/htmlentities11.phpt] PASS htmlentities() test 12 (default_charset / ISO-8859-1) [ext/standard/tests/strings/htm
#46444 [Opn]: invalid session.save_path crashes -
ID: 46444 User updated by: hostmaster at uuism dot net Reported By: hostmaster at uuism dot net Status: Open Bug Type: Session related Operating System: Fedora Core 4 -PHP Version: 5.2CVS-2008-10-31 +PHP Version: 5.2CVS-2008-11-02 New Comment: jani, i reran my original configuration with '--disable debug' and got you more information from the backtrace [snip] Core was generated by `/usr/local/src/php5.2-200811022130/sapi/cli/php -n -c /usr/local/src/php5.2-200'. Program terminated with signal 11, Segmentation fault. #0 php_session_start () at /usr/local/src/php5.2-200811022130/ext/session/session.c:621 621 if (PG(register_long_arrays)) { (gdb) bt #0 php_session_start () at /usr/local/src/php5.2-200811022130/ext/session/session.c:621 #1 0x08190660 in zif_session_start (ht=0, return_value=0xb7c15b14, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /usr/local/src/php5.2-200811022130/ext/session/session.c:1824 #2 0x082b923a in zend_do_fcall_common_helper_SPEC (execute_data=0xbfe7d78c) at /usr/local/src/php5.2-200811022130/Zend/zend_vm_execute.h:200 #3 0x082a8c2f in execute (op_array=0xb7c15f94) at /usr/local/src/php5.2-200811022130/Zend/zend_vm_execute.h:92 #4 0x08288190 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/local/src/php5.2-200811022130/Zend/zend.c:1134 #5 0x08240eb3 in php_execute_script (primary_file=0xbfe7fb88) at /usr/local/src/php5.2-200811022130/main/main.c:2023 #6 0x0831041e in main (argc=108, argv=0xbfe7fca4) at /usr/local/src/php5.2-200811022130/sapi/cli/php_cli.c:1134 (gdb) frame 3 #3 0x082a8c2f in execute (op_array=0xb7c15f94) at /usr/local/src/php5.2-200811022130/Zend/zend_vm_execute.h:92 92 if (EX(opline)->handler(&execute_data TSRMLS_CC) > 0) { (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $1 = 0x8436fdc "session_start" (gdb) print (char *)executor_globals.active_op_array->function_name $2 = 0x0 (gdb) print (char *)executor_globals.active_op_array->filename $3 = 0xb7c16060 "/usr/local/src/php5.2-200811022130/ext/session/tests/016.php" (gdb) frame 2 #2 0x082b923a in zend_do_fcall_common_helper_SPEC (execute_data=0xbfe7d78c) at /usr/local/src/php5.2-200811022130/Zend/zend_vm_execute.h:200 200 ((zend_internal_function *) EX(function_state).function)->handler(opline->extended_value, EX_T(opline->result.u.var).var.ptr, EX(function_state).function->common.return_reference?&EX_T(opline->result.u.var).var.ptr:NULL, EX(object), return_value_used TSRMLS_CC); (gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name $4 = 0x8436fdc "session_start" (gdb) print (char *)executor_globals.active_op_array->function_name $5 = 0x0 (gdb) print (char *)executor_globals.active_op_array->filename $6 = 0xb7c16060 "/usr/local/src/php5.2-200811022130/ext/session/tests/016.php" Previous Comments: [2008-11-04 00:52:04] hostmaster at uuism dot net # make test Build complete. Don't forget to run 'make test'. +---+ | ! ERROR ! | | The test-suite requires that you have pcre extension | | enabled. To enable this extension either compile your PHP | | with --with-pcre-regex or if you've compiled pcre as a| | shared module load it via php.ini.| +---+ [EMAIL PROTECTED] php5.2-200811022130]# TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php -v ext/session/tests/016.phpt +---+ | ! ERROR ! | | The test-suite requires that you have pcre extension | | enabled. To enable this extension either compile your PHP || with --with-pcre-regex or if you've compiled pcre as a| | shared module load it via php.ini.| +---+ [EMAIL PROTECTED] php5.2-200811022130]# sapi/cli/php ext/session/tests/016.php I live i can rerun configure with --with-pcre-regex added if you want. jim -
#46444 [Fbk->Opn]: invalid session.save_path crashes -
ID: 46444 User updated by: hostmaster at uuism dot net Reported By: hostmaster at uuism dot net -Status: Feedback +Status: Open Bug Type: Session related Operating System: Fedora Core 4 PHP Version: 5.2CVS-2008-10-31 New Comment: # make test Build complete. Don't forget to run 'make test'. +---+ | ! ERROR ! | | The test-suite requires that you have pcre extension | | enabled. To enable this extension either compile your PHP | | with --with-pcre-regex or if you've compiled pcre as a| | shared module load it via php.ini.| +---+ [EMAIL PROTECTED] php5.2-200811022130]# TEST_PHP_EXECUTABLE=sapi/cli/php sapi/cli/php ./run-tests.php -v ext/session/tests/016.phpt +---+ | ! ERROR ! | | The test-suite requires that you have pcre extension | | enabled. To enable this extension either compile your PHP || with --with-pcre-regex or if you've compiled pcre as a| | shared module load it via php.ini.| +---+ [EMAIL PROTECTED] php5.2-200811022130]# sapi/cli/php ext/session/tests/016.php I live i can rerun configure with --with-pcre-regex added if you want. jim Previous Comments: [2008-11-03 08:42:39] [EMAIL PROTECTED] Try this configure line (exactly this): # ./configure --disable-all --disable-cgi --enable-session # make clean && make test [2008-11-02 00:55:56] hostmaster at uuism dot net Modules: mbstring.so; mysql.so; mysqli.so; soap.so; and xmlrpc.so I reran the test without any modules and the results were the same. Configuration string: --build=i386-redhat-linux --host=i386-redhat-linux --target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --with-bz2 --with-curl --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pspell --with-pcre-regex=/usr/local --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-pear=/usr/share/pear --with-kerberos --enable-ucd-snmp-hack --with-unixODBC=shared,/usr --enable-shmop --enable-calendar --with-mime-magic=/etc/httpd/conf/magic --without-sqlite --with-libxml-dir=/usr/local --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=/usr --with-xmlrpc=shared --with-ldap=shared --with-mysql=shared,/usr --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared --with-pgsql=shared --with-snmp=shared,/usr --enable-soap=shared --with-xsl=shared,/usr --enable-fastcgi --with-pcre-dir=/usr/local --enable-xmlreader=shared --with-mcrypt --with-mhash --with-config-file-path=/etc/php-5.2.6 --with-config-file-scan-dir=/etc/php-5.2.6/php.d Should it make any difference that I used --disable-debug? I went back and ran configure again with --enable-debug and all the same other parameters. This time the test PASSED. I don't understand. Jim Jim [2008-11-01 23:21:35] [EMAIL PROTECTED] And what was the configure line you used to compile PHP? [2008-11-01 23:20:54] [EMAIL PROTECTED] Are you loading an
#46363 [Opn]: json_decode lacks a 'num_as_string' feature
ID: 46363 Updated by: [EMAIL PROTECTED] Reported By: 191919 at gmail dot com Status: Open Bug Type: Feature/Change Request Operating System: * PHP Version: 5.2.6 New Comment: As a workaround you can always change the precision: C:\php\src>php -r "var_dump(json_decode('{\"a\": 1232487234.97323948}'));" object(stdClass)#1 (1) { ["a"]=> float(1232487234.9732) } C:\php\src>php -d precision=24 -r "var_dump(json_decode('{\"a\": 1232487234.9732 3948}'));" object(stdClass)#1 (1) { ["a"]=> float(1232487234.97323942184448) } :), but I would still like a feature like this Previous Comments: [2008-10-22 10:17:37] 191919 at gmail dot com New patch --- diff -u json_old/JSON_parser.c json/JSON_parser.c --- json_old/JSON_parser.c 2007-06-14 01:56:41.0 +0800 +++ json/JSON_parser.c 2008-10-22 18:10:26.0 +0800 @@ -278,10 +278,15 @@ } -static void json_create_zval(zval **z, smart_str *buf, int type) +static void json_create_zval(zval **z, smart_str *buf, int type, int num_as_string) { ALLOC_INIT_ZVAL(*z); +if (num_as_string && (type == IS_LONG || type == IS_DOUBLE)) +{ +type = IS_STRING; +} + if (type == IS_LONG) { double d = zend_strtod(buf->c, NULL); @@ -399,7 +404,7 @@ machine with a stack. */ int -JSON_parser(zval *z, unsigned short p[], int length, int assoc TSRMLS_DC) +JSON_parser(zval *z, unsigned short p[], int length, int assoc, int num_as_string TSRMLS_DC) { int b; /* the next character */ int c; /* the next character class */ @@ -501,7 +506,7 @@ zval *mval; smart_str_0(&buf); -json_create_zval(&mval, &buf, type); +json_create_zval(&mval, &buf, type, num_as_string); if (!assoc) { @@ -573,7 +578,7 @@ zval *mval; smart_str_0(&buf); -json_create_zval(&mval, &buf, type); +json_create_zval(&mval, &buf, type, num_as_string); add_next_index_zval(JSON(the_zstack)[JSON(the_top)], mval); buf.len = 0; JSON_RESET_TYPE(); @@ -626,7 +631,7 @@ JSON(the_stack[JSON(the_top)]) == MODE_ARRAY)) { smart_str_0(&buf); -json_create_zval(&mval, &buf, type); +json_create_zval(&mval, &buf, type, num_as_string); } switch (JSON(the_stack)[JSON(the_top)]) { diff -u json/JSON_parser.h json/JSON_parser.h --- json_old/JSON_parser.h 2006-07-20 00:17:15.0 +0800 +++ json/JSON_parser.h 2008-10-22 16:32:56.0 +0800 @@ -3,4 +3,4 @@ #include "php.h" #include "ext/standard/php_smart_str.h" -extern int JSON_parser(zval *z, unsigned short p[], int length, int assoc TSRMLS_DC); +extern int JSON_parser(zval *z, unsigned short p[], int length, int assoc, int num_as_string TSRMLS_DC); diff -u json/json.c json/json.c --- json_old/json.c 2007-12-31 15:20:07.0 +0800 +++ json/json.c 2008-10-22 16:33:53.0 +0800 @@ -411,10 +411,11 @@ char *parameter; int parameter_len, utf16_len; zend_bool assoc = 0; /* return JS objects as PHP objects by default */ +zend_bool num_as_string = 0; /* don't decode integers and doubles as strings */ zval *z; unsigned short *utf16; -if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", ¶meter, ¶meter_len, &assoc) == FAILURE) { +if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bb", ¶meter, ¶meter_len, &assoc, &num_as_string) == FAILURE) { return; } @@ -437,7 +438,7 @@ } ALLOC_INIT_ZVAL(z); -if (JSON_parser(z, utf16, utf16_len, assoc TSRMLS_CC)) +if (JSON_parser(z, utf16, utf16_len, assoc, num_as_string TSRMLS_CC)) { *return_value = *z; [2008-10-22 08:57:16] 191919 at gmail dot com Description: json_decode lacks a 'num_as_string' feature. I made a patch which adds a third optional 'num_as_string' parameter to json_decode to force it to decode all numbers as strings. diff -u json_orig/JSON_parser.c json/JSON_parser.c --- json_orig/JSON_parser.c 2007-06-14 01:56:41.0 +0800 +++ json/JSON_parser.c 2008-10-22 16:33:32.0 +0800 @@ -278,10 +278,15 @@ } -static void json_create_zval(zval **z, smart_str *buf, int type) +static void json_create_zval(zval **z, smart_str *buf, int type, int num_as_string) { ALLOC_INIT_ZVAL(*z); +if (num_as_string) +{ +type = IS_STRING; +} + if (type == IS_LONG) { double d = zend_strtod(buf->c, NULL); @@ -399,7 +404,7 @@ machine with a stack. */ int -JSON_parser(zval *z, un