I have been using setEnv in an .htaccess file, but the webhost recently updated the server to PHP 5.4 and since then my site has crashed due to the use of setEnv. They tell me that the function has been deprecated in PHP 5.4, but I don't see this documented anywhere.
Can anybody direct me towards an alternative method of defining an environmental variable, that can be used to retrieve include files on all pages without changing the path.
I've been using something like this:
// in .htaccess file
SetEnv INC_FILE path\include.php
// in every relevant .php file
require_once(getenv('INC_FILE'));
Due to this code it has been easy to move the files through different enviroments dev, test, production - without changing any file content. This has been also the purpose.
Which alternatives can you recommend, now that I can't use this feature. Alternative ways to do a similar task are also welcome.
Thanks.