Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I would like to know if there is any way I can remove the gettext extension without re-compiling php?

share|improve this question
Any particular reason? – Ignacio Vazquez-Abrams May 11 '10 at 10:48
Yes, a framework I'm using has it's own _() function, If I try to run my application without compiling php w/ gettext disabled it will tell me that the _() function is already defined. – mnml May 11 '10 at 12:52

Only when the gettext was installed as a loadable PHP extension. Check your PHP configuration (php.ini) for extension lines. If you want users to be unable to use gettext you can use the PHP disable_functions configuration directive to disable the gettext functions, from the PHP manual:

disable_functions string
This directive allows you to disable certain functions for security reasons. It takes on a comma-delimited list of function names. disable_functions is not affected by Safe Mode. This directive must be set in php.ini For example, you cannot set this in httpd.conf.

share|improve this answer
I have tried : disable_functions gettext but its not doing anything – mnml Jun 24 '10 at 15:41
Try disable_functions('_') maybe – Josef Sábl Nov 29 '11 at 14:39
This, however does not work for me :-( – Josef Sábl Nov 30 '11 at 8:50

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.