PHP with iconv?

started at 08 Dec 2011 by zelda
  • zelda
    08 Dec 2011

    I used your great documentation to get a localhost server running on my iMac but i've run into a problem: i configured PHP pretty much the way you wrote in the documentation and recently noticed you had it compile without iconv and now i'm trying to use a piece of the Zend framework (Lucene search) that calls iconv functions and of course it fails with "Fatal error: Call to undefined function iconv()"

    Was there a reason you compiled PHP without iconv: like it does not work on osx, or something else?

    Any guidance on how to re-compile PHP with iconv: is it as simple as changing the line from without iconv to with iconv?


  • Richard
    09 Dec 2011

    Zelda, I once removed it because it was causing problems with getting it compiled and never found the need to re-include it.

    Adding it is as simple as you indicate, change the without into with and keep your fingers crossed.

  • zelda
    09 Dec 2011

    Thanks for the reply: i'll give it whirl this weekend and see what happens !)

  • zelda
    11 Dec 2011

    Happy to report: after downloading latest version of PHP(5.3.8) and using the following configure below with iconv enabled; it successfully compiled, installed, and worked! Thanks for this website and all the great documentation.

    CFLAGS="-arch x86_64" \
    CXXFLAGS="-arch x86_64"
    ./configure --prefix=/usr/local/php5 \
    --mandir=/usr/share/man \
    --infodir=/usr/share/info \
    --sysconfdir=/etc \
    --with-config-file-path=/etc \
    --with-zlib \
    --with-zlib-dir=/usr \
    --with-openssl \
    --with-iconv \
    --enable-exif \
    --enable-ftp \
    --enable-mbstring \
    --enable-mbregex \
    --enable-sockets \
    --with-mysql=mysqlnd \
    --with-pdo-mysql=mysqlnd \
    --with-mysqli=mysqlnd \

Topic Closed

This topic has been closed to new replies.