From owner-freebsd-questions@FreeBSD.ORG Wed Sep 7 13:05:11 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B9F1516A420 for ; Wed, 7 Sep 2005 13:05:11 +0000 (GMT) (envelope-from toomas.aas@raad.tartu.ee) Received: from lv.raad.tartu.ee (lv.raad.tartu.ee [194.126.106.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70EAE43D5C for ; Wed, 7 Sep 2005 13:05:08 +0000 (GMT) (envelope-from toomas.aas@raad.tartu.ee) Received: Message by Barricade lv.raad.tartu.ee with ESMTP id j87D55kh008300; Wed, 7 Sep 2005 16:05:07 +0300 Received: from INFO/SpoolDir by raad.tartu.ee (Mercury 1.48); 7 Sep 05 16:05:07 +0300 Received: from SpoolDir by INFO (Mercury 1.48); 7 Sep 05 16:04:59 +0300 Received: from [192.168.1.2] (192.168.1.2) by raad.tartu.ee (Mercury 1.48) with ESMTP; 7 Sep 05 16:04:55 +0300 Message-ID: <431EE577.6070102@raad.tartu.ee> Date: Wed, 07 Sep 2005 16:04:55 +0300 From: Toomas Aas User-Agent: Mozilla Thunderbird 1.0RC1 (Windows/20041201) X-Accept-Language: en-us, en MIME-Version: 1.0 References: <431EB169.7010602@raad.tartu.ee> In-Reply-To: <431EB169.7010602@raad.tartu.ee> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Cc: questions@freebsd.org, php-general@lists.php.net Subject: Re: [PHP] iconv() in PHP returns 'Unknown error 0' X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2005 13:05:11 -0000 Toomas Aas wrote: > ----------------------------------------------------- > 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