Re: iconv() in PHP returns 'Unknown error 0'
| From: | Toomas Aas | Date: | Wed, 07 Sep 2005 13:04:55 +0000 |
| Subject: | Re: iconv() in PHP returns 'Unknown error 0' | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-221959@lists.php.net to get a copy of this message | ||
Toomas Aas wrote:
----------------------------------------------------- <?php echo iconv("ISO-8859-1", "UTF-8", "This is a test."); ?> ----------------------------------------------------- When I load this script via the browser, PHP outputs nothing. I have error logging set to file only, and in the log file there is this error: [07-Sep-2005 12:10:07] PHP Notice: iconv(): Unknown error (0) in /storage/www/iconvtest.php on line 2It looks like I found the solution myself. To my great surprise, the order of 'extension' lines in php.ini seems to be significant. As those of you who use FreeBSD might know, if you install PHP and a choice of extensions from ports, then extensions are described in separate file /usr/local/etc/php/extensions.ini. I moved the line describing 'iconv.so' to the first line in this file, and the test script quoted above started working as expected. -- Toomas Aas -------------------------------------------------------- |arvutivõrgu peaspetsialist | head specialist on computer networks| |Tartu Linnakantselei | Tartu City Office | ----------------------------------------------------- +372 736 1274