Hi,
I am using a shared hosting, i need to disable gettext extension for my application due i need to redeclare _(). Is it possible to disable an extension on php runtime or vie .htaccess ?
Hi,
I am using a shared hosting, i need to disable gettext extension for my application due i need to redeclare _(). Is it possible to disable an extension on php runtime or vie .htaccess ?
I don't think so, no. You'd need access to the php.ini
to exclude modules from loading. See here.
There are two extensions that can redeclare functions: Runkit and APD
I have never worked with them myself, though.
Wordpress uses __()
(two underscores) and php-gettext for translation. I'm assuming they had exactly this issue, when deciding to go for __()
.
You can't. Your only option here to change php settings with an .htaccess file is to use
php_admin_value disable_functions
But as far as I know this only works for security related functions. The reason for this is that it would really kill performance if on every single request php had to rebuild the list of available functions which is what it would have to do if this was changeable on a per-server or per-directory basis.