Problems of Perl program with Spreadsheet::ParseExcel module

G

goomania

My php script is to call Perl program which makes use of
Spreadsheet::parseExcel module to parse Excel file. I am able to launch

php script from command line so that Perl program run and properly
parse Excel file. However, when I put php script on server side and
then launch php through client request, perl program can't run.

My server does have Spreadsheet::parseExcel module and Perl installed.
Indeed I ran the Perl program that uses Spreadsheet::parseExcel module
on command line on server machine, and it ran smoothly. However, when I

called the same Perl program from PHP (using exec()) through web
request, Perl program can't run (but PHP produced no error message to
the client browser). I got rid of "use Spreadsheet::parseExcel;" in
Perl program, and then call the modified Perl program from PHP through
web request, the Perl program ran smoothly.

Not only this happened when I include Spreadsheet::parseExcel module,
but also for modules like Tk. Whenever I use Tk or Tk::DialogBox
modules, the Perl program can't run properly when I call it through web
request even though they run perfectly from the command line on the
same server machine.

Any suggestion re how to fix this problem? Thanks a lot,

-Ying
 
R

rajeev

sorry this may sound silly, but did you happen to run the script from
command without the perl interpreter.

My guess is that either your file is not set as executable or
interpreter is spelled out in the first line correctly.
 
G

goomania

Thanks for suggestions. I had no problem running Perl scripts from
command line, therefore it should not be a problem with Perl
interpreter or not setting file executable. And I put the Perl script
on the web server that runs Apache and use PHP to call those Perl
script upon user's request on client side. I don't have problem running
Perl script through PHP via web request, as long as the Perl script
does not use modules like Spreadsheet::parseExcel or Tk::DialogBox .
However, when I did use those modules in my Perl scripts and launch
those Perl script through PHP via web request, then Perl script stopped
running.

I am guessing this probably has something to do with the fact that the
Perl environment is not the same between being invoked by command line
and being invoked through web server. But I am not sure about the true
reason and re how to fix the problem.

Help...

-Ying
 
B

bate_G

Hi,
I have the same problem, but with some excel files works, with other
not. The excel format is the same. Any ideas!?

thanks,

bate_G
 

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

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top