How to Enable Iconv for PHP on a DirectAdmin Linux Server

By | October 23, 2008

I haven’t found a good guide on this that’s why I decided to create my own. iconv functions are great if you’re working with text information stored using different encodings and it is essential to have it on your server. Let’s take we have Directadmin with Apache 2 support (please, read my previous articles to find out how to upgrade your apache).

First of all we need to 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 this Directadmin build system. I’ve got both these files. In order to add iconv support we need to add the following line to these files:


Just take a look at my file.

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

[root@lampdocs customapache]# ./build php_ap2

If your Apache version is lower than 2 (for example, 1.4), your string will be:

[root@lampdocs customapache]# ./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. make and make install will be done automatically.  Don’t forget to reboot Apache (service httpd restart) and have fun!

One thought on “How to Enable Iconv for PHP on a DirectAdmin Linux Server

  1. Pingback: Thêm custom modules tới php với customapache ! - Diễn đàn Hội Tụ Số

Comments are closed.