Tagged Questions

Environment variables are key-value-pair configuration options like KEY=valueor FOO=bar. Environment variables allow you to configure a program before it gets executed and without the need to store these variables in proprietary configuration files. They are present on all POSIX systems (Unix, ...

learn more… | top users | synonyms

0
votes
0answers
25 views

How can i test for an environment variable in a RewriteCond

Is there a way to put an environment variable in the condPattern part of a RewriteCond? Here is what i tried: RewriteCond %{REQUEST_URI} /%{ENV:ALIAS}/(js|css|img).* RewriteRule (.*) - [L,NS] But ...
2
votes
3answers
80 views

Why doesn't sudo -E actually preserve my environment?

I'm trying to sudo some binaries that lies in a custom path. That custom path is removed when I run sudo though, but sudo -E should preserve my path. Why doesn't it work? $ env | egrep ^PATH ...
1
vote
0answers
42 views

PATH environmental variable has changed suddenly for root user

Recently one of my Gentoo linux servers, which has been working happily for quite a few years suddenly stopped responding to BASH commands that I commonly issue it. Very basic commands such as ...
0
votes
0answers
60 views

Excluding Environment Variables from ZSH Autocomplete

Quick example: ~ $ wor<TAB> ~ $ WORDCHARS= ...
2
votes
1answer
104 views

%sessionname% returns incorrect session name

I have a virtualised Windows XP SP3 machine, which I am connecting to over Remote Desktop. One of my scripts needs to use the %sessionname% variable. However this returns incorrect information. ...
0
votes
1answer
86 views

How do you set server specific ENV values in Nginx?

I am starting a project that uses environment variables to set the database connection and a couple other things. (They didn't want to use configuration files since people are careless and overwrite ...
0
votes
2answers
35 views

Does java respect PATH env variable when resolves .jar filename?

This is what I have in PATH: PATH=/opt/ClosureCompiler:/home/vmadmin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games There is a compiler.jar in /opt/ClosureCompiler, but ...
2
votes
1answer
35 views

Can the environment variables tool in windows be launched directly?

Is there a more direct way to the environmental variables GUI then... Right click 'My Computer' and select 'Properties'. Click 'Advanced System Settings' link. Click 'Advanced' tab. Click ...
2
votes
1answer
110 views

How to SetEnv for an Alias

I have several Aliasses configured in apache configuration. I would like to set an environmental variables for each of them. How? I have this /alias1 /mapped/to/a/path /alias2 /mapped/to/a/path ...
1
vote
1answer
52 views

PATH variable and quotation marks (windows)

I am having a weird problem with the PATH variable under windows: My application is in a folder c:\app\bin and the DLLs for this application are in the c:\app\runtime folder. To run my program I ...
0
votes
0answers
29 views

AWS_CLOUDWATCH_HOME is not set

Hi all I am trying to run a bash script which contains following instructions, I have added the bash script to the cron job, when I checked the log the log says, AWS_CLOUDWATCH_HOME is not set. I am ...
0
votes
4answers
127 views

Tomcat 7: “Cannot locate Java Home”

Arch Linux. Servlet apparently had compatibility problems with openjdk so I uninstalled it and installed the plain jdk/jre from AUR. # /etc/rc.d/tomcat7 restart :: Stopping tomcat7 daemon [FAIL] :: ...
0
votes
1answer
45 views

Set php environment variable for cron via Plesk admin interface

Within our application we make use of a environment variable named SERVER_ENV that is used to set whether we are in a production or development environment. This is set through the httpd.conf file ...
1
vote
1answer
57 views

Environment variable not being picked up by app when started with Upstart (Ubuntu)

How does one go about getting a new environment variable picked up system-wide without restarting the server? As its an Ubuntu 11.x server, I'm using Upstart to start/restart processes. I added a ...
0
votes
1answer
47 views

How to set PHP environment variables on Ubuntu

I'm sure this is easy if you know how, but I don't. I've got an ubuntu 10.04 server running PHP5 under apache, all defaults and stuff. The PHP needs some environment variables set. How do I do it? ...
1
vote
1answer
66 views

FreeBSD aliased user identification and GNU screen

The situation is the following. I have FreeBSD user M, which is an alias for root, i.e., its UID equals to 0. I have a daemon started as M (as a shell for an autologin console, if it matters). The ...
1
vote
1answer
61 views

Setting Apache's PATH environment to match users

Using PHP 5.3 as an Apache module with Apache 2, on OS X 10.7. When I open Terminal and enter echo $PATH I get: ...
0
votes
2answers
57 views

java_home on centos

I am using a centos virtual machine instance. I have edited the /root/.bash_profile and set the JAVA_HOME path. the changes are saved but when I type echo $JAVA_HOME, the command executes but show ...
0
votes
2answers
81 views

crontab execution doesn't have the same environment variables as executing user

I ran my crontab job 0 2 */1 * * /aScript >aLog.log 2>&1 as a 'root' user, and however I found the env is different from env of the 'root' user, and therefore experiencing a different ...
0
votes
1answer
68 views

Why can't a certain environment-variable be added to my bash profile?

I am having an issue with running a PHP project called Phing with Cygwin. It's not a huge problem because I can make it work but I am looking for a reason or a fix so I can do it differently. In ...
-1
votes
3answers
29 views

Different 'development' environments for different developers

We have three environments: development, staging, and production. In our configuration variables for development, we set our database to connect to 127.0.0.1 with a set username or password. ...
1
vote
1answer
166 views

I can run a script locally, but cannot do “ssh HOSTNAME /path/to/script.sh”

I have a linux server, and a linux desktop. I have written the following simple script to dump the database of a django web application: #! /bin/bash set -o errexit cd $(dirname $0) . ...
0
votes
1answer
41 views

Is is possilbe to use environment variables in sudoers rules?

For example, there is a line defining the rule in sudoers file: %wheel ALL=(ALL) NOPASSWD: $HOME/bin/ls is it valid? If not, is there an equivalent way to achieve this goal? Thanks.
-1
votes
4answers
57 views

exporting variable globally

I can save the IP address of the current server to a variable and echo it out. # myvar=$(/sbin/ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}') # echo $myvar ...
0
votes
3answers
104 views

how to set php SERVER_PORT var to 80, behind varnish?

how to force php to read SERVER_PORT as 80, when apache listens on 8080 and varnish listens on 80 ?? if my apache vhost is set to 8080, SERVER_PORT will always be 8080, this is troubling me a little ...
0
votes
1answer
137 views

Using Apache Environment Variables to set custom ErrorDocument

I've got a set of RewriteCond rules that test for various mobile devices and then set environment variables like "env=device:.iphone" or "env=device:.smartphone" if the useragent matches an iPhone or ...
0
votes
1answer
519 views

How to set env variables and run multiple commands with PsExec?

How can I run multiple commands with PsExec, and how can I export environment variables? I can run two commands by doing the below, but when I try to export an environment variable the second command ...
1
vote
1answer
104 views

httpd conf environment variables - how do they work? (Centos 6)

I have the following config included in my httpd.conf... Include ${MODULE_DIR}/utilities/devconf/bo/vhost.conf where ${MODULE_DIR} is an environment variable that I am setting in my httpd init ...
0
votes
1answer
77 views

environment var not found on SuSe init.d script at boot

I've got a /etc/init.d/tomcat1 script which runs on boot on rc levels 3 and 5. This script calls /usr/local/tomcat1/bin/startup.sh on start. Although I can manually execute ...
0
votes
2answers
111 views

Commands /etc/init/boot.local get started before some environment variables get initialized

I have OpenSuse 11.4. I start some on-boot scripts inside /etc/init/boot.local. Where could I move those scripts so that they would be started after all (most) environment variables got initialized? ...
4
votes
3answers
145 views

Is it possible to change value of $TERM when calling ssh?

On my local terminal, I have TERM=konsole-256color, but not all remote machine I connect to have this definition. Is it possible to make ssh change the TERM on remote machine? Without changing .bash* ...
1
vote
1answer
71 views

Sudo resetting environment variables

Whenever I use the sudo command, none of my environment variables appear to be preserved. I've tried modifying the sudoers file, by removing the env_reset specification. #Defaults env_reset I've ...
3
votes
2answers
241 views

Environment Variables in PATH Not Expanded for non-Admin Command Prompt?

I have a Windows 7 machine which, when Command Prompt is run by a normal user, fails to expand environment variables in the %PATH%. If command prompt is instead run as administrator (right click, Run ...
0
votes
3answers
166 views

Use of Export in Bash Script on CentOS

I am very new to Linux and am having problems with what should be a very simple Bash script in CentOS. #! /bin/bash # script to restore the cognos rds from snapshot export ...
0
votes
1answer
35 views

C CGI invoked by apache 2.2 on Windows 7 cannot read environment variable

I have a C CGI that is invoked by Apache, both running as SYSTEM. The CGI relies on the setting of WINDIR and TEMPLATES environment variables. It gets the value of WINDIR without any problems but ...
0
votes
1answer
62 views

Set environment variable for process spawned by Apache webserver

How can I set an environment variable (not an "Apache environment variable", as described in the Apache HTTP server documentation here, but a plain old operating system environment variable) for ...
0
votes
2answers
100 views

Win Service running under LocalService account cannot access environment variables

I am looking for prove or disprove of my theory. We have windows service which runs under LocalSystem account. the service is calling msbuild and builds csproj (Visual Studio project) file, which use ...
1
vote
0answers
48 views

Dynamically Authenticate Apache with LDAP Based on Request String?

It is possible to use a portion of the request URI as an input into mod_authnz_ldap's Require ldap-group directive? I'm trying to dynamically check access to a bunch of different project directories, ...
1
vote
1answer
81 views

ulimit equivalent for all of a user's processes?

I am the unpopular guy who has brought down our high-memory linux machine twice this past week because some processes I have been running ate up way more ram then expected. One way around this would ...
0
votes
3answers
202 views

how to set PATH in CentOS so that it is visible in PHP

I need my PATH environment variable to include /usr/local/bin when seen from PHP, so that I can execute binaries that are in /usr/local/bin with exec() in PHP code without writing their full path, ...
3
votes
2answers
172 views

Linux (Ubuntu) environment variables, shells and security

I'm attempting to understand some concepts surrounding security and environment variables for a web application running under Apache on Ubuntu 10.04 Server. I have a few applications that I would ...
0
votes
2answers
70 views

calling an environment variable in a ps-watcher config file

I am trying to use ps-watcher to monitor my system and make sure a given number of worker threads are working on a task. If I hard code the number of workers into the config file for ps-watcher, it ...
-1
votes
3answers
103 views

Set alias or environmental variable in Unix

I have a VPS and an associated IP address for it. I'm doing a lot of work with it in my bash shell and I'm wondering if there's some way I can create either an alias or a environmental shortcut for ...
1
vote
1answer
92 views

Server-specific environment variables - /etc/profile or /etc/profile.d

I need to setup some system-wide environment variables for my Jetty server. But where to put them? There seem to be 2 choices /etc/profile or /etc/profile.d? Which are the differences between the ...
0
votes
1answer
136 views

how do I change the path for non-admin user in windows 7

In Windows XP I could change the PATH variable in the Control Panel / System Tool. When I start "System" in the Win7 Control Panel I can see some information about the computer. At the link "Advanced ...
1
vote
2answers
106 views

authorized_keys Environment Variables Not Setting Environment Variables

I have created the file ~/.ssh/environment in there I put: LEVEL=0 When I run a script over ssh to get the environment variable level it returns 0 like it should. In the authorized_keys file I ...
1
vote
1answer
437 views

REMOTE_USER = SSL_CLIENT_S_DN_CN under x509 with +FakeBasicAuth in Apache. Is it possible?

Hi I'm trying to incorporate a software to our intranet services (BackupPc) This Software uses the environment variable REMOTE_USER to get the username. Placed under an Apache 2.2 server with Client ...
1
vote
3answers
105 views

How to set an environment variable for a process spawned by the webserver?

In my setup (debian etch, lighttpd), one one my websites is calling a program for some image manipulation via PHP, I think. I'd like to change the behavior of this program by setting an environment ...
2
votes
2answers
578 views

Changing PATH Environment Variable for all Users. (Ubuntu)

I recently compiled Ruby Enterprise Edition (REE) on an Ubuntu 8.04 server. I would like to update my PATH to ensure this new version of Ruby (found in /opt/ruby_ee/bin) supersedes the older version ...
2
votes
1answer
327 views

Windows environment variables and manual registry editing - no/wrong values issue

Open regedit.exe, navigate to HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment. Create two environment variables: Name Type Data ----- -------------- ----------- zbar ...

1 2 3