Good Day I have been struggling lately to get the right path to execute php scripts on the command line.

My php folder is found in c:>xampp\php

which I specied as the path above by accesseing the environmet variables directory.

I was wondering whether I am doing anything wrong because if I type a comand
to create a new web application in Yii I got an error that said php.exe is not a an
a win32 applicatio.

I have tried every example it is on the internetr but somehow they do not seem to wotk

Your reply will be highly appreciated.

Regards
Your liY

Recommended Answers

All 3 Replies

It is normally found here:
C:\xampp\php\php.exe

See the --help output or the man page. In any case, the -t <rootdir> option on the command line will do the trick. IE, php -t xampp\php for Windows, or php -t xampp/php for Linux/Unix. I suspect that the latter will work for both, though the former (backslash) will ONLY work for Windows. Since I ONLY use php on Linux, I am just guessing, but I do have quite a bit of experience munging with php's source code (to fix some serious bugs with their http support). My current set of projects are php/javascript/css intensive, including writing (done) a cell phone web browser emulator.

Thanks a lot guys will certainly try it out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.