Click to See Complete Forum and Search --> : exec, IIS, 2000


Anon
05-15-2001, 01:40 AM
Hi all,

I'm new to php, but have been unable to resolve this issue by looking through the archives.

I want to run run cvs from a webpage and retrive the output for processing. I am trying:

echo passthru('c:\\cvs\\cvs.exe -q log -R >myout.txt');

This code works from the prompt (php -f test.php) but when run thru the web it creates only a zero length file.

Any assistance would be appreciated.
Thanks
Peter

ame12
05-15-2001, 04:53 AM
Yes, you'll need to set your path explicitly because you have no idea where the IIS process is defaulting your current working directory. Try redirecting to "c:\my documents\my out.txt" instead of not specifying a path and that should work.

Dave


===========================================
http://badblue.com/helpphp.htm
Get PHP up and running fast: Win95,98,ME,NT
BadBlue: a free, small footprint web server
===========================================

Anon
05-15-2001, 05:48 AM
As far as I know, this is a bug with running PHP in IIS.
It works in Apache on Win32.

For a workaround on IIS, I created an ActiveX component, which will execute any command. It can be access through PHP's COM Wrapper.

Good Luck,
Florian

Anon
05-15-2001, 03:38 PM
Dave,

thanks for the suggestion, I tried this but unfortunately the same result, a zero length file.

Anon
05-15-2001, 03:40 PM
Florian,

thanks for the information, I'll install apache and see how I go.

Thanks
Peter

lordphilippe
05-21-2001, 06:20 AM
I have a question about Windows 2000 server and PHP...

All my pages are now in PHP but, what I need to setup Windows 2000 server to run PHP files on the web????

Please can you help me?

IIS or APACHE32?

Anon
05-21-2001, 06:52 AM
IIS and Apache will work.
But currently the exec call will only work on Apache.

Just download it from www.apache.org.

BTW: Apache is also more stable with PHP on Win32.