ID: 47507 User updated by: aboh24 at gmx dot de Reported By: aboh24 at gmx dot de -Status: Feedback +Status: Open Bug Type: ICONV related Operating System: Solaris 10 / 64-bit PHP Version: 5.2.8 New Comment:
OK - I redo the compiling and then I run a make test. Attached the iconv related lines: TEST 1677/6171 [ext/iconv/tests/bug16069.phpt]^MSKIP Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] reason: CP932 to EUC-JP translit not available TEST 1678/6171 [ext/iconv/tests/bug37176.phpt]^MPASS Bug #37176 (iconv_strpos() fails to find a string) [ext/iconv/tests/bug37176.phpt] TEST 1679/6171 [ext/iconv/tests/bug37773.phpt]^MPASS Bug #37773 (iconv_substr() gives "Unknown error" when string length = 1") [ext/iconv/tests/bug37773.phpt] TEST 1680/6171 [ext/iconv/tests/eucjp2iso2022jp.phpt]^MFAIL EUC-JP to ISO-2022-JP [ext/iconv/tests/eucjp2iso2022jp.phpt] TEST 1681/6171 [ext/iconv/tests/eucjp2sjis.phpt]^MFAIL EUC-JP to SJIS [ext/iconv/tests/eucjp2sjis.phpt] TEST 1682/6171 [ext/iconv/tests/eucjp2utf8.phpt]^MPASS EUC-JP to UTF8 [ext/iconv/tests/eucjp2utf8.phpt] TEST 1683/6171 [ext/iconv/tests/iconv-charset-length-cve-2007-4840.phpt]^MPASS iconv() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv-charset-length-cve-2007-484 0.phpt] TEST 1684/6171 [ext/iconv/tests/iconv001.phpt]^MPASS iconv() test 1 [ext/iconv/tests/iconv001.phpt] TEST 1685/6171 [ext/iconv/tests/iconv002.phpt]^MPASS iconv() test 2 (UCS4BE to ASCII) [ext/iconv/tests/iconv002.phpt] TEST 1686/6171 [ext/iconv/tests/iconv003.phpt]^MPASS iconv() test 3 [ext/iconv/tests/iconv003.phpt] TEST 1687/6171 [ext/iconv/tests/iconv004.phpt]^MFAIL iconv_mime_encode() sanity cheeck. [ext/iconv/tests/iconv004.phpt] TEST 1688/6171 [ext/iconv/tests/iconv_mime_decode-charset-length-cve-2007-4840.phpt]^MPASS iconv_mime_decode() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv_mim e_decode-charset-length-cve-2007-4840.phpt] TEST 1689/6171 [ext/iconv/tests/iconv_mime_decode.phpt]^MPASS iconv_mime_decode() [ext/iconv/tests/iconv_mime_decode.phpt] TEST 1690/6171 [ext/iconv/tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt]^MPASS iconv_mime_decode_headers() charset parameter length checks (CVE-2007-4840) [ext/iconv /tests/iconv_mime_decode_headers-charset-length-cve-2007-4840.phpt] TEST 1691/6171 [ext/iconv/tests/iconv_mime_decode_headers.phpt]^MFAIL iconv_mime_decode_headers() [ext/iconv/tests/iconv_mime_decode_headers.phpt] TEST 1692/6171 [ext/iconv/tests/iconv_mime_encode.phpt]^MFAIL iconv_mime_encode() [ext/iconv/tests/iconv_mime_encode.phpt] TEST 1693/6171 [ext/iconv/tests/iconv_set_encoding-charset-length-cve-2007-4840.phpt]^MPASS iconv_set_encoding() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv_s et_encoding-charset-length-cve-2007-4840.phpt] TEST 1694/6171 [ext/iconv/tests/iconv_stream_filter.phpt]^MFAIL iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] TEST 1695/6171 [ext/iconv/tests/iconv_strlen-charset-length-cve-2007-4840.phpt]^MPASS iconv_strlen() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv_strlen-charse t-length-cve-2007-4840.phpt] TEST 1696/6171 [ext/iconv/tests/iconv_strlen.phpt]^MFAIL iconv_strlen() [ext/iconv/tests/iconv_strlen.phpt] TEST 1697/6171 [ext/iconv/tests/iconv_strpos-charset-length-cve-2007-4840.phpt]^MPASS iconv_strpos() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv_strpos-charse t-length-cve-2007-4840.phpt] TEST 1698/6171 [ext/iconv/tests/iconv_strpos.phpt]^MFAIL iconv_strpos() [ext/iconv/tests/iconv_strpos.phpt] TEST 1699/6171 [ext/iconv/tests/iconv_strrpos-charset-length-cve-2007-4840.phpt]^MPASS iconv_strrpos() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/iconv_strrpos-cha rset-length-cve-2007-4840.phpt] TEST 1700/6171 [ext/iconv/tests/iconv_strrpos.phpt]^MFAIL iconv_strrpos() [ext/iconv/tests/iconv_strrpos.phpt] TEST 1701/6171 [ext/iconv/tests/iconv_substr-charset-length-cve-2007-4783.phpt]^MPASS iconv_substr() charset parameter length checks (CVE-2007-4783) [ext/iconv/tests/iconv_substr-charse t-length-cve-2007-4783.phpt] TEST 1702/6171 [ext/iconv/tests/iconv_substr.phpt]^MFAIL iconv_substr() [ext/iconv/tests/iconv_substr.phpt] TEST 1703/6171 [ext/iconv/tests/ob_iconv_handler-charset-length-cve-2007-4840.phpt]^MPASS ob_iconv_handler() charset parameter length checks (CVE-2007-4840) [ext/iconv/tests/ob_iconv_ha ndler-charset-length-cve-2007-4840.phpt] TEST 1704/6171 [ext/iconv/tests/ob_iconv_handler.phpt]^MFAIL ob_iconv_handler() [ext/iconv/tests/ob_iconv_handler.phpt] TEST 1705/6171 [ext/iconv/tests/translit-failure.phpt]^MSKIP Translit failure [ext/iconv/tests/translit-failure.phpt] reason: ICONV_IMPL != "libiconv" TEST 1706/6171 [ext/iconv/tests/translit-utf8.phpt]^MSKIP Translit UTF-8 quotes [ext/iconv/tests/translit-utf8.phpt] reason: ICONV_IMPL != "libiconv" --------- Previous Comments: ------------------------------------------------------------------------ [2009-04-27 15:57:38] j...@php.net Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2009-02-26 10:29:13] aboh24 at gmx dot de This could maybe useful: user# /usr/lib/iconv/UTF-8%ISO8859-1* /usr/lib/iconv/UTF-8%ISO8859-11.so it is mentioned in the truss output of the test php program: access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt", R_OK) Err#2 ENOENT access("/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so", R_OK) Err#2 ENOENT open("/usr/lib/iconv/alias", O_RDONLY) = 3 fstat64(3, 0xFFBFEE60) = 0 mmap(0x00000000, 6311, PROT_READ, MAP_SHARED, 3, 0) = 0xFF3A0000 close(3) = 0 munmap(0xFF3A0000, 6311) = 0 access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%ISO-8859-1//TRANSLIT.bt", R_OK) Err#2 ENOENT access("/usr/lib/iconv/UTF-8%ISO-8859-1//TRANSLIT.so", R_OK) Err#2 ENOENT PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13write(2, " P H P N o t i c e : ".., 151) = 151 write(2, "\n", 1) ------------------------------------------------------------------------ [2009-02-26 08:59:45] aboh24 at gmx dot de truss ./test.php ... access("/usr/lib/iconv/geniconvtbl/binarytables/UTF-8%8859-1.bt", R_OK) Err#2 ENOENT access("/usr/lib/iconv/UTF-8%8859-1.so", R_OK) = 0 stat("/usr/lib/iconv/UTF-8%8859-1.so", 0xFFBFE8A0) = 0 resolvepath("/usr/lib/iconv/UTF-8%8859-1.so", "/usr/lib/iconv/UTF-8%8859-1.so", 1023) = 30 open("/usr/lib/iconv/UTF-8%8859-1.so", O_RDONLY) = 4 ... Althoug the php was build with a local libiconv and explicit setting of the prefix-path and LD_LIBRARY_PATH and --with-iconv-dir, etc. the system want to load the iconv from /usr/lib/iconv which do not exists... :-( ------------------------------------------------------------------------ [2009-02-26 07:52:46] aboh24 at gmx dot de I rebuilt the codes with -m32 (this is default and means 32-bit binaries) and it is the same problem. ------------------------------------------------------------------------ [2009-02-26 07:12:49] aboh24 at gmx dot de Description: ------------ The iconv-function is not working correct on my Solaris 10 / 64-bit. libiconv and php-5-2-8 (and others) were compiled with CFLAGS=-m64 and CXXFLAGS=-m64 to enable 64-bit binaries. ./configure --prefix=$PX \ --with-config-file-path=$PX/etc \ --with-apxs2=$PX/apache2/bin/apxs \ --with-iconv-dir=$PX \ --with-libxml-dir=$PX \ --with-zlib=$PX \ --with-zlib-dir=$PX \ --enable-mbstring \ --without-pear php.ini changes: extension=bitset.so Reproduce code: --------------- #!/home/si/suchopac/rt/bin/php -q <?php print_r ( iconv_get_encoding()); print_r(get_loaded_extensions ()); print_r(get_defined_constants(true)); printf(" %s \n",ICONV_IMPL); printf(" %s \n",ICONV_VERSION); echo iconv('UTF-8', 'ASCII//TRANSLIT', "test"); echo iconv('ASCII', 'UTF-8//TRANSLIT', "test"); echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', "test"); echo iconv('ISO-8859-1', 'UTF-8//TRANSLIT', "test"); echo iconv('UTF-8', 'ISO-8859-1', "test"); // WORKING ! echo iconv('ISO-8859-1', 'UTF-8', "test"); // WORKING ! ?> Expected result: ---------------- A verison implementaion and version number and six times "test" Actual result: -------------- Only get 2 "test" string and 4 "tests" fails. Array ( [input_encoding] => ISO-8859-1 [output_encoding] => ISO-8859-1 [internal_encoding] => ISO-8859-1 ) Array ( [0] => xmlwriter ... [16] => mbstring [17] => json [18] => iconv [19] => hash [20] => filter [21] => date [22] => ctype [23] => zlib [24] => bitset ) Array ( ... [iconv] => Array ( [ICONV_IMPL] => unknown [ICONV_VERSION] => unknown [ICONV_MIME_DECODE_STRICT] => 1 [ICONV_MIME_DECODE_CONTINUE_ON_ERROR] => 2 ) ... ) unknown unknown PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ASCII//TRANSLIT' is not allowed in /test.php on line 10 PHP Notice: iconv(): Wrong charset, conversion from `ASCII' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 11 PHP Notice: iconv(): Wrong charset, conversion from `UTF-8' to `ISO-8859-1//TRANSLIT' is not allowed in /test.php on line 13 PHP Notice: iconv(): Wrong charset, conversion from `ISO-8859-1' to `UTF-8//TRANSLIT' is not allowed in /test.php on line 14 testtest ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47507&edit=1