Dies ist eine alte Version des Dokuments!
Become admin and install for all users
http://ftp.inf.tu-dresden.de/software/windows/cygwin32/ and http://ftp.gwdg.de/pub/linux/sources.redhat.com/cygwin/ are good mirrors for Germany.
Edit the home path of the user in
/etc/passwd
At least since 2011-02-09 /etc/passwd
doesn't contain concrete users any more. The home dir is determined from the $HOME einvironment variable. Therfore IMHO It is better to tweak $HOME in /etc/profile
below the user name detection, eg:
# Set the user id USER="`id -un`" export USER # insert something like this: HOME="/cygdrive/d/$USER" export HOME
See also FAQ
This section is about using PHP from the cygwin command line, not for dynamic web pages. Because PHP is not included in Cygwin, the windows version of PHP has to be installed separately. In order to call a PHP script from the Cygwin command line, you need some glue:
#!/bin/bash # Filename: /usr/bin/php # Purpose: Enable calling of PHP scripts from cygwin command line # When a PHP script is called from Cygwin-bash, bash reads the first line of # the PHP script which must be "#!/usr/bin/php". Then it calls this script # and passes the location of the PHP script as first argument in unix format. # This script then converts the unix pathname to the appropriate windows # pathname and calls php.exe with the PHP script location as first argument. PHP=/cygdrive/d/usr/php/php.exe # Set this to the location of your php binary! phpScript=$(cygpath -w $1) shift $PHP "$phpScript" "$@"
To start shellscripts from the windows environment, e.g. from Explorer or a desctop icon, register the bash
-file type and make the following entry in the open
-action:
"C:\cygwin\bin\bash.exe" "%1" "%2" "%3" "%4" "%5" "%6"
This allows 5 command line arguments to be passed.