From: RVaughn at pheedo dot com Operating system: RHEL 3.0 PHP version: 4.4.0 PHP Bug Type: mbstring related Bug description: Several tests w/string and zlib-based functions fail w/Japanese mbstring
Description: ------------ With PHP 4.4 on Red Hat Enterprise 3.0, several string and zlib-based function calls fail when the 'mbstring' extension is activated, but work when it is turned off. These are shown in the test suites, which produce a set of failures when the 'mbstring.encoding' parameter is set to "Japanese" in the /etc/php.ini file, but when it is changed to "English" or "Neutral", the test suite returns different results, with none of the string or zlib functions failing, but an XML-related routine failing instead. My guess is that the 'mbstring' stuff is either broken or does not fully support all the possible character & string-related functions or does not overload them properly. My configuration for the build: ./configure 2>configure.err '--host=i386-redhat-linux' '--build=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--cache-file=../config.cache' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-aspell' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--disable-yp' '--enable-wddx' '--without-oci8' '--with-pear=/usr/share/pear' '--with-mysql=shared,/usr' '--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--without-ldap' '--without-imap' '--without-imap-ssl' '--without-kerberos' '--enable-mhash' '--with-apxs2=/usr/sbin/apxs' Reproduce code: --------------- Build PHP 4.4 on an RHEL 3.0 system with the 'mbstring' extension turned on. In the '/etc/php.ini' file set the line 'mbstring.encoding = Japanese' and you will get all the test failures outlined below. Change it back to 'Neutral' or 'English' and the failures go away. The following test scripts fail in "Japanese" setting: ext/exif/tests/exif002.phpt ext/standard/tests/strings/count_chars.phpt ext/standard/tests/strings/strtoupper.phpt ext/zlib/tests/001.phpt ext/zlib/tests/002.phpt ext/zlib/tests/003.phpt Expected result: ---------------- This is the output of the 'make test' run if 'mbstring.encoding' is set to "Neutral" or "English" in the /etc/php.ini file: ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt] xml_parse_into_struct/umlauts in tags [ext/xml/tests/xml007.phpt] ===================================================================== Actual result: -------------- This is the output of the 'make test' run if 'mbstring.encoding' is set to "Japanese" in the /etc/php.ini file. Nothing has been changed except that single setting in the php.ini file: ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- Check for exif_thumbnail [ext/exif/tests/exif002.phpt] Bug #22414: passthru() does not read data correctly [ext/standard/tests/file/bug22414.phpt] count_chars() function [ext/standard/tests/strings/count_chars.phpt] Test strtoupper on non-ASCII characters [ext/standard/tests/strings/strtoupper.phpt] gzdeflate()/gzinflate() [ext/zlib/tests/001.phpt] gzcompress()/gzuncompress() [ext/zlib/tests/002.phpt] gzencode()/base64_encode() [ext/zlib/tests/003.phpt] ===================================================================== -- Edit bug report at http://bugs.php.net/?id=34111&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34111&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34111&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34111&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34111&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34111&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34111&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34111&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34111&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34111&r=support Expected behavior: http://bugs.php.net/fix.php?id=34111&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34111&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34111&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34111&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34111&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34111&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34111&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34111&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34111&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34111&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34111&r=mysqlcfg