Jump to content


Photo

CGI error when trying to launch batch file


  • Please log in to reply
No replies to this topic

#1 dmcalerney

dmcalerney
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 30 June 2006 - 06:07 PM

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.

copy functions.php ..\functions.php
exit

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

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

?>

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users