Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to disable PHP gettext extension in my ubuntu instalation? I need this for testing purposes. gettext.ini is not present in conf.d folder and I don't know where to look.

I'm running Ubuntu 10.04

Thank you in advance!

share|improve this question
up vote 2 down vote accepted

Since the gettext support comes as a pre-compiled extension (the ones that you can find .ini files for are dynamically loaded), you can disable it by re-compiling PHP. That basically means that you need to de-install your current PHP installation, download PHP sources from and compile it from scratch. This is a good tutorial about it:

Another option you have is to simply disable the gettext functions. You can do that by using

disable_functions = 

directive in your /etc/php5/apache2/php.ini file

That however will not disable gettext support.

share|improve this answer

disable_classes=gettext in your php.ini should do it.

share|improve this answer
Thank you for the answer. I did this, gettext appeared at 'disable_classes' in phpinfo, but a bit lower it's said that gettext support is still enabled. – Temnovit Nov 15 '10 at 10:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.