Environment variables are configuration options that can be set in a shell or other similar environments. All programs started from within the shell can read them and configure themselves.

learn more… | top users | synonyms

0
votes
2answers
48 views

Change apache (PHP) $PATH environment variable on CentOS with cPanel

I need to add a path to $PATH environment variable for PHP scripts on CentOS linux server with cPanel Pro 1.0 and Apache 2.2.27. For Ubuntu or SuSE it just means adding the row export ...
0
votes
0answers
12 views

Replace an existing environment variable in apache

I'm trying to change the value of Apache's built-in environment variable (eg. SERVER_ADDR), but neither of the following configurations has any effect: Setenv SERVER_ADDR 1.2.3.4 SetenvIf ...
-3
votes
2answers
74 views

How to set environment variables [closed]

Say, I would like to change my editor system-wide to nano. I was doing this with echo 'export EDITOR=/usr/bin/nano' >> /etc/bashrc As I learned, it was a bad idea, because if you accidentally ...
2
votes
1answer
27 views

Apache 2.2.14 / mod_auth_kerb 5.4 : Custom krb5.conf for Apache Instance

Objective: Use Apache/mod_auth_kerb using a custom krb5.conf file, not system standard /etc/krb5.conf. Issue: I've got a strongly regimented environment where we application owners are able to ...
0
votes
1answer
32 views

How to use a freshly installed environment variable in Windows

When I set an environment variable through the setx command in Windows 7, the variable is correctly set but if I type in set, it list the environment variables that were set at the script start up, ...
2
votes
1answer
43 views

Sharing ENV variables between multiple linux servers

I need to be able to share ENV variables between multiple linux servers. These variables are used by my application. I'd like to keep these variables in sync between all servers. Application ...
1
vote
1answer
54 views

Best practices for software configuration?

I'm configuring my AWS EC2 instances with Ansible, but I don't know what's the best way of storing my app configuration. Now I'm just sending a "app.properties" file to the server, using Ansible, but ...
0
votes
0answers
20 views

How do I get logman.exe to write to this path which contains an environment variable? [duplicate]

Looking at the registry keys which logman.exe uses to track its current log jobs (at HKLM:\SYSTEM\CurrentControlSet\Control\WMI\Autologger), I noticed that a number of the "default" Windows log ...
2
votes
1answer
109 views

How can I use perfmon/logman to set up logging on a master (Windows) VM, writing to another machine on the network?

I know how to set up logging to write to a remote location in the general case - just specify the output filename using the full UNC path (e.g. \\HOST-PC\directory\logoutput.etl) when creating the log ...
0
votes
0answers
4 views

PHP PATH on IIS

I've added a folder to my System PATH, but my PHP user (webuser) has a different PATH value. How can I add a directory to the PATH, that can be accessible by the IIS PHP User? Thanks, Steve
1
vote
1answer
46 views

What core environment variables should be set for a Windows service?

When using a service manager like srvany or nssm to run a normal program as a service, you can set the program's environment using the registry as documented here: ...
3
votes
2answers
83 views

Managing Python versions with environment-modules

I'm trying to configure a RHEL6 server to allow multiple users to run multiple versions of Python, multiple versions of various python modules, and multiple versions of various other programs (e.g. ...
0
votes
1answer
61 views

order of operations for environment variables

I want to understand how environment variables are set and reset (overridden). I'm running Apache/2.2.24 (Unix) PHP/5.4.14 on a mac . My theory is this: Environment vars can be set in bash, then they ...
3
votes
1answer
215 views

How to load the environment variables at boot time before X11 on Ubuntu Precise?

Using Ubuntu Precise 64 bit, I'm facing a problem that I'm unable to solve and that I'll try to describe below: I'm using a console mode program (let's say abc) that uses Go, NodeJS, Java and Scala. ...
1
vote
0answers
74 views

grep is inconsistently defaulting to grep -P?

I have a script that does some housekeeping that works perfectly well when invoked from an interactive shell, but did nothing when invoked by cron. To troubleshoot this I started a shell with a ...
4
votes
2answers
113 views

Is there a good reason not to add sbin to the default PATH?

Background: The PATH environment variable specifies the directories to be searched through when a command is issued without specifying a path. "sbin" paths (/sbin, /usr/sbin) are intended to house ...
1
vote
3answers
68 views

Dynamic logic in environment variable?

I regularly invoke a particular remote server from a (Linux/bash) command line via tools like cURL or wget. This server requires an authentication token that expires every 10 minutes. I have a program ...
2
votes
2answers
128 views

Is there a utility to read environment variables from an env file and then run a command (more lightweight than foreman)?

foreman can read .env files and set environment variables from the contents, and then run a program e.g. foreman run -e vars.env myprogram ...but it does a lot of other things (and is primarily ...
1
vote
1answer
347 views

Trying to create a GPO shortcut to local app data directory

We have a lockdown browser application that was installed on all of our students' laptops, but it was installed to the local app data of the user that performed the install. Therefore, none of our ...
3
votes
3answers
103 views

Environment variable in /etc/environment with pound (hash) sign in the value

On Ubuntu 12.04, I have an environment variable defined in /etc/environment like this: FOO="value_before#value_after" When I ssh into the server to check the value, I get this: $ env | grep FOO ...
1
vote
1answer
145 views

env variable: username returns hostname within a Scheduled Task - GPO

I am editing a Group Policy Scheduled Task. In General, Security Options "When running the task, use the following user account:" I have the following- %USERDOMAIN%\%USERNAME% Updating the gpo, and ...
3
votes
2answers
54 views

Preventing bash tab completion of an environment variable with a FS path value from removing the environment variable name

Friends, I am using GNU bash as my shell on Linux: $ bash --version GNU bash, version 4.2.45(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU ...
0
votes
2answers
503 views

Setting locale in Ubuntu 12.04 (openvz)

I have a fresh installation of Ubuntu 12.04 as virtual openVZ guest. The defined locale for LC_* in basic setup is POSIX. I'd like to change this to en_US.UTF-8. So I installed language_pack_en_base ...
8
votes
1answer
93 views

Is there a way to control where a windows update extracts temporary files?

Working on a vendor built system, we've realized that OS partition (C:) they created was rather small (38 GB). The object is to update Windows 2008 R2 to SP1. Several sources state that 8 GB is ...
0
votes
0answers
29 views

How to correct if the path variable is showing erratic behavior on echoing in Windows server 2008

I have a system path variable and a user path variable set. When I login to the server for the first time and go to cmd and wriet echo %PATH% it return ONLY the user set path variable and not the ...
0
votes
2answers
98 views

ssh SendEnv from windows to linux server using cygwin

I am doing ssh to a Open SUSE linux server from windows cygwin. I am trying to send one of my local environment variable through the ssh command so that I can load some specific .bashrc file right ...
0
votes
1answer
40 views

Apache2 PassEnv not working after reboot

I have an Ubuntu 12.04 LTS server with a vanilla apache install. In my Apache Config, I'm using PassEnv to pass an environment variable: PassEnv MY_VARIABLE MY_VARIABLE is defined in ...
0
votes
1answer
95 views

Processes spawned by taskset not respecting environment variables

I've run into an issue where an intel compiler generated program that I'm running with taskset has been putting its temporary files into the working directory instead of /tmp (defined by environment ...
1
vote
1answer
149 views

Security risks of PermitUserEnvironment in ssh

I've read quite a few posts regarding the use of PermitUserEnvironment and the file ~/.ssh/environment in order to pass env variables to an ssh shell. The official sshd docs and a few other resources ...
0
votes
1answer
123 views

Using mod_expires conditionally depending on an environment variable

I've borrowed some mod_expires code from the HTML5 Boilerplate that adds some sensible defaults for asset expiry (I have filename version revving configured with htaccess so I can add mtimes before ...
1
vote
1answer
70 views

How to store value of a non-standard HTTP request header to be used in an Apache If conditional

My server will be receiving a non-standard HTTP request named EmployeeID that I want to use to determine access rights to certain directories on the server. How can I store the value of the incoming ...
0
votes
1answer
52 views

How to use a common library of environment variables among different languages?

We have three main languages with which we perform system tasks: Bash, Ruby, and PHP, and Perl. Four, four main languages. We use managed environment variables to provide authorization info that ...
1
vote
1answer
109 views

How do I put a newline into an environment variable in an Apache SetEnv directive?

I'd like to have a newline character in an environment variable. I've tried SetEnv DI_collection_clients_list "client1 client2" which results in Invalid command 'client2"', perhaps misspelled or ...
0
votes
1answer
613 views

Equivalent of PHP setlocale in an APACHE config file

I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the ...
0
votes
2answers
63 views

How to set a user environmental variable in .profile

I set an environmental variable for user on CentOS by simply: 1.) Logging in with the user 2.) Going to their home directory cd ~ and creating a file .profile 3.) Putting the following in the ...
0
votes
0answers
100 views

multiple jdks on jenkins causes build hanging

I am using server2008 r2, I have set up all of the configurations for java 1.6 to be automatically installed when it is targeted in a build. When I create a test job, and build it, I get the following ...
1
vote
1answer
422 views

Prevent setx to expand an environment variable?

I can add to the PATH variable from the console using the following command: setx PATH "%JAVA_HOME%\bin;%PATH%" /m However, when I check the PATH variable afterwards the JAVA_HOME variable has been ...
0
votes
1answer
207 views

How can I change path for xml2-config

I've already asked same question in stackoverflow.I need some more help. I’m trying to upgrade libxml2 from 2.6.26 to 2.7.7 on CentOS5.5 I installed libxml2-2.7.7 in /opt/libxml2-2.7.7/bin/ I'd ...
1
vote
2answers
313 views

How to escape spaces in Apache SetEnvIf value

I am trying to use SetEnvIf (Apache2, via a .htaccess file) to store an environment variable where the value to be assigned to the variable needs to contain spaces. For example, trying to set ...
0
votes
1answer
150 views

Use $HOSTNAME in upstart script

(Can|how do) I use $HOSTNAME in an Ubuntu upstart script like this: start on started foo stop on stopped foo exec someexecutable -n "$HOSTNAME""_bb"
1
vote
1answer
143 views

List environment variables of a running process on AIX without character limit

Today I was trying to debug an issue where a process was not picking up the correct environmental variable. It took us hours before we realized that it wasn't picking up the correct variable. I tried ...
0
votes
3answers
270 views

Tomcat6 cannot find java enviroment variable

Here is a stupid noob question. I installed Tomcat6 and java-6-oracle. I set the /env/environment to contain JAVA_HOME and JRE_HOME (and both point to the correct directory). However when I try and ...
0
votes
3answers
130 views

Updating PATH Variable from PHP script

Hi there I want to update Path environmental variable through PHP script. I have generated a .reg file using PHP. The content of reg file looks like ...
3
votes
2answers
336 views

Setting a variable for a given SSH host

In ssh_config, one can choose to export some environment variables to the host using SendEnv. Is there also a way to force a given value for this variable, per host? For example, would it be possible ...
2
votes
1answer
119 views

sudo does not preserve TMPDIR

The sudo manpage tells me, that I can preserve the environment by passing the -E option, which does not work in the case of $TMPDIR: > env | grep TMPDIR TMPDIR=/localdata/tmp > sudo env | grep ...
3
votes
2answers
159 views

Environment Varibales in MySQL configuration file?

It is possible to use environment variables in an Apache .conf file, but what about MySQL, is there a way to use them in the MySQL configuration file (my.ini/my.cfg)? The closest thing I could find ...
0
votes
0answers
227 views

How can I set a session environment variable for windows remote desktop session (from the client side)?

I want to create a script that would launch a windows RDP session and set an environment variable for the session. How is that possible? (i.e. I am not asking how to set an environment variable ...
4
votes
2answers
64 views

Adding .CMD Files to Path in System Environment Variables settings?

I would like to run a bunch of .CMD files from anywhere on my server. However, when I add the path that these files are in to my PATH in System Environment Variables, they don't run. I can run them ...
2
votes
1answer
253 views

Can't set TERM permanently in fish shell

I use the fish shell. I'm trying to run vim inside tmux with the solarized theme, but the colors are broken unless I run: set -lx TERM screen-256color-bce; before running tmux attach. It's ...
2
votes
1answer
1k views

How to Extract command-line output into a Variable?

As part of a task that I am working on for a customer, I need to make some modifications to the enterprise logon script. Windows command-line is definitely not my area of expertise, but I am doing OK ...