Jump to content

CGI error when trying to launch batch file


dmcalerney

Recommended Posts

Howdy all,

I'm trying to use passthru to run a batch file that is in the same directory as my script.  I keep getting the error "CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers.".  I've googled for a while now but I haven't been able to find any pertinant help.  Here's my simple  test batch file called copy.bat.

[code]copy functions.php ..\functions.php
exit[/code]

Here's how I'm launching it from PHP:
[code]<?php

echo passthru("start /b copy.bat > logme.txt", $return);
echo "return:" . $return . "<br>";

?>[/code]

Here's My Specs:
Windows Server 2003
IIS 6
PHP 4.3


Looks simple enough, but I can't get past this error.  Any ideas?

Danny

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.