I need to be able to use word to do some actions in my web site.
Ms word was recently installed but when I try to access it It just stucks the scripts and I get the following error msg.
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I'm just trying to see if I can open word
and using this script
<?php
$word=new COM("Word.Application") or die("Cannot start word for you");
print "Loaded word version ($word->Version)n";
$word->Quit();
print "Done ...........n";
?>

if for example I'll add some
print "begining of script";
befor the COM command it will executes but that will be the only output I'll get .

I've tryed looking at google for the answer but couldn't find any solutions for this.

    Originally posted by n0-0ne

    CGI Error
    The specified CGI application misbehaved by not returning a complete set of HTTP headers.

    Which is an error message the web server throws out when PHP does absolutely nothing with the request it's given. And that happens when PHP can't even find the script you're asking for. Nothing to do, nothing done.

    What happens when you replace that code with

    <?php echo "Hello World!" ?>
    

      of course it will echo hello world

      I have ni problem running scripts on the server.

      again my guess is that the COM command for some reason breaks the script running
      (without producing any error ! )

      the problem is I don't kow why and how to fix it.

      N0

        well I guess it's kind of stupid
        but the problem was solved by installing php as ISAPI instead of cgi which I don't know why it was installed that way .

        it also solved some issues I had with the source encoding and hebrew which brought up some weird mysql chraset #16 unavailable msg in some pages (even that most of the other hebrew pages encoded the same way worked perfectly )

        any way if your server runs Windows and php is installed as cgi shout at your stupid sysadmin to instal it as ISAPI

        N0

          Write a Reply...