CGI works at command prompt, errors when ran from website

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
shawno66
-


Joined: 16 May 2012
Posts: 6

PostPosted: Thu May 17, 2012 4:36 pm    Post subject: CGI works at command prompt, errors when ran from website Reply with quote

I have a CGI (EXE file) that creates an XLS spreadsheet using COM. When I run it directly from the CGI folder, it works. When I call it from the web interface, my program gives the error:
"Excel could not open a new workbook. Please check that VBA is installed."
Again, it works from a command prompt so I'm assuming that VBA was installed properly with Office.

The Abyss CGI log file says "Broken Pipe".

I should also note that my program is able to open Excel (the first step), but cannot open a workbook (2nd step).

Lastly, this program is called (shelled out) from another program; e.g.: program1.exe does some stuff and calls program2.exe.

Running on Server 2008 R2.
Office 2003

any suggestions?
thanks
Back to top View user's profile Send private message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Sun May 20, 2012 11:13 pm    Post subject: Re: CGI works at command prompt, errors when ran from websit Reply with quote

shawno66,

Are you running Abyss Web Server as a user program or rather as a service? Chances are that in service mode, Excel can't initialize its COM machinery to access VBA and other modules that require the graphical user interface.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
shawno66
-


Joined: 16 May 2012
Posts: 6

PostPosted: Mon May 21, 2012 5:07 pm    Post subject: Reply with quote

That's good to know. I'm not using any of the graphical components but I think just loading the COM library probably has the same result.

I'll need to go about this another way.
Thanks
Back to top View user's profile Send private message
aprelium-support
-


Joined: 20 Feb 2009
Posts: 356

PostPosted: Wed May 23, 2012 3:51 pm    Post subject: Reply with quote

shawno66,

COM uses the GUI even if it is used for automation without showing anything on the screen. So running Abyss Web Server as a user program is the only way to go if you have CGI programs that use COM.

We suggest reading http://support.microsoft.com/kb/257757 which is the official position of Microsoft on using automation of desktop applications in a server environment.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group