for our project, we need to set several PHP values depending on the environment (development / production), first of all, the session saving path and some tracing and profiling parameters.
We don’t want to install them in a PHP script, because of some terrible outdated code that will require a lot of changes, and we don’t want to change .htaccess every time before passing it to git (but we require that .htaccess was in source control).
Is there a way to do something like this in .htaccess:
if (hostname == "dev.example.com") {
php_value session.save_path /tmp
[...]
}
source
share