in reply to win32::ole runs under cmd line but not cgi

The " Premature end of script headers" error most of the times means that something gets output to the client prior to the HTTP-headers having been fully output. What is being output is therefore the big question. Probably some error message your Perl script generates and I'm guessing it is "error 0x80080005" (whatever that may mean).

Another question: what are you trying to achieve with this script? It looks as it is not sending anything back to the client and neither are you collecting something from the client, so the whole operation looks rather useless to me, but I'm sure I must be missing something.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: win32::ole runs under cmd line but not cgi
by dparadies (Initiate) on Jul 24, 2005 at 13:40 UTC
    You're right, on the surface the code looks useless. But what i have before me is a a collection of macros written by various folks over a period of years in vbasic for applications in Microsoft Office. The little example executes a an excel macro that checks a directory for uploaded files, moves them to appropriate directories, then performs a variety of error checks and linguistic transliterations on the files and then sends them on to directories accessable to several databases (Oracle, Informix, MS Access based). But, i see what you're getting at. Perhaps i should provide some output (in appropriate html). I'll try it. thanks
      I see, the (in)famous legacy problem. Say no more, we suffer from similar problems.

      May I suggest another solution? Rather than starting the Perl program to start Excel from the server, have the Perl program started regularly from a cron-like program at regular intervals. No need to bother the server and if the intervals are small enough, the various users should not have to wait too long before the files show up in the right directories.

      That being said, I should start thinking of transferring all these VBA-programs to Perl as it seems something for which Perl is really made. It is still time to apply for a budget for such project for next year!

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        I know this has been a long time, I am facing similar issue. Is there a common approach for this issue? Although I am not getting the error as stated here, I am still not able to open the file and my code dies when executed via the webserver. Also, I am authenticating my users using SSPI. So I do have the remote_user variable set. But does not seem to help in authenticating for file access via Win32::OLE. Any other way to run a macro from .xlsm file in perl?