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

    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

      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

        Dave,

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

          Florian,

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

          Thanks
          Peter

            6 days later

            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?

              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.

                Write a Reply...