Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running Windows 7. I have XAMPP for my Dev server. I also have a PHP command line tool called Phing which is a build script.

Using the Windows command prompt I can cd to my directory that has a build file and then just run the cammand phing and it will build my files.

Now I just installed CYGWIN for Windows and when I do the same process I get

Jason@Jason-Quad-PC /cygdrive/e/Server/htdocs/myframework/buildscript/build
$ phing
-bash: phing: command not found

So is there a way to get all my Windows stuff to work with CYGWIN like PHP and Phing?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I misread your question initially, phing I guess is not in /cygdrive/e/Server/htdocs/myframework/buildscript/build

You need to make sure the location of phing is in your Cygwin PATH.

Edit ~/.bash_profile (assuming you're using bash) and add another line at the bottom like this,

PATH=${PATH}:/full/path/to/phingdirectory

then start a new shell under Cygwin and try again.

If phing is in /cygdrive/e/Server/htdocs/myframework/buildscript/build and you're trying to execute it from there, then you need to know that Unix like operating system shells do not tend to look in the current directory for programmes to run, they only check the path.

To change that behaviour you need to add the local directory to the path like this,

PATH=${PATH}:.

or run the programme like this,

$ ./phing
share|improve this answer
    
Hi thanks for the response, the Phing is actually a PEAR package. I installed Cygwin in C:\cygwin and my PHP and Phing is over at E:\Server\php\pear My LAMP setup is using XAMPP so maybe I can't access my current PHP and Apache installation with Cygwin without reinstalling. –  jasondavis Dec 3 '11 at 19:47
    
Just to add, I just ran php -i and it showed info from PHP inside cygwin so with that working I think Phing should be do-able –  jasondavis Dec 3 '11 at 20:10
    
Have you tried executing Phing by using the full path to the actual Phing script/binary. That's the first test. If that works, the only issue is your path. –  EightBitTony Dec 4 '11 at 9:17
    
I was able to get it working, it was the PATH but I had to add it under the windows control panel settings as an environment variable, I wasn't sure what PATH meant before –  jasondavis Dec 4 '11 at 10:19
    
Yes, you can set it there and the Cygwin shell inherits it, or you can add your own PATH values in your .bash_profile, no one way of doing things (typical UNIX ;)) –  EightBitTony Dec 4 '11 at 11:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.