[Click the star to watch this topic] win32::ole chgi

P

perlperl

Win32::OLE -> GetObject($wordfile) || die "canno ";
print "before.........\n";
my $paragraphs = $document->Paragraphs();
print "after...............\n";

it never prints before..... and the script terminates through CGI

however it work fine from command peormpt
 
M

MSG

perlperl said:
Win32::OLE -> GetObject($wordfile) || die "canno ";
print "before.........\n";
my $paragraphs = $document->Paragraphs();
print "after...............\n";

it never prints before..... and the script terminates through CGI

however it work fine from command peormpt

It probably have died before getting to print "before...". Have you
seen
any error message in your log files?

Web Server runs under its own user account such as "nobody" with
a lot restrictions. You likely have permission issue on $wordfile.
 
P

perlperl

i saw the log files....it is not able to create object ...just prints
"canno " in log file
 
M

MSG

perlperl said:
i saw the log files....it is not able to create object ...just prints
"canno " in log file

Win32::OLE -> GetObject($wordfile)
|| die "Failed".Win32::OLE::LastError . "\n"
will give you more info on why it died.

Normally your web server can only read files from certain directory.
If your $wordfile is outside of those directories, then it fails.
or say if $wordfile is readable only to admin/root, then it will fail.
Things like that.
 
P

perlperl

well, the cgi was not able to understand white spaces in path... :)

now
my $excel = Win32::OLE->GetActiveObject('Excel.Application')
||
Win32::OLE->new('Excel.Application', 'Quit');


print "Reaching here.......\n";

my $Book = $excel->Workbooks->Open("C:\\test.xls") || die "error..";

print "Reaching here. **************** \n";


it is not printing "Reaching here. **************** " and
terminating before that.....
 
T

Tad McClellan

perlperl said:
Subject: [Click the star to watch this topic] win32::eek:le chgi
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ WTF?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

What's that stuff doing in there?

the script terminates through CGI

however it work fine from command peormpt
^^^^^^^
^^^^^^^ WTF?

perldoc -q CGI

My CGI script runs from the command line but not the browser. (500
Server Error)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,610
Members
45,254
Latest member
Top Crypto TwitterChannel

Latest Threads

Top