Hello!
I know the putenv() function used to set an environment variable (before doing a system() call, for example).
I'm searching a simple way to set the HOME variable at system level, to avoid editing every single .php file of an existing large project (the software is pmapper).
Playing with Apache and php.ini did not gave any clues, the only trick that worked was adding something like this in the Apache configuration file:
php_admin_value auto_prepend_file /var/www/env.php
and then setting the relevant puntenv() function in the prepended file. Is this the right way to do it?