1

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!

Temnovit
  • 1,127
  • 6
  • 19
  • 27

2 Answers2

2

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 PHP.net and compile it from scratch. This is a good tutorial about it:

http://www.iansharpe.com/art_PHPrecompile.php

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.

XViD
  • 46
  • 2
0

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

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • 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