cyberfinn Posted August 16, 2009 Share Posted August 16, 2009 Hey I have setup a new Debian Webserver with Apache2, PHP 5.2.9 I have added this line to my /etc/environment: NSL_GLOBAL_SETTINGS="/var/libraries/nsl_global_settings.ini" When I type 'printenv' i got this output: SHELL=/bin/bash TERM=xterm SSH_TTY=/dev/pts/0 USER=root PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAIL=/var/mail/root PWD=/etc/apache2/mods-available LANG=en_DK.UTF-8 PS1=\h:\w\$ HOME=/root SHLVL=4 LOGNAME=root NSL_GLOBAL_SETTINGS=/var/libraries/nsl_global_settings.ini _=/usr/bin/printenv So until everyting looks fine. I ahve added this line to php.ini: variables_order = "EGPCS" When i make a: var_dump($_ENV) i only got this output: array( { ["APACHE_PID_FILE"]=> string(20) "/var/run/apache2.pid" ["APACHE_RUN_USER"]=> string( "www-data" ["PATH"]=> string(28) "/usr/local/bin:/usr/bin:/bin" ["PWD"]=> string(27) "/etc/apache2/mods-available" ["APACHE_RUN_GROUP"]=> string( "www-data" ["LANG"]=> string(1) "C" ["SHLVL"]=> string(1) "1" ["_"]=> string(17) "/usr/sbin/apache2" } How do i get access to the NSL_GLOBAL_SETTINGS variables from PHP? Link to comment https://forums.phpfreaks.com/topic/170492-cant-access-system-environment-variables-from-php/ Share on other sites More sharing options...
ignace Posted August 16, 2009 Share Posted August 16, 2009 Have you restarted Apache? otherwise the modified variables_order won't be in effect Link to comment https://forums.phpfreaks.com/topic/170492-cant-access-system-environment-variables-from-php/#findComment-899373 Share on other sites More sharing options...
PFMaBiSmAd Posted August 16, 2009 Share Posted August 16, 2009 And have you checked if the php.ini that you changed the one that php is using? Link to comment https://forums.phpfreaks.com/topic/170492-cant-access-system-environment-variables-from-php/#findComment-899454 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.