Enable Iconv for PHP on DirectAdmin Linux Server

If you are having a Directadmin server with Apache 2 and you need to enable iconv support for php, log in as root and go to /usr/local/directadmin/customapache.

# cd /usr/local/directadmin/customapache

You should find configure.php_ap2 or configure.php files, depending on Apache version that is build using the Directadmin build system. To add iconv support we need to add the following line to these files:

–with-iconv

Then we need to go to the command line to the same directory to run our build script. The string will look like

# ./build php_ap2

If your Apache version is lower than 2, your string will be as follows:

# ./build php

It will ask you to rebuild the software you have, you don’t really need it. You won’t need to add any configure lines, the script will do this for you. Note that make and make install will be done automatically. Don’t forget to restart Apache.