I'm trying to get the %username% in my intranet site to automatically log in the users but I'm not able to get this env. variable.
I changed the "variables_order = "GPCS"" to "variables_order = "EGPCS"" in my PHP.ini.
I displayed the _ENV variables in my code : global $_ENV; var_dump($_ENV); and i get this :
array(11) { ["APACHE_RUN_DIR"]=> string(16) "/var/run/apache2" ["APACHE_PID_FILE"]=> string(28) "/var/run/apache2/apache2.pid" ["JOURNAL_STREAM"]=> string(11) "8:405225026" ["PATH"]=> string(60) "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ["INVOCATION_ID"]=> string(32) "3e8569ce22454bd5b51b1ee4d8902385" ["APACHE_LOCK_DIR"]=> string(17) "/var/lock/apache2" ["LANG"]=> string(1) "C" ["APACHE_RUN_USER"]=> string(8) "www-data" ["APACHE_RUN_GROUP"]=> string(8) "www-data" ["APACHE_LOG_DIR"]=> string(16) "/var/log/apache2" ["PWD"]=> string(1) "/" }
But when I try this echo getenv("username");, I get nothing , do you know why ?
Thank you !