Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
1  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.