For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > April 2006 > win32 error









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author win32 error
shahrahulb@gmail.com

2006-03-27, 6:55 pm

i have

my $test = Win32::OLE->GetObject($microsoftword_filename);
my $para = $test->Paragraphs();

this works fine when i run thru command prompt but not thru CGI.

Do i neec to change IIS configuration setting?

I tried

1)
print "<html> <script> alert(\"test\") </script> </html>
";
exit 0;
my $document = Win32::OLE->GetObject($wordfile);

teh CGI terminates properly once i click "ok"

2)
print "<html> <script> alert(\"test\") </script> </html>
";
my $document = Win32::OLE->GetObject($wordfile);
exit 0;

the cgi hangs and terminates after 5 minutes saying timeout....

however when i run the same CGU using command prompt, it works fine

the complete errior i get is

HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Mon, 27 Mar
2006 20:18:08 GMT Connection: close Content-Length: 186 Content-Type:
text/html
CGI Timeout
The specified CGI application exceeded the allowed time for processing.
The server has deleted the process.

Kenneth Tomiak

2006-04-01, 6:55 pm

Sounds like the usual permissions problem. Is the file you are trying to
GetObject in a directory your webserver is authorized to use and does the
webserver have permissions to open the file?


<shahrahulb@gmail.com> wrote in message
news:1143495593.143583.118120@i40g2000cwc.googlegroups.com...
>i have
>
> my $test = Win32::OLE->GetObject($microsoftword_filename);
> my $para = $test->Paragraphs();
>
> this works fine when i run thru command prompt but not thru CGI.
>
> Do i neec to change IIS configuration setting?
>
> I tried
>
> 1)
> print "<html> <script> alert(\"test\") </script> </html>
> ";
> exit 0;
> my $document = Win32::OLE->GetObject($wordfile);
>
> teh CGI terminates properly once i click "ok"
>
> 2)
> print "<html> <script> alert(\"test\") </script> </html>
> ";
> my $document = Win32::OLE->GetObject($wordfile);
> exit 0;
>
> the cgi hangs and terminates after 5 minutes saying timeout....
>
> however when i run the same CGU using command prompt, it works fine
>
> the complete errior i get is
>
> HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Mon, 27 Mar
> 2006 20:18:08 GMT Connection: close Content-Length: 186 Content-Type:
> text/html
> CGI Timeout
> The specified CGI application exceeded the allowed time for processing.
> The server has deleted the process.
>



Kenneth Tomiak

2006-04-01, 6:55 pm

For those who are going to say he has an exit 0; before his ole statement,
you are right. but I trust he added that later because the cgi code would
end before any time exceeded message would occur and the html is valid and
won't hang the browser.

I don't understand where this OK box he clicks comes from, maybe some other
code. I often see posts with less code than we would want to see. Perhaps
post a link to where we can see the code or include all the parts we need to
see. keep it short but complete enough.


<shahrahulb@gmail.com> wrote in message
news:1143495593.143583.118120@i40g2000cwc.googlegroups.com...
>i have
>
> my $test = Win32::OLE->GetObject($microsoftword_filename);
> my $para = $test->Paragraphs();
>
> this works fine when i run thru command prompt but not thru CGI.
>
> Do i neec to change IIS configuration setting?
>
> I tried
>
> 1)
> print "<html> <script> alert(\"test\") </script> </html>
> ";
> exit 0;
> my $document = Win32::OLE->GetObject($wordfile);
>
> teh CGI terminates properly once i click "ok"
>
> 2)
> print "<html> <script> alert(\"test\") </script> </html>
> ";
> my $document = Win32::OLE->GetObject($wordfile);
> exit 0;
>
> the cgi hangs and terminates after 5 minutes saying timeout....
>
> however when i run the same CGU using command prompt, it works fine
>
> the complete errior i get is
>
> HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Mon, 27 Mar
> 2006 20:18:08 GMT Connection: close Content-Length: 186 Content-Type:
> text/html
> CGI Timeout
> The specified CGI application exceeded the allowed time for processing.
> The server has deleted the process.
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com