How to enable iconv on CPanel server?

The iconv API is the standard programming interface for converting character strings from one character encoding to another in Unix-like operating systems. All recent Linux distributions contain a free implementation of iconv() as part of the GNU C Library which is the C library for current Linux systems.

To use it, the GNU glibc locales need to be installed, which is provided as a separate package, named glibc-locale usually, and is normally installed by default.

Requirements:

  • a CPanel server :army:
  • WHM root access to the server
  • glibc-locale
  • a working compiler

Steps:

  • login to your WHM as root at http://[your_server_ip]:2086 or https://[your_server_ip]:2087 or http://[your_server_ip]/whm.
  • Go to "Software" on the left sidebar.
  • Click "Apache Update".
  • Click "Load Previous Config" in order to work with your previous configuration.
  • Scroll down the page, find "Iconv (experimental)" text, check it.
  • No need to adjust other settings.
  • Scroll down again till the bottom, click "Start Build".
  • You'll see the compile proccess, do nothing, do not close the window, sit back and relax, just wait :clock: until the browser progress indocator stopped.

Voila, now you have iconv compiled with PHP :thumbup:

PS: Do this at your own risk, we do not guarantee this will work on all CPanel servers!

Comments

you wrote an incorrect adress

fix it http://[your_server_ip]:2087 to https://[your_server_ip]:2087

I ran into this problem when using Zend_Mail.
This solution works.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

If you enjoyed this post, make sure you subscribe to our RSS Feed! Or if you prefer, you can Follow us on Twitter instead.

Don't want to do this by yourself? Save the headache, ask CrushEdge to do it for you.