setenv

Why isn't my wrapper around setenv() working?

I have the method below, and it correctly sets the ret value to 0 (indicating success in setenv), but when I check to see if this environment variable is actually set, it's absent. Why would this be happening? void Class::mysetenv(char* a, char* b) { if(a==0 || b==0) return; ...

How to find Windows SDK's SetEnv.cmd / SetEnv.cmd Does not work correctly

We have a Team City Build Server running and want to compile a Visual C++ project. So far this would be easy, since I've setup our Windows Build Agent with the Windows SDK, but we don't have a solution / project file. The project files are instead created with CMake. CMake seems to be a little bit dumb (can't generate Solution when Visu...

Apache SetEnvIf trouble

I have the following in my .htaccess file: SetEnvIf Host "^example\.com$" myvar=1 <IfDefine myvar> RewriteRule ^(.*)$ index2.php?q=$1 [L,QSA] </IfDefine> As far as I can tell, this should be working properly. However, "myvar" does not appear to get defined when I visit from example.com. I know that I have the mod_setenvif.c enable...

mod_rewrite rule and setenv

Is there anyway to use the value set in a SetEnv on the RewriteRule statement? Example: SetEnv MY_SCRIPT myScript.php rewriteEngine on RewriteRule ^(.*)$ %{MY_SCRIPT} [L] ...

Building an Evironment Variable with SET using a FOR loop in Command Prompt

Hi, I am having trouble with the following command prompt commands (in Windows XP). set SOMEVAR= for /F %i in (1 2 3) do set SOMEVAR=%SOMEVAR% "%i" echo %SOMEVAR% I expect it to build the SOMEVAR variable so that it contains each item in the for loop in quotes, separated by a space:  1 2 3 However what this is what I get...

Apache SetEnv appends REDIRECT_ . What gives?

For an application based on Zend Framework I use apaches SetEnv in .htaccess. I use this on test, staging and production servers like so: SetEnv APPLICATION_ENVIRONMENT production On the staging server I couldn't read this env var in PHP. However when I did a var_dump( $_ENV ) in php I got the value but the key was prepended with REDI...

htaccess conditionals

I have setup htpasswd authentication on my live site and it works great, but I don't want to be asked for a password when I am working on the development environment. In my httpd.conf file I have: SetEnv APP_ENV "development" In my .htaccess file I have: AuthName "Restricted Area" AuthType Basic AuthUserFile /path/to/file/.htpasswd ...

How to use the setEnv variable in apache?

Hi, I need to set my apache environment to 'foobar' I know I need to set in in my vhost, but what should i type there and where? ...

how can I make window sdk's setenv.cmd work globally, instead of a single cmd window?

Greetings, I feel kinda stupid for asking this, but I want to set the windows sdk build environment so that any process (including some non MS developer tools) can access the correct setup, without me trying to inject setenv.cmd /x86 into every process's startup. I can't seem to find the right search terms for this, and I don't want t...