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
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.