Re: [PHP] iconv() in PHP returns 'Unknown error 0'

From: Toomas Aas (toomas.aas_at_raad.tartu.ee)
Date: 09/07/05

  • Next message: Giorgos Keramidas: "Re: Sendmail not using aliases"
    Date: Wed, 07 Sep 2005 16:04:55 +0300
    
    

    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 2

    It 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
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Giorgos Keramidas: "Re: Sendmail not using aliases"