Richard Lynch wrote: > So, I have this automated testing script I wrote, and I want to make > it work on more than just my computer. > > In cygwin, and in Linux, EVN['_'] has the nice path to the binary CLI > which is running -- which I call again in a backticks for each test > script in turn, to provide a consistent starting point. > > In windows... There ain't nothing in phpinfo() that matches the > php.exe which I'm running... > > How do you handle this? > > Note that I'm not attempting to test specific versions of PHP -- just > the PHP scripts, so I really just want to run whatever PHP they are > already running in their test environment, whatever that might be. > > It's not in $argv, it's not in ENV. > > I've check the getmyinode() friends in PHP Options/Info page. > > Surely Windows provides this info to PHP somewhere, and PHP exposes > it, right?... Guess not, hunh. > > Anybody got a solution? 2 possible ideas: 1. use a wrapper script that allows you to specify which binary to run the tests with. e.g. (my example suggests you would have a wrapper for every version of php you wanted to test with) > php5-1.bat runtests.php php5-1.bat: --------- @echo off :init_arg set args= :get_arg shift if "%0"=="" goto :finish_arg set args=%args% %0 goto :get_arg :finish_arg set php=C:\path\to\php5.1.exe set ini=C:\path\to\php5.1.ini %php% -c %ini% -dPHP_VERSION=%php% %args% 2. try making use of the $_ENV['PHP_PEAR_PHP_BIN'] value which should be configured if pear is installed properly. (it's there in my local setup just some rough ideas, hope that one of them serves well enough to be used as a workaround for the windows lack of functionality. good luck (ps I'm very interested how you tackle the problem, looking forward to any response) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php