# 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 order to have Phing work with Cygwin on my system, I must add some paths to the windows 7 environment variables through the control panel

PHP_COMMAND = /cygdrive/e/Server/php/php.exe
PHING_HOME = E:\Server\phing
PHP_CLASSPATH = E:\Server\phing\classes
PATH : add this to the end ;E:\Server\phing\bin


What I would rather do though it add these into my .bash_profile under cygwin/home/jason/.bash_profile

Now I was able to successfully add 3 out of the 4 items to my bash_profile

PHP_COMMAND=:/cygdrive/e/Server/php/php.exe
PHP_CLASSPATH=:/cygdrive/e/Server/phing/classes
PATH=\${PATH}:/cygdrive/e/Server/phing/bin


and then I had to still add PHING_HOME=:E:\Server\phing to my windows Environment Settings

Now I am not sure why though, when I try to add the PHING_HOME path to my bash_profile and then run phing inside cygwin then I get this error...

Could not open input file: /cygdrive/e/Server/phing/bin/phing.php

As long as I keep PHING_HOMEas a Environment Variable then phing runs fine.

So does anyone have any idea why this 1 variable has to be in the Environment Variables in control panel instead of inside my CYGWIN .bash_profile file?

-
Have you compared the value of PHING_HOME as seen by the Cygwin shell in the two different scenarios? – Harry Johnston Dec 5 '11 at 3:36

set -x

at the top of your .bash_profile. That will make bash print a listing of each following command that's being executed. By looking at what was happening right before the error message, you should be able to figure out what command is getting confused by PHING_HOME. (After the shell starts, you can turn the debugging output back off again with set +x.)
Thanks for the tip, I tried that, it is strange because this shows that PHING_HOME=:/cygdrive/e/Server/phing is set correctly however the phing program will only work if it is added in through the control panel still, strange – JasonDavis Dec 4 '11 at 23:05