I would like to know if there is any way I can remove the gettext extension without re-compiling php?
Asked
Active
Viewed 1,500 times
1
-
1Any particular reason? – Ignacio Vazquez-Abrams May 11 '10 at 10:48
-
1Yes, 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
1 Answers
2
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.

PowerSp00n
- 1,506
- 1
- 8
- 8
-
-
-
-
`disable_functions` doesn't make functions go away. It just makes them throw an error when called. You still get an error if you try to redefine a builtin function, even if it's disabled. – Jun 23 '17 at 06:40