ID:               50746
 Updated by:       j...@php.net
 Reported By:      werner at aloah-from-hell dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         ICONV related
 Operating System: Linux X86_64, Kernel 2.6.32.2
 PHP Version:      5.2.12
 New Comment:

I'm quite sure they aren't totally identical. Most likely the one where
it doesn't work is not installed properly or someone has messed
something there. Anyway, since this sure isn't PHP bug -> bogus.


Previous Comments:
------------------------------------------------------------------------

[2010-01-14 10:18:26] werner at aloah-from-hell dot de

Hi, 

the hardware-specs are the same - same for the PHP configuration. I'll

need more testing here ... 

Anyway, thanks again. 

Werner

------------------------------------------------------------------------

[2010-01-14 10:15:56] j...@php.net

No idea since I do not know the specs of your servers. :)
Check the diff between their phpinfo() output on iconv section.

------------------------------------------------------------------------

[2010-01-14 10:13:21] werner at aloah-from-hell dot de

Hi, 

thanks for the quick response. I did some more testing ... and it 
seems like the problem is not related to PHP. 

On one machine with PHP 5.2.12 installed:


server1:# php -n -d error_reporting=E_ALL -r 'echo iconv("utf-8", 
"iso-8859-1","abcde"), PHP_EOL;'
abcde
server1:#


server2:# php -n -d error_reporting=E_ALL -r 'echo iconv("utf-8", 
"iso-8859-1","abcde"), PHP_EOL;'
Notice: iconv(): Unknown error (29) in Command line code on line 1
server2:# 


The configure-Options for PHP are the same on both machines. Any 
Ideas? 

regards,
Werner

------------------------------------------------------------------------

[2010-01-14 10:01:23] j...@php.net

Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Works fine for me. Enable error reporting and displaying too..or does
it actually crash for you..? Try this:

# php -n -d error_reporting=E_ALL -r 'echo iconv("utf-8", "iso-8859-1",
"abcde"), PHP_EOL;'


------------------------------------------------------------------------

[2010-01-14 09:24:43] werner at aloah-from-hell dot de

Description:
------------
Hi everybody, 

we've discovered, that the PHP funktion iconv() does not work with the

PHP-CLI in PHP 5.2.12. PHP is configured with the following Options:

./configure  --enable-magic-quotes --enable-libxml --enable-session --
with-pcre-regex --with-pear --enable-xml --enable-simplexml --enable-
static --enable-safe-mode --enable-sigchild --disable-debug --disable-
rpath --enable-cli --enable-bcmath --enable-exif --enable-gd-native-
ttf --enable-gd-jis-conv --enable-mbstring --enable-mbreg
ex --enable-posix --enable-sockets --with-curl --with-gd=/usr/local --
with-ttf --with-png-dir=/usr --with-jpeg-dir --with-t1lib --with-zlib 
--with-iconv --with-imap=/usr/lib64 --with-imap-ssl --with-mysql --
with-openssl --with-kerberos --with-xpm-dir --with-freetype-dir=/usr -
-with-apxs2=/usr/local/apache2/bin/apxs --disable-cgi --dis
able-ipv6 --disable-pdo --without-sqlite --disable-spl --with-
mcrypt=/usr --enable-soap

ICONV-Support ist active:

server:# php -r 'phpinfo();'|grep -i iconv
...
iconv
iconv support => enabled
iconv implementation => glibc
iconv library version => 2.3.6
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1

Kind regards,
Werner




Reproduce code:
---------------
<?php
$text = "abcde";
echo iconv('UTF-8', 'ISO-8859-1', $text), PHP_EOL;
?>


Expected result:
----------------
With PHP 5.2.11: 
server:# /usr/local/bin/php /tmp/test.php
abcde
server:# 







Actual result:
--------------
With PHP 5.2.12: 

server:# /usr/local/bin/php /tmp/test.php
server:#


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50746&edit=1

Reply via email to