Dies ist eine alte Version des Dokuments!
Edit the home path of the user in /etc/passwd
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.