windows - cygwin: can't execute PHP script via PATH -
i have written php script "toalpha" (purpose not relevant question). script in $home/bin. if cwd $home/bin, can execute typing "./toalpha". if type "toalpha", message: not open input file: /c/barry/bin/toalpha
some information may relevant:
. upgraded desktop winxp win7.
. first time have made own userid ordinary user instead of admin. (i tried on xp, ran problems , went having normal userid admin. don't need solution because i'm no longer running xp , besides own fault.)
. $home /c/barry did adding following .bashrc created when installed cygwin: mount c: /c home=/c/barry cd . .bashrc
. first 2 lines of php script are:
#!/c/xampp/php/php <?php
. yes, copy of php want use in c:\xampp\php\php.exe
. have another, similar script wrote on winxp. starts same 2 lines. worked fine under xp, doesn't work on win7.
my best guesses @ source of problem:
a difference between xp , win7
i fumbled home directory change in way. iirc, when installed cygwin on xp did trickery start directly in c:\barry couldn't remember how did when installed on win7, took "easy way out".
bash passing "c:\xampp\php\php.exe"
file name "/c/barry/bin/toalpha"
cygwin path , php not regognize it.
you should convert in understandable 1 using cygpath
try /c/xampp/php/php $(cygpath -w /c/barry/bin/toalpha )
Comments
Post a Comment