Date: Wed, 07 Sep 2005 16:04:55 +0300 From: Toomas Aas <toomas.aas@raad.tartu.ee> Cc: questions@freebsd.org, php-general@lists.php.net Subject: Re: [PHP] iconv() in PHP returns 'Unknown error 0' Message-ID: <431EE577.6070102@raad.tartu.ee> In-Reply-To: <431EB169.7010602@raad.tartu.ee> References: <431EB169.7010602@raad.tartu.ee>
next in thread | previous in thread | raw e-mail | index | archive | help
Toomas Aas wrote: > ----------------------------------------------------- > <?php > echo iconv("ISO-8859-1", "UTF-8", "This is a test."); > ?> > ----------------------------------------------------- >=20 > When I load this script via the browser, PHP outputs nothing. I have=20 > error logging set to file only, and in the log file there is this error= : >=20 > [07-Sep-2005 12:10:07] PHP Notice: iconv(): Unknown error (0) in=20 > /storage/www/iconvtest.php on line 2 It looks like I found the solution myself. To my great surprise, the=20 order of 'extension' lines in php.ini seems to be significant. As those=20 of you who use FreeBSD might know, if you install PHP and a choice of=20 extensions from ports, then extensions are described in separate file=20 /usr/local/etc/php/extensions.ini. I moved the line describing=20 'iconv.so' to the first line in this file, and the test script quoted=20 above started working as expected. --=20 Toomas Aas -------------------------------------------------------- |arvutiv=F5rgu peaspetsialist | head specialist on computer networks| |Tartu Linnakantselei | Tartu City Office | ----------------------------------------------------- +372 736 1274
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?431EE577.6070102>