#35155 [Bgs-Opn]: prepared statement with blob field does not work
ID: 35155 User updated by: f dot engelhardt at 21torr dot com Reported By: f dot engelhardt at 21torr dot com -Status: Bogus +Status: Open Bug Type: MySQLi related Operating System: Linux 2.6 PHP Version: 5CVS-2005-11-09 (snap) Assigned To: georg New Comment: Well, i allready tried this: ?php mysqli_connect(..); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2'); $one = 1; $two = 2; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iis',$one,$two,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? Exaclty the same problem. Fix it. Kind Regards Florian Engelhardt Previous Comments: [2005-11-11 08:51:46] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php from http://www.php.net/mysql_stmt_bind_param Character Description b corresponding variable is a blob and will be send in packages For sending a blob in packages, you have to use mysql_stmt_send_long_data. If you don't want to do this (e.g. your data doesn't need escaping and is max_allowed_package) use type s (=string). [2005-11-09 16:07:10] f dot engelhardt at 21torr dot com This Problem is very annoying, becouse i am using innodb tables with foreign key constraints, and if i use mysqli_stmt_send_long_data() for any of the fields, all the other arent NULL anymore. So my constraint fails! Example: ?php $GLOBALS['CONN'] = mysqli_connect(...); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2') ; $one = NULL; $two = NULL; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iib',$one,$two,$s); //mysqli_stmt_send_long_data($stmt,2,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? without mysqli_stmt_send_long_data() i have the problem as described, and with mysqli_stmt_send_long_data() on the blob field, mysql tells me, that the constraint gets violated! This can only happen, if the variables $one and $two are not NULL. [2005-11-08 23:28:54] [EMAIL PROTECTED] Assigned to the maintainer. [2005-11-08 23:26:59] f dot engelhardt at 21torr dot com it doesn´t work, but the behavior changed a little: Every insert without mysqli_stmt_send_long_data() inserts 0 Bytes into the blob field, with this function it works as in the other version (5.0.5) [2005-11-08 17:43:53] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip 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/35155 -- Edit this bug report at http://bugs.php.net/?id=35155edit=1
#35191 [NEW]: SHA-256 support
From: lauris at nix dot lv Operating system: PHP version: 6CVS-2005-11-11 (CVS) PHP Bug Type: Feature/Change Request Bug description: SHA-256 support Description: It would be realy usefull to include sha256 hashing function because md5 and sha1 aren't so secure nowdays. And there are a lot of sha256 implementations that can be used! So there is nothing new to invent :) -- Edit bug report at http://bugs.php.net/?id=35191edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35191r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35191r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35191r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35191r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35191r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35191r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35191r=needscript Try newer version: http://bugs.php.net/fix.php?id=35191r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35191r=support Expected behavior: http://bugs.php.net/fix.php?id=35191r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35191r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35191r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35191r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35191r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35191r=dst IIS Stability: http://bugs.php.net/fix.php?id=35191r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35191r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35191r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35191r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35191r=mysqlcfg
#35192 [NEW]: Session save not triggered
From: uap-php at cheeky dot org Operating system: Linux - FC 4 PHP version: 5.0.5 PHP Bug Type: Session related Bug description: Session save not triggered Description: I think this has bug has been touched on before but never resolved. If you have register_long_arrays=off in your ini file, $_SESSION stuff does work, apart from when you iterate over it. It seems that if you iterate over $_SESSION, the session_save handler does not get called and the session data is not saved. If for example you wanted to empty all your session data and you did it by setting each session var seperatly, it works. If you iterate over $_SESSION, set each $_SESSION[$key]=''; The session data will not get saved. Reproduce code: --- see http://php.lollyposh.com/session_test.phps Expected result: If run with register_long_arrays=off or on, the value of $_SESSION['search_test'] should be '' Actual result: -- If run with register_long_arrays=off, the value of $_SESSION['search_test'] will be 'hello!' If run with register_long_arrays=on, the value of $_SESSION['search_test'] will be '' -- Edit bug report at http://bugs.php.net/?id=35192edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35192r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35192r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35192r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35192r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35192r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35192r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35192r=needscript Try newer version: http://bugs.php.net/fix.php?id=35192r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35192r=support Expected behavior: http://bugs.php.net/fix.php?id=35192r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35192r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35192r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35192r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35192r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35192r=dst IIS Stability: http://bugs.php.net/fix.php?id=35192r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35192r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35192r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35192r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35192r=mysqlcfg
#35155 [Opn]: prepared statement with blob field does not work
ID: 35155 User updated by: f dot engelhardt at 21torr dot com Reported By: f dot engelhardt at 21torr dot com Status: Open Bug Type: MySQLi related Operating System: Linux 2.6 PHP Version: 5CVS-2005-11-09 (snap) Assigned To: georg New Comment: Hello, i have a hint for you: The size inserted into the database is exactly the size, that strlen() returns, BUT: strlen stops on the first \0 and in a real binary file, this sign can be everywhere, not just at the end. In your case, i found this: php-5.0.5/ext/mysqli/mysqli_api.c:161 case 's': /* string */ bind[ofs].buffer_type = MYSQL_TYPE_VAR_STRING; bind[ofs].buffer = NULL; bind[ofs].buffer_length = 0; bind[ofs].is_null = stmt-param.is_null[ofs]; I tried this, and i found out, that it works with MYSQL_TYPE_VAR_STRING, but you have to specify the length. If i insert the right lengt, everything works as expected. So you just have to define the length for the data that is in the bound variable. Kind regards Florian Engelhardt Previous Comments: [2005-11-11 09:55:55] f dot engelhardt at 21torr dot com Well, i allready tried this: ?php mysqli_connect(..); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2'); $one = 1; $two = 2; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iis',$one,$two,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? Exaclty the same problem. Fix it. Kind Regards Florian Engelhardt [2005-11-11 08:51:46] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php from http://www.php.net/mysql_stmt_bind_param Character Description b corresponding variable is a blob and will be send in packages For sending a blob in packages, you have to use mysql_stmt_send_long_data. If you don't want to do this (e.g. your data doesn't need escaping and is max_allowed_package) use type s (=string). [2005-11-09 16:07:10] f dot engelhardt at 21torr dot com This Problem is very annoying, becouse i am using innodb tables with foreign key constraints, and if i use mysqli_stmt_send_long_data() for any of the fields, all the other arent NULL anymore. So my constraint fails! Example: ?php $GLOBALS['CONN'] = mysqli_connect(...); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2') ; $one = NULL; $two = NULL; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iib',$one,$two,$s); //mysqli_stmt_send_long_data($stmt,2,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? without mysqli_stmt_send_long_data() i have the problem as described, and with mysqli_stmt_send_long_data() on the blob field, mysql tells me, that the constraint gets violated! This can only happen, if the variables $one and $two are not NULL. [2005-11-08 23:28:54] [EMAIL PROTECTED] Assigned to the maintainer. [2005-11-08 23:26:59] f dot engelhardt at 21torr dot com it doesn´t work, but the behavior changed a little: Every insert without mysqli_stmt_send_long_data() inserts 0 Bytes into the blob field, with this function it works as in the other version (5.0.5) 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/35155 -- Edit this bug report at http://bugs.php.net/?id=35155edit=1
#35155 [Opn]: prepared statement with blob field does not work
ID: 35155 User updated by: f dot engelhardt at 21torr dot com Reported By: f dot engelhardt at 21torr dot com Status: Open Bug Type: MySQLi related Operating System: Linux 2.6 PHP Version: 5CVS-2005-11-09 (snap) Assigned To: georg New Comment: case MYSQL_TYPE_VAR_STRING: convert_to_string_ex(stmt-param.vars[i]); stmt-stmt-params[i].buffer = Z_STRVAL_PP(stmt-param.vars[i]); stmt-stmt-params[i].buffer_length = strlen(Z_STRVAL_PP(stmt-param.vars[i])); break; php-5.0.5/ext/mysqli/mysqli_api.c:574 This line is the problem, you can not use strlen to read the length of binary data, or this convert_to_string_ex() function destroys the data. Kind regards Florian Engelhardt Previous Comments: [2005-11-11 11:18:27] f dot engelhardt at 21torr dot com Hello, i have a hint for you: The size inserted into the database is exactly the size, that strlen() returns, BUT: strlen stops on the first \0 and in a real binary file, this sign can be everywhere, not just at the end. In your case, i found this: php-5.0.5/ext/mysqli/mysqli_api.c:161 case 's': /* string */ bind[ofs].buffer_type = MYSQL_TYPE_VAR_STRING; bind[ofs].buffer = NULL; bind[ofs].buffer_length = 0; bind[ofs].is_null = stmt-param.is_null[ofs]; I tried this, and i found out, that it works with MYSQL_TYPE_VAR_STRING, but you have to specify the length. If i insert the right lengt, everything works as expected. So you just have to define the length for the data that is in the bound variable. Kind regards Florian Engelhardt [2005-11-11 09:55:55] f dot engelhardt at 21torr dot com Well, i allready tried this: ?php mysqli_connect(..); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2'); $one = 1; $two = 2; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iis',$one,$two,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? Exaclty the same problem. Fix it. Kind Regards Florian Engelhardt [2005-11-11 08:51:46] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php from http://www.php.net/mysql_stmt_bind_param Character Description b corresponding variable is a blob and will be send in packages For sending a blob in packages, you have to use mysql_stmt_send_long_data. If you don't want to do this (e.g. your data doesn't need escaping and is max_allowed_package) use type s (=string). [2005-11-09 16:07:10] f dot engelhardt at 21torr dot com This Problem is very annoying, becouse i am using innodb tables with foreign key constraints, and if i use mysqli_stmt_send_long_data() for any of the fields, all the other arent NULL anymore. So my constraint fails! Example: ?php $GLOBALS['CONN'] = mysqli_connect(...); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2') ; $one = NULL; $two = NULL; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iib',$one,$two,$s); //mysqli_stmt_send_long_data($stmt,2,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? without mysqli_stmt_send_long_data() i have the problem as described, and with mysqli_stmt_send_long_data() on the blob field, mysql tells me, that the constraint gets violated! This can only happen, if the variables $one and $two are not NULL. [2005-11-08 23:28:54] [EMAIL PROTECTED] Assigned to the maintainer. 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/35155 -- Edit this bug report at http://bugs.php.net/?id=35155edit=1
#35191 [Opn-Csd]: SHA-256 support
ID: 35191 Updated by: [EMAIL PROTECTED] Reported By: lauris at nix dot lv -Status: Open +Status: Closed Bug Type:Feature/Change Request PHP Version: 6CVS-2005-11-11 (CVS) New Comment: Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php SHA1 is unsecure? I never have read anything like that. The news were only saying that some guys think that in theory it maybe possible to guess the keys in a reasonable time with a huge processing power if you new something about the hashed stuff. More or less the same goes for MD5 only it is shorter, so the computation power needed is less and knowing something about the hashed stff is worth much more than with SHA1. Still having SHA256 would be good. Look for mhash. And look for extension mhash and MHASH_SHA256. Previous Comments: [2005-11-11 10:46:10] lauris at nix dot lv Description: It would be realy usefull to include sha256 hashing function because md5 and sha1 aren't so secure nowdays. And there are a lot of sha256 implementations that can be used! So there is nothing new to invent :) -- Edit this bug report at http://bugs.php.net/?id=35191edit=1
#30335 [Com]: fgetcsv + foreign characters
ID: 30335 Comment by: mdv at inyourpocket dot com Reported By: gruszczol1 at poczta dot onet dot pl Status: No Feedback Bug Type: Filesystem function related Operating System: linux PHP Version: 5.0.2 New Comment: it looks that fgetcsv depends on locales ?php $argv[1] = './x.txt'; if (!($fd = fopen($argv[1], 'r'))) die('Can\'t open file'); while (!feof($fd)) echo fgets($fd, 4096); fclose($fd); if (!($fd = fopen($argv[1], 'r'))) die('Can\'t open file'); while (($l = fgetcsv($fd, 4096, \t))) print_r($l); fclose($fd); ? x.txt get here http://lampa.naut.cz/x.txt (text contains text windows-1250 encoding aa©\t©vvv \t is TAB) result when locale POSIX: aa©©vvv Array ( [0] = aa© [1] = vvv ) result when locale cs_CZ: aa©©vvv Array ( [0] = aa© [1] = ©vvv ) Previous Comments: [2004-10-16 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 17:15:23] [EMAIL PROTECTED] Try setting LC_CTYPE (or LANG) environment variable to pl_PL.ISO-8859-2. [2004-10-07 01:38:48] [EMAIL PROTECTED] Specific to 5.X [2004-10-06 11:40:37] gruszczol1 at poczta dot onet dot pl It was tested with iso-8859-2 and windows-1250 text file. http://republika.pl/gruszczol1/fgetcsv_bug_example.tgz [2004-10-06 10:32:21] [EMAIL PROTECTED] This example is useles, as we don't know which encoding you are using. Please put this script in a zip file and provide the link to it in this bugreport. 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/30335 -- Edit this bug report at http://bugs.php.net/?id=30335edit=1
#30335 [Com]: fgetcsv + foreign characters
ID: 30335 Comment by: mdv at inyourpocket dot com Reported By: gruszczol1 at poczta dot onet dot pl Status: No Feedback Bug Type: Filesystem function related Operating System: linux PHP Version: 5.0.2 New Comment: i tested in on php 5.0.5 Previous Comments: [2005-11-11 13:49:51] mdv at inyourpocket dot com it looks that fgetcsv depends on locales ?php $argv[1] = './x.txt'; if (!($fd = fopen($argv[1], 'r'))) die('Can\'t open file'); while (!feof($fd)) echo fgets($fd, 4096); fclose($fd); if (!($fd = fopen($argv[1], 'r'))) die('Can\'t open file'); while (($l = fgetcsv($fd, 4096, \t))) print_r($l); fclose($fd); ? x.txt get here http://lampa.naut.cz/x.txt (text contains text windows-1250 encoding aa©\t©vvv \t is TAB) result when locale POSIX: aa©©vvv Array ( [0] = aa© [1] = vvv ) result when locale cs_CZ: aa©©vvv Array ( [0] = aa© [1] = ©vvv ) [2004-10-16 01:00:02] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to Open. [2004-10-07 17:15:23] [EMAIL PROTECTED] Try setting LC_CTYPE (or LANG) environment variable to pl_PL.ISO-8859-2. [2004-10-07 01:38:48] [EMAIL PROTECTED] Specific to 5.X [2004-10-06 11:40:37] gruszczol1 at poczta dot onet dot pl It was tested with iso-8859-2 and windows-1250 text file. http://republika.pl/gruszczol1/fgetcsv_bug_example.tgz 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/30335 -- Edit this bug report at http://bugs.php.net/?id=30335edit=1
#35189 [Opn-Asn]: Date Function Bug
ID: 35189 Updated by: [EMAIL PROTECTED] Reported By: php at splitstreamdesign dot com -Status: Open +Status: Assigned Bug Type: Date/time related Operating System: Windows 2000/XP PHP Version: 5.0.5 -Assigned To: +Assigned To: derick New Comment: Derick, is this a bug or just another Window$ feature? Previous Comments: [2005-11-11 07:44:52] php at splitstreamdesign dot com Description: The documentation for the date() function states that the 'T' parameter for the format string prints the timezone abbreviation: Examples: EST, MDT Both PHP 5.0.4 and 5.0.5 replace 'T' with the full string Eastern Standard Time on both Windows 2000 Windows XP servers. Reproduce code: --- ? echo date(D, d M Y H:i:s T); ? Expected result: Fri, 11 Nov 2005 01:37:23 EST Actual result: -- Fri, 11 Nov 2005 01:37:23 Eastern Standard Time -- Edit this bug report at http://bugs.php.net/?id=35189edit=1
#35183 [Fbk-Opn]: write into mysql with utf8 not right
ID: 35183 User updated by: lzx21cn at 21cn dot com -Summary: write into mysql with utf8 not Reported By: lzx21cn at 21cn dot com -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: debian testing accuracy PHP Version: 4.4.1 New Comment: you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? Previous Comments: [2005-11-10 17:24:09] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2005-11-10 16:36:28] lzx21cn at 21cn dot com Description: write in mysql by utf8 it is wrong! Reproduce code: --- 1.modify php.ini ... mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 mbstring.detect_order = UTF-8 2. php file (utf8) $sql=insert into test1 values(2,'å大ç空');; mysql_query($sql); Expected result: *record where id=1 is inputed in gnome-terminal command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | å大ç空 -- Actual result: -- command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | (something character which I unknow) -- -- Edit this bug report at http://bugs.php.net/?id=35183edit=1
#35194 [NEW]: child pid exit signal illegal instruction
From: mginsburg at collaborativefusion dot com Operating system: FreeBSD 5.3 PHP version: 5.0.5 PHP Bug Type: Apache2 related Bug description: child pid exit signal illegal instruction Description: I recently upgraded php from 5.0.3 to 5.0.5 and a piece of proprietary php software that I was running, now will not run. The error in the http-error.log is [notice] child pid 10398 exit signal Illegal instruction (4) Due to the software functioning on 5.0.3 I do not think that it could be a code error. Reproduce code: --- http://www.imnotgonnalie.com/ginny/SugarBean.php.txt The error is caused somewhere in the constructor (line 88) Actual result: -- PHP exits on error [notice] child pid 10398 exit signal Illegal instruction (4) -- Edit bug report at http://bugs.php.net/?id=35194edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35194r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35194r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35194r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35194r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35194r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35194r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35194r=needscript Try newer version: http://bugs.php.net/fix.php?id=35194r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35194r=support Expected behavior: http://bugs.php.net/fix.php?id=35194r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35194r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35194r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35194r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35194r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35194r=dst IIS Stability: http://bugs.php.net/fix.php?id=35194r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35194r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35194r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35194r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35194r=mysqlcfg
#35183 [Opn]: write into mysql with utf8 not right
ID: 35183 User updated by: lzx21cn at 21cn dot com Reported By: lzx21cn at 21cn dot com Status: Open Bug Type: MySQL related -Operating System: debian testing accuracy +Operating System: linux debian unstable PHP Version: 4.4.1 New Comment: sorry, 1st comment file is error This is you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); mysql_close(); ? Previous Comments: [2005-11-11 16:34:31] lzx21cn at 21cn dot com you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? [2005-11-10 17:24:09] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2005-11-10 16:36:28] lzx21cn at 21cn dot com Description: write in mysql by utf8 it is wrong! Reproduce code: --- 1.modify php.ini ... mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 mbstring.detect_order = UTF-8 2. php file (utf8) $sql=insert into test1 values(2,'å大ç空');; mysql_query($sql); Expected result: *record where id=1 is inputed in gnome-terminal command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | å大ç空 -- Actual result: -- command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | (something character which I unknow) -- -- Edit this bug report at http://bugs.php.net/?id=35183edit=1
#35194 [Opn-Fbk]: child pid exit signal illegal instruction
ID: 35194 Updated by: [EMAIL PROTECTED] Reported By: mginsburg at collaborativefusion dot com -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: FreeBSD 5.3 PHP Version: 5.0.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2005-11-11 16:38:21] mginsburg at collaborativefusion dot com Description: I recently upgraded php from 5.0.3 to 5.0.5 and a piece of proprietary php software that I was running, now will not run. The error in the http-error.log is [notice] child pid 10398 exit signal Illegal instruction (4) Due to the software functioning on 5.0.3 I do not think that it could be a code error. Reproduce code: --- http://www.imnotgonnalie.com/ginny/SugarBean.php.txt The error is caused somewhere in the constructor (line 88) Actual result: -- PHP exits on error [notice] child pid 10398 exit signal Illegal instruction (4) -- Edit this bug report at http://bugs.php.net/?id=35194edit=1
#35183 [Opn-Fbk]: write into mysql with utf8 not right
ID: 35183 Updated by: [EMAIL PROTECTED] Reported By: lzx21cn at 21cn dot com -Status: Open +Status: Feedback Bug Type: MySQL related Operating System: linux debian unstable PHP Version: 4.4.1 New Comment: Try to do the same without PHP (using the console interface of MySQL) and see if it works this way. If it does, put the code somewhere in the Net and paste the link here, so the Unicode data won't be corrupted by the bug system. Also add the expected and actual results, I doubt I can guess them myself. And try to explain why do you think it's a problem of PHP, not MySQL or something else (I'd be glad if you try to use something close to English to do that). Previous Comments: [2005-11-11 16:41:04] lzx21cn at 21cn dot com sorry, 1st comment file is error This is you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); mysql_close(); ? [2005-11-11 16:34:31] lzx21cn at 21cn dot com you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? [2005-11-10 17:24:09] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2005-11-10 16:36:28] lzx21cn at 21cn dot com Description: write in mysql by utf8 it is wrong! Reproduce code: --- 1.modify php.ini ... mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 mbstring.detect_order = UTF-8 2. php file (utf8) $sql=insert into test1 values(2,'å大ç空');; mysql_query($sql); Expected result: *record where id=1 is inputed in gnome-terminal command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | å大ç空 -- Actual result: -- command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | (something character which I unknow) -- -- Edit this bug report at http://bugs.php.net/?id=35183edit=1
#35195 [NEW]: pear install error
From: alman1 at wanadoo dot fr Operating system: linux centos-4.0 PHP version: 5CVS-2005-11-11 (snap) PHP Bug Type: Unknown/Other Function Bug description: pear install error Description: this happens during make install, pear installer fails config options are... ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pgsql --with-pdo-pgsql --with-pdo-mysql=/usr/local/mysql --with-zlib --enable-ftp --enable-shmop --with-xmlrpc --with-curl=/usr --with-openssl --enable-exif --enable-soap Reproduce code: --- ... Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar- installed: 1.3.1 [PEAR] Console_Getopt - installed: 1.2 pear/PEAR can optionally use package pear/XML_RPC (version = 1.4.0) Warning: PEAR_Installer_Role::factory(PEAR/Installer/Role/Php.php): failed to open stream: No such file or directory in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 Fatal error: PEAR_Installer_Role::factory(): Failed opening required 'PEAR/Installer/Role/Php.php' (include_path='.:/usr/local/lib/php') in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 make[1]: *** [install-pear-installer] Error 255 make: *** [install-pear] Error 2 -- Edit bug report at http://bugs.php.net/?id=35195edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35195r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35195r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35195r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35195r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35195r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35195r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35195r=needscript Try newer version: http://bugs.php.net/fix.php?id=35195r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35195r=support Expected behavior: http://bugs.php.net/fix.php?id=35195r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35195r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35195r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35195r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35195r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35195r=dst IIS Stability: http://bugs.php.net/fix.php?id=35195r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35195r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35195r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35195r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35195r=mysqlcfg
#34362 [Opn-Fbk]: mb-related functionality fails in main/rfc1867.c
ID: 34362 Updated by: [EMAIL PROTECTED] Reported By: demiurg at gmail dot com -Status: Open +Status: Feedback Bug Type: Compile Failure Operating System: Linux PHP Version: 6CVS-2005-10-08 (CVS) New Comment: Try latest snapshot Previous Comments: [2005-09-04 01:11:49] demiurg at gmail dot com Description: the multybyte strings extension is being compiled into the PHP, so the macro SAFE_RETURN tries to execute an mb-related code which is not correct. Actual result: -- [...]/php/main/rfc1867.c:1122: error: `num_vars' undeclared (first use in this function) -- Edit this bug report at http://bugs.php.net/?id=34362edit=1
#35195 [Opn-Asn]: pear install error
ID: 35195 Updated by: [EMAIL PROTECTED] Reported By: alman1 at wanadoo dot fr -Status: Open +Status: Assigned Bug Type: Unknown/Other Function Operating System: linux centos-4.0 PHP Version: 5CVS-2005-11-11 (snap) -Assigned To: +Assigned To: cellog New Comment: Greg, please check it out. Previous Comments: [2005-11-11 19:20:43] alman1 at wanadoo dot fr Description: this happens during make install, pear installer fails config options are... ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pgsql --with-pdo-pgsql --with-pdo-mysql=/usr/local/mysql --with-zlib --enable-ftp --enable-shmop --with-xmlrpc --with-curl=/usr --with-openssl --enable-exif --enable-soap Reproduce code: --- ... Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar- installed: 1.3.1 [PEAR] Console_Getopt - installed: 1.2 pear/PEAR can optionally use package pear/XML_RPC (version = 1.4.0) Warning: PEAR_Installer_Role::factory(PEAR/Installer/Role/Php.php): failed to open stream: No such file or directory in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 Fatal error: PEAR_Installer_Role::factory(): Failed opening required 'PEAR/Installer/Role/Php.php' (include_path='.:/usr/local/lib/php') in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 make[1]: *** [install-pear-installer] Error 255 make: *** [install-pear] Error 2 -- Edit this bug report at http://bugs.php.net/?id=35195edit=1
#35189 [Asn-WFx]: Date Function Bug
ID: 35189 Updated by: [EMAIL PROTECTED] Reported By: php at splitstreamdesign dot com -Status: Assigned +Status: Wont fix Bug Type: Date/time related Operating System: Windows 2000/XP PHP Version: 5.0.5 Assigned To: derick New Comment: This is a feature, which is addressed in PHP 5.1 and higher. It will not be changed from older versions. Previous Comments: [2005-11-11 15:44:41] [EMAIL PROTECTED] Derick, is this a bug or just another Window$ feature? [2005-11-11 07:44:52] php at splitstreamdesign dot com Description: The documentation for the date() function states that the 'T' parameter for the format string prints the timezone abbreviation: Examples: EST, MDT Both PHP 5.0.4 and 5.0.5 replace 'T' with the full string Eastern Standard Time on both Windows 2000 Windows XP servers. Reproduce code: --- ? echo date(D, d M Y H:i:s T); ? Expected result: Fri, 11 Nov 2005 01:37:23 EST Actual result: -- Fri, 11 Nov 2005 01:37:23 Eastern Standard Time -- Edit this bug report at http://bugs.php.net/?id=35189edit=1
#35196 [NEW]: x86_64 mysql rpms put libraries in lib64 and php doesn't look for it
From: aschultz at npowrcorp dot com Operating system: RHEL 4 PHP version: 4.4.1 PHP Bug Type: Compile Failure Bug description: x86_64 mysql rpms put libraries in lib64 and php doesn't look for it Description: After installing MySQL 5.0 using the x86_64 rpms from MySQL's website, I tried to compile php using the --with-mysql=/usr/ option. It fails because it's unable to find the libraries. I was able to track this problem down to a line in the configure script. The configure script does not search for libraries in lib64. See line 61571 of php-4.4.1/configure (line 61692 of php4-STABLE-20051741/configure). It needs to be changed from for i in lib lib/mysql; do to for i in lib64 lib lib64/mysql lib/mysql; do note: this has been reported multiple times for 5.0.x (bug# 28150), but not for 4.x. Also it appears no one wants to make the simple fix of looking in lib64 :/ Reproduce code: --- rpm -ivh MySQL-client-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-devel-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-server-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-shared-standard-5.0.15-0.rhel4.x86_64.rpm tar xvzf php-4.4.1.tar.gz cd php-4.4.1 ./configure --with-mysql=/usr/ Expected result: It should find the library under /usr/lib64. After modifying the configure script it works. Here's the diff: [EMAIL PROTECTED] php-4.4.1]# diff configure.orig configure 61571c61571 for i in lib lib/mysql; do --- for i in lib64 lib lib64/mysql lib/mysql; do Here's the results after modification [EMAIL PROTECTED] php-4.4.1]# ./configure --with-mysql=/usr/ loading cache ./config.cache checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for re2c... exit 0; checking whether ln -s works... yes checking for gawk... gawk checking for bison... no checking for byacc... no configure: warning: You will need bison if you want to regenerate the PHP parsers. checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for working const... yes checking flex version... 2.5.4 (ok) checking whether byte ordering is bigendian... no checking whether to force non-PIC code in shared modules... no checking for pthreads_cflags... -pthread checking for pthreads_lib... Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking for mod_charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... no checking for Caudium support... no checking for CLI build... yes checking for embedded SAPI library support... no checking for Zeus ISAPI support... no checking for NSAPI support... no checking for PHTTPD support... no checking for Pi3Web support... no checking for Roxen/Pike support... no checking for Servlet support... no checking for thttpd... no checking for TUX... no checking for webjames... no checking for CGI build... yes checking whether writing to stdout works... This is the test message -- yes checking whether to force Apache CGI redirect... no checking whether to discard path_info + path_translated... no checking whether to enable path info checking... yes checking whether to enable fastcgi support... no checking for chosen SAPI module... cgi Running system checks checking for missing declarations of reentrant functions... done checking for sendmail... /usr/sbin/sendmail checking whether system uses EBCDIC... no checking for socket... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... no checking for __yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for dlopen... no checking for __dlopen... no checking for dlopen in -ldl... yes checking for sin in -lm... yes checking for res_search... no checking for __res_search... no checking for res_search in -lresolv... no checking for __res_search in -lresolv... yes checking for inet_aton... yes checking for dn_skipname... no checking for __dn_skipname... yes checking for ANSI C header files... yes checking for dirent.h that defines DIR... yes checking for opendir in -ldir... no checking for fclose declaration... ok checking for inttypes.h... yes checking for stdint.h... yes checking for dirent.h... yes checking for
#34362 [Fbk-Csd]: mb-related functionality fails in main/rfc1867.c
ID: 34362 User updated by: demiurg at gmail dot com Reported By: demiurg at gmail dot com -Status: Feedback +Status: Closed Bug Type: Compile Failure Operating System: Linux PHP Version: 6CVS-2005-10-08 (CVS) New Comment: It compiles well now. Thanks! Previous Comments: [2005-11-11 19:21:19] [EMAIL PROTECTED] Try latest snapshot [2005-09-04 01:11:49] demiurg at gmail dot com Description: the multybyte strings extension is being compiled into the PHP, so the macro SAFE_RETURN tries to execute an mb-related code which is not correct. Actual result: -- [...]/php/main/rfc1867.c:1122: error: `num_vars' undeclared (first use in this function) -- Edit this bug report at http://bugs.php.net/?id=34362edit=1
#35197 [NEW]: Destructor not called
From: xmlfrance at gmail dot com Operating system: Debian DNU/Linux PHP version: 5.1.0RC4 PHP Bug Type: Scripting Engine problem Bug description: Destructor not called Description: My classes extending DOMDocument don't call the destructor. Reproduce code: --- ?php class Foo extends DOMDocument { function __construct() { print('Construction'); } function __destruct() { print('Destruction'); } } $o = new Foo; /* I've also tried unset($o) */ ? Expected result: ConstructionDestruction Actual result: -- Construction -- Edit bug report at http://bugs.php.net/?id=35197edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35197r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35197r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35197r=trysnapshot51 Fixed in CVS:http://bugs.php.net/fix.php?id=35197r=fixedcvs Fixed in release:http://bugs.php.net/fix.php?id=35197r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35197r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35197r=needscript Try newer version: http://bugs.php.net/fix.php?id=35197r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35197r=support Expected behavior: http://bugs.php.net/fix.php?id=35197r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35197r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35197r=submittedtwice register_globals:http://bugs.php.net/fix.php?id=35197r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35197r=php3 Daylight Savings:http://bugs.php.net/fix.php?id=35197r=dst IIS Stability: http://bugs.php.net/fix.php?id=35197r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35197r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35197r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35197r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35197r=mysqlcfg
#35197 [Opn-Asn]: Destructor not called
ID: 35197 Updated by: [EMAIL PROTECTED] Reported By: xmlfrance at gmail dot com -Status: Open +Status: Assigned -Bug Type: Scripting Engine problem +Bug Type: DOM XML related Operating System: Debian DNU/Linux PHP Version: 5.1.0RC4 -Assigned To: +Assigned To: chregu New Comment: Christian, please have a look at it. Previous Comments: [2005-11-11 21:59:27] xmlfrance at gmail dot com Description: My classes extending DOMDocument don't call the destructor. Reproduce code: --- ?php class Foo extends DOMDocument { function __construct() { print('Construction'); } function __destruct() { print('Destruction'); } } $o = new Foo; /* I've also tried unset($o) */ ? Expected result: ConstructionDestruction Actual result: -- Construction -- Edit this bug report at http://bugs.php.net/?id=35197edit=1
#35196 [Opn-WFx]: x86_64 mysql rpms put libraries in lib64 and php doesn't look for it
ID: 35196 Updated by: [EMAIL PROTECTED] Reported By: aschultz at npowrcorp dot com -Status: Open +Status: Wont fix Bug Type: Compile Failure Operating System: RHEL 4 PHP Version: 4.4.1 New Comment: It's fixed in PHP 5.1 and won't be backported to the old branches. Previous Comments: [2005-11-11 19:51:04] aschultz at npowrcorp dot com Description: After installing MySQL 5.0 using the x86_64 rpms from MySQL's website, I tried to compile php using the --with-mysql=/usr/ option. It fails because it's unable to find the libraries. I was able to track this problem down to a line in the configure script. The configure script does not search for libraries in lib64. See line 61571 of php-4.4.1/configure (line 61692 of php4-STABLE-20051741/configure). It needs to be changed from for i in lib lib/mysql; do to for i in lib64 lib lib64/mysql lib/mysql; do note: this has been reported multiple times for 5.0.x (bug# 28150), but not for 4.x. Also it appears no one wants to make the simple fix of looking in lib64 :/ Reproduce code: --- rpm -ivh MySQL-client-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-devel-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-server-standard-5.0.15-0.rhel4.x86_64.rpm \ MySQL-shared-standard-5.0.15-0.rhel4.x86_64.rpm tar xvzf php-4.4.1.tar.gz cd php-4.4.1 ./configure --with-mysql=/usr/ Expected result: It should find the library under /usr/lib64. After modifying the configure script it works. Here's the diff: [EMAIL PROTECTED] php-4.4.1]# diff configure.orig configure 61571c61571 for i in lib lib/mysql; do --- for i in lib64 lib lib64/mysql lib/mysql; do Here's the results after modification [EMAIL PROTECTED] php-4.4.1]# ./configure --with-mysql=/usr/ loading cache ./config.cache checking host system type... x86_64-unknown-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for re2c... exit 0; checking whether ln -s works... yes checking for gawk... gawk checking for bison... no checking for byacc... no configure: warning: You will need bison if you want to regenerate the PHP parsers. checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for working const... yes checking flex version... 2.5.4 (ok) checking whether byte ordering is bigendian... no checking whether to force non-PIC code in shared modules... no checking for pthreads_cflags... -pthread checking for pthreads_lib... Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking for mod_charset compatibility option... no checking for Apache 2.0 filter-module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... no checking for Caudium support... no checking for CLI build... yes checking for embedded SAPI library support... no checking for Zeus ISAPI support... no checking for NSAPI support... no checking for PHTTPD support... no checking for Pi3Web support... no checking for Roxen/Pike support... no checking for Servlet support... no checking for thttpd... no checking for TUX... no checking for webjames... no checking for CGI build... yes checking whether writing to stdout works... This is the test message -- yes checking whether to force Apache CGI redirect... no checking whether to discard path_info + path_translated... no checking whether to enable path info checking... yes checking whether to enable fastcgi support... no checking for chosen SAPI module... cgi Running system checks checking for missing declarations of reentrant functions... done checking for sendmail... /usr/sbin/sendmail checking whether system uses EBCDIC... no checking for socket... yes checking for htonl... yes checking for gethostname... yes checking for gethostbyaddr... yes checking for yp_get_default_domain... no checking for __yp_get_default_domain... no checking for yp_get_default_domain in -lnsl... yes checking for dlopen... no checking for __dlopen... no checking for dlopen in -ldl... yes checking for sin in -lm... yes checking for res_search... no checking for __res_search... no checking for res_search in -lresolv... no checking for __res_search in -lresolv... yes checking for inet_aton... yes checking for dn_skipname... no checking for __dn_skipname... yes checking for
#35192 [Opn-Fbk]: Session save not triggered
ID: 35192 Updated by: [EMAIL PROTECTED] Reported By: uap-php at cheeky dot org -Status: Open +Status: Feedback Bug Type: Session related Operating System: Linux - FC 4 PHP Version: 5.0.5 New Comment: Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip Previous Comments: [2005-11-11 11:06:12] uap-php at cheeky dot org Description: I think this has bug has been touched on before but never resolved. If you have register_long_arrays=off in your ini file, $_SESSION stuff does work, apart from when you iterate over it. It seems that if you iterate over $_SESSION, the session_save handler does not get called and the session data is not saved. If for example you wanted to empty all your session data and you did it by setting each session var seperatly, it works. If you iterate over $_SESSION, set each $_SESSION[$key]=''; The session data will not get saved. Reproduce code: --- see http://php.lollyposh.com/session_test.phps Expected result: If run with register_long_arrays=off or on, the value of $_SESSION['search_test'] should be '' Actual result: -- If run with register_long_arrays=off, the value of $_SESSION['search_test'] will be 'hello!' If run with register_long_arrays=on, the value of $_SESSION['search_test'] will be '' -- Edit this bug report at http://bugs.php.net/?id=35192edit=1
#21153 [Com]: readline won't be built as an external module
ID: 21153 Comment by: timharper at softhome dot net Reported By: oden dot eriksson at linux-mandrake dot com Status: No Feedback Bug Type: Readline related Operating System: Mandrake 9.0 PHP Version: 4.3.0RC4 New Comment: I had the same problem as described by jmdault Using: php-5.0.4 packed for fedora core 4 php-devel-5.0.4 (for phpize and other necessary tools) php-5.0.5 source (to build modules) -I extracted the source, and wanted to build the php module -I typed the following: cd php-5.0.5/ext/readline ./configure -on configure, this error came checking for readline in -lreadline... no configure: error: readline library not found (this is the same error as reported by jmdault) i had installed readline and readline-devel. I knew it was there. When running ld -lreadline, I would get this error: ld: warning: cannot find entry symbol _start; not setting start address /usr/lib/libreadline.so: undefined reference to `tgetnum' /usr/lib/libreadline.so: undefined reference to `tgoto' /usr/lib/libreadline.so: undefined reference to `tgetflag' /usr/lib/libreadline.so: undefined reference to `BC' /usr/lib/libreadline.so: undefined reference to `tputs' /usr/lib/libreadline.so: undefined reference to `PC' /usr/lib/libreadline.so: undefined reference to `tgetent' /usr/lib/libreadline.so: undefined reference to `UP' /usr/lib/libreadline.so: undefined reference to `tgetstr' It was then I realized the it wasn't properly linking the lncurses library when checking lreadline (not sure why) to fix it, I edited configure, and changed this line: LIBS=-lreadline $LIBS to this: LIBS=-lreadline -lncurses $LIBS I saved configure, and reran it, and configure worked. This is quite a hack, I'm sure... there has to be a better way to do it... but, maybe a patch would be in order? Previous Comments: [2003-03-14 09:46:56] Andrew dot Duka at oktet dot ru The same problem appears on the redhat boxes (7.3, 8.0). But solution is quite simple: to get readline support in PHP you need ncurses-devel package installed on your redhat box. This works on redhat-7.3 and 8.0 with PHP 4.3.1 and PHP4-200303141430 snapshot. [2003-02-20 07:59:56] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to Open. Thank you. [2003-02-10 21:14:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip And if it still fails, send me the config.log file. [2003-01-13 12:24:01] oden dot eriksson at linux-mandrake dot com No, it's because ncurses stuff isn't present in readline for Mandrake. I found the error and sent a patch a while back to the cooker list, it went ignored (that's not unusual). Well, here's the fix anyway: http://www.mandrake.com/en/archives/cooker/2002-12/msg01367.php Chears. [2003-01-12 16:00:37] fdragon at fdragon dot org This looks to be related to readline includes in /usr/include and the actualy libraries being installed in /lib so they are available for applications such as bash during boot up when /usr may not be available. 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/21153 -- Edit this bug report at http://bugs.php.net/?id=21153edit=1
#35079 [Asn]: stream_set_blocking(true) toggles, not enables blocking
ID: 35079 Updated by: [EMAIL PROTECTED] Reported By: askalski at gmail dot com Status: Assigned Bug Type: Filesystem function related Operating System: linux PHP Version: 5CVS-2005-11-03 (snap) Assigned To: wez New Comment: Wez, the proposed solution looks good to me. Please check it out. Previous Comments: [2005-11-03 21:43:31] [EMAIL PROTECTED] Assigned to the author of streams. [2005-11-03 18:56:39] askalski at gmail dot com Still broken. (php-200511031730) [2005-11-03 15:48:11] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2005-11-03 05:55:11] askalski at gmail dot com Description: main/streams/plain_wrapper.c (5.0.5) main/streams.c (4.4 and earlier) In several places, the ^= operator is used to turn off a flag. This is incorrect. For example, stream_set_blocking() on a plain file hits this code in php_stdiop_set_option(): if (value) flags ^= O_NONBLOCK; else flags |= O_NONBLOCK; This should be: if (value) flags = ~O_NONBLOCK; else flags |= O_NONBLOCK; The same error is repeated elsewhere in the code. Reproduce code: --- $fp = fopen(test, w); stream_set_blocking($fp, true); stream_set_blocking($fp, true); stream_set_blocking($fp, true); stream_set_blocking($fp, true); fclose($fp); Expected result: The stream should remain in blocking mode throughout the script execution. Actual result: -- Here is abridged strace output showing the errant behavior. Notice how O_NONBLOCK is being turned on and off alternately. open(/home/askalski/test, O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4 fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 fcntl64(4, F_SETFL, O_WRONLY) = 0 fcntl64(4, F_SETFL, O_WRONLY|O_NONBLOCK) = 0 fcntl64(4, F_SETFL, O_WRONLY) = 0 close(4)= 0 -- Edit this bug report at http://bugs.php.net/?id=35079edit=1
#35189 [WFx]: Date Function Bug
ID: 35189 User updated by: php at splitstreamdesign dot com Reported By: php at splitstreamdesign dot com Status: Wont fix Bug Type: Date/time related Operating System: Windows 2000/XP PHP Version: 5.0.5 Assigned To: derick New Comment: So will this be fixed in 5.1, or be the same? Any estimate on when 5.1 will be released? Previous Comments: [2005-11-11 19:48:21] [EMAIL PROTECTED] This is a feature, which is addressed in PHP 5.1 and higher. It will not be changed from older versions. [2005-11-11 15:44:41] [EMAIL PROTECTED] Derick, is this a bug or just another Window$ feature? [2005-11-11 07:44:52] php at splitstreamdesign dot com Description: The documentation for the date() function states that the 'T' parameter for the format string prints the timezone abbreviation: Examples: EST, MDT Both PHP 5.0.4 and 5.0.5 replace 'T' with the full string Eastern Standard Time on both Windows 2000 Windows XP servers. Reproduce code: --- ? echo date(D, d M Y H:i:s T); ? Expected result: Fri, 11 Nov 2005 01:37:23 EST Actual result: -- Fri, 11 Nov 2005 01:37:23 Eastern Standard Time -- Edit this bug report at http://bugs.php.net/?id=35189edit=1
#35155 [Opn-Asn]: prepared statement with blob field does not work
ID: 35155 Updated by: [EMAIL PROTECTED] Reported By: f dot engelhardt at 21torr dot com -Status: Open +Status: Assigned Bug Type: MySQLi related Operating System: Linux 2.6 PHP Version: 5CVS-2005-11-09 (snap) Assigned To: georg New Comment: Georg, see the feedback. Previous Comments: [2005-11-11 11:33:32] f dot engelhardt at 21torr dot com case MYSQL_TYPE_VAR_STRING: convert_to_string_ex(stmt-param.vars[i]); stmt-stmt-params[i].buffer = Z_STRVAL_PP(stmt-param.vars[i]); stmt-stmt-params[i].buffer_length = strlen(Z_STRVAL_PP(stmt-param.vars[i])); break; php-5.0.5/ext/mysqli/mysqli_api.c:574 This line is the problem, you can not use strlen to read the length of binary data, or this convert_to_string_ex() function destroys the data. Kind regards Florian Engelhardt [2005-11-11 11:18:27] f dot engelhardt at 21torr dot com Hello, i have a hint for you: The size inserted into the database is exactly the size, that strlen() returns, BUT: strlen stops on the first \0 and in a real binary file, this sign can be everywhere, not just at the end. In your case, i found this: php-5.0.5/ext/mysqli/mysqli_api.c:161 case 's': /* string */ bind[ofs].buffer_type = MYSQL_TYPE_VAR_STRING; bind[ofs].buffer = NULL; bind[ofs].buffer_length = 0; bind[ofs].is_null = stmt-param.is_null[ofs]; I tried this, and i found out, that it works with MYSQL_TYPE_VAR_STRING, but you have to specify the length. If i insert the right lengt, everything works as expected. So you just have to define the length for the data that is in the bound variable. Kind regards Florian Engelhardt [2005-11-11 09:55:55] f dot engelhardt at 21torr dot com Well, i allready tried this: ?php mysqli_connect(..); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2'); $one = 1; $two = 2; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iis',$one,$two,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? Exaclty the same problem. Fix it. Kind Regards Florian Engelhardt [2005-11-11 08:51:46] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php from http://www.php.net/mysql_stmt_bind_param Character Description b corresponding variable is a blob and will be send in packages For sending a blob in packages, you have to use mysql_stmt_send_long_data. If you don't want to do this (e.g. your data doesn't need escaping and is max_allowed_package) use type s (=string). [2005-11-09 16:07:10] f dot engelhardt at 21torr dot com This Problem is very annoying, becouse i am using innodb tables with foreign key constraints, and if i use mysqli_stmt_send_long_data() for any of the fields, all the other arent NULL anymore. So my constraint fails! Example: ?php $GLOBALS['CONN'] = mysqli_connect(...); mysqli_select_db(..); $s = file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2') ; $one = NULL; $two = NULL; $q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)'; $stmt = mysqli_stmt_init($GLOBALS['CONN']); mysqli_stmt_prepare($stmt,$q); mysqli_stmt_bind_param($stmt,'iib',$one,$two,$s); //mysqli_stmt_send_long_data($stmt,2,$s); mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt); exit; ? without mysqli_stmt_send_long_data() i have the problem as described, and with mysqli_stmt_send_long_data() on the blob field, mysql tells me, that the constraint gets violated! This can only happen, if the variables $one and $two are not NULL. 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/35155 -- Edit this bug report at http://bugs.php.net/?id=35155edit=1
#35183 [Fbk-Opn]: write into mysql with utf8 not right
ID: 35183 User updated by: lzx21cn at 21cn dot com Reported By: lzx21cn at 21cn dot com -Status: Feedback +Status: Open Bug Type: MySQL related Operating System: linux debian unstable -PHP Version: 4.4.1 +PHP Version: 4.4.0-4 New Comment: do the same without PHP (using the console interface of MySQL in gnome-terminal --- drop table test1; create table test1(id int,name char(4)); insert into test1 values(1,'ç大欢å'); insert into test1 values(2,'å大ç空'); select * from test1; id | name 1 | ç大欢å 2 | å大ç空 --- the reslut is good! - Why do I think it's a problem of PHP, not MySQL 1st. read/write by console vs. by php by console: the result is right by php: the result is wrong,write four Chinese character and read only one chinese character back,and other character lost. 2nd. read Mysql by java vs. by php (creat record by console) by java: the result is right by php : the result is ? at field 'name' -- Previous Comments: [2005-11-11 18:24:31] [EMAIL PROTECTED] Try to do the same without PHP (using the console interface of MySQL) and see if it works this way. If it does, put the code somewhere in the Net and paste the link here, so the Unicode data won't be corrupted by the bug system. Also add the expected and actual results, I doubt I can guess them myself. And try to explain why do you think it's a problem of PHP, not MySQL or something else (I'd be glad if you try to use something close to English to do that). [2005-11-11 16:41:04] lzx21cn at 21cn dot com sorry, 1st comment file is error This is you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); mysql_close(); ? [2005-11-11 16:34:31] lzx21cn at 21cn dot com you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? [2005-11-10 17:24:09] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. [2005-11-10 16:36:28] lzx21cn at 21cn dot com Description: write in mysql by utf8 it is wrong! Reproduce code: --- 1.modify php.ini ... mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 mbstring.detect_order = UTF-8 2. php file (utf8) $sql=insert into test1 values(2,'å大ç空');; mysql_query($sql); Expected result: *record where id=1 is inputed in gnome-terminal command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | å大ç空 -- Actual result: -- command: mysql IN gnome-terminal (utf8) select * from test1; id | name 1 | ç大欢å 2 | (something character which I unknow) -- -- Edit this bug report at http://bugs.php.net/?id=35183edit=1
#35195 [Asn-Csd]: pear install error
ID: 35195 Updated by: [EMAIL PROTECTED] Reported By: alman1 at wanadoo dot fr -Status: Assigned +Status: Closed Bug Type: Unknown/Other Function Operating System: linux centos-4.0 PHP Version: 5CVS-2005-11-11 (snap) Assigned To: cellog 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. I had thought I fixed this, but there was a problem with the creation script for install-pear-nozlib.phar that slipped through. Now, I am sure I fixed it. Thanks for the report, the new install-pear-nozlib.phar will show up on pear.php.net in about an hour Previous Comments: [2005-11-11 19:28:39] [EMAIL PROTECTED] Greg, please check it out. [2005-11-11 19:20:43] alman1 at wanadoo dot fr Description: this happens during make install, pear installer fails config options are... ./configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pgsql --with-pdo-pgsql --with-pdo-mysql=/usr/local/mysql --with-zlib --enable-ftp --enable-shmop --with-xmlrpc --with-curl=/usr --with-openssl --enable-exif --enable-soap Reproduce code: --- ... Installing PEAR environment: /usr/local/lib/php/ [PEAR] Archive_Tar- installed: 1.3.1 [PEAR] Console_Getopt - installed: 1.2 pear/PEAR can optionally use package pear/XML_RPC (version = 1.4.0) Warning: PEAR_Installer_Role::factory(PEAR/Installer/Role/Php.php): failed to open stream: No such file or directory in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 Fatal error: PEAR_Installer_Role::factory(): Failed opening required 'PEAR/Installer/Role/Php.php' (include_path='.:/usr/local/lib/php') in phar://install-pear-nozlib.phar/PEAR/Installer/Role.php on line 80 make[1]: *** [install-pear-installer] Error 255 make: *** [install-pear] Error 2 -- Edit this bug report at http://bugs.php.net/?id=35195edit=1
#35183 [Opn]: write into mysql with utf8 not right
ID: 35183 User updated by: lzx21cn at 21cn dot com Reported By: lzx21cn at 21cn dot com Status: Open Bug Type: MySQL related Operating System: linux debian unstable PHP Version: 4.4.0-4 New Comment: The problem maybe Data truncation When php write to mysql but I do not know resolve it Previous Comments: [2005-11-12 02:03:39] lzx21cn at 21cn dot com do the same without PHP (using the console interface of MySQL in gnome-terminal --- drop table test1; create table test1(id int,name char(4)); insert into test1 values(1,'ç大欢å'); insert into test1 values(2,'å大ç空'); select * from test1; id | name 1 | ç大欢å 2 | å大ç空 --- the reslut is good! - Why do I think it's a problem of PHP, not MySQL 1st. read/write by console vs. by php by console: the result is right by php: the result is wrong,write four Chinese character and read only one chinese character back,and other character lost. 2nd. read Mysql by java vs. by php (creat record by console) by java: the result is right by php : the result is ? at field 'name' -- [2005-11-11 18:24:31] [EMAIL PROTECTED] Try to do the same without PHP (using the console interface of MySQL) and see if it works this way. If it does, put the code somewhere in the Net and paste the link here, so the Unicode data won't be corrupted by the bug system. Also add the expected and actual results, I doubt I can guess them myself. And try to explain why do you think it's a problem of PHP, not MySQL or something else (I'd be glad if you try to use something close to English to do that). [2005-11-11 16:41:04] lzx21cn at 21cn dot com sorry, 1st comment file is error This is you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); mysql_close(); ? [2005-11-11 16:34:31] lzx21cn at 21cn dot com you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? [2005-11-10 17:24:09] [EMAIL PROTECTED] 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 ?php and ends with ?, is max. 10-20 lines long and does not require any external resources such as databases, etc. If possible, make the script source available online and provide an URL to it here. Try to avoid embedding huge scripts into the report. 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/35183 -- Edit this bug report at http://bugs.php.net/?id=35183edit=1
#35183 [Opn]: write into mysql with utf8 not right
ID: 35183 Updated by: [EMAIL PROTECTED] Reported By: lzx21cn at 21cn dot com Status: Open Bug Type: MySQL related Operating System: linux debian unstable PHP Version: 4.4.0-4 New Comment: can't repeat (tested with MySQL 4.1 and 5.0): ?php $connect=mysql_connect(localhost,phptest,php); $select=mysql_select_db(test,$connect); /* create test table */ mysql_query(DROP TABLE IF EXISTS test_35183); mysql_query(CREATE TABLE test_35183 (a varchar(20) character set utf8)); /* set client connection to utf8 */ mysql_query(SET NAMES utf8); $expected = #22235;#22823;#30342;#31354;; $query=insert into test1 values ('$expected'); $result=mysql_query($query); if (($result=mysql_query(select a from test_35183))) { $row=mysql_fetch_row($result); printf(Expected: %s Returned: %s\n, $expected, $row[0]); } mysql_query(DROP TABLE test_35183); mysql_free_result($result); mysql_close(); ? Output: Expected: #22235;#22823;#30342;#31354; Returned: #22235;#22823;#30342;#31354; Previous Comments: [2005-11-12 02:42:52] lzx21cn at 21cn dot com The problem maybe Data truncation When php write to mysql but I do not know resolve it [2005-11-12 02:03:39] lzx21cn at 21cn dot com do the same without PHP (using the console interface of MySQL in gnome-terminal --- drop table test1; create table test1(id int,name char(4)); insert into test1 values(1,'ç大欢å'); insert into test1 values(2,'å大ç空'); select * from test1; id | name 1 | ç大欢å 2 | å大ç空 --- the reslut is good! - Why do I think it's a problem of PHP, not MySQL 1st. read/write by console vs. by php by console: the result is right by php: the result is wrong,write four Chinese character and read only one chinese character back,and other character lost. 2nd. read Mysql by java vs. by php (creat record by console) by java: the result is right by php : the result is ? at field 'name' -- [2005-11-11 18:24:31] [EMAIL PROTECTED] Try to do the same without PHP (using the console interface of MySQL) and see if it works this way. If it does, put the code somewhere in the Net and paste the link here, so the Unicode data won't be corrupted by the bug system. Also add the expected and actual results, I doubt I can guess them myself. And try to explain why do you think it's a problem of PHP, not MySQL or something else (I'd be glad if you try to use something close to English to do that). [2005-11-11 16:41:04] lzx21cn at 21cn dot com sorry, 1st comment file is error This is you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); mysql_close(); ? [2005-11-11 16:34:31] lzx21cn at 21cn dot com you need php file (utf8) -- meta http-equiv=Content-Type content=text/html; charset=utf-8 ?php $connect=mysql_connect(localhost,kevin,); $select=mysql_select_db(kevin,$connect); $query=insert into test1 values (2,\å大ç空\);; $result=mysql_query($query); $result=mysql_query(select * from test1;); $rows=mysql_num_rows($result); for ($i=0;$i$rows;$i++) { $a=mysql_fetch_array($result); echo 第ä¸ä¸ªå段æ¯ï¼.$a[0]. | ; echo 第äºä¸ªå段æ¯ï¼.$a[1].br; } mysql_close(); ? 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/35183 -- Edit this bug report at http://bugs.php.net/?id=35183edit=1