By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,576 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

Problems of PHP script running Perl program with Spreadsheet::ParseExcel module

P: n/a
My php script is to call perl scipt which makes use of
Spreadsheet::ParseExcel module to parse Excel file. I am able to launch
php script from command line so that perl script can 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.

Anyone has any suggestion re how to fix this problem? Thanks a lot,

-Ying

May 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
si*********@gmail.com wrote:
My php script is to call perl scipt which makes use of
Spreadsheet::ParseExcel module to parse Excel file. I am able to launch
php script from command line so that perl script can 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.

Anyone has any suggestion re how to fix this problem? Thanks a lot,

-Ying


Ying,

What kind of error are you getting? "can't run" is pretty broad.

Are you sure your host has the Spreadsheet::ParseExcel module on their system?
I'm assuming they have Perl - but even that might not be a safe assumption!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 8 '06 #2

P: n/a
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.

It seems that PHP server scripting uses different Perl environment as
the command line even though on the same machine. Any suggestions or
clues?

Thanks,

-Ying

Jerry Stuckle 写道:
si*********@gmail.com wrote:
My php script is to call perl scipt which makes use of
Spreadsheet::ParseExcel module to parse Excel file. I am able to launch
php script from command line so that perl script can 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.

Anyone has any suggestion re how to fix this problem? Thanks a lot,

-Ying


Ying,

What kind of error are you getting? "can't run" is pretty broad.

Are you sure your host has the Spreadsheet::ParseExcel module on their system?
I'm assuming they have Perl - but even that might not be a safe assumption!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


May 10 '06 #3

P: n/a
si*********@gmail.com wrote:
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.

It seems that PHP server scripting uses different Perl environment as
the command line even though on the same machine. Any suggestions or
clues?

Thanks,

-Ying

Jerry Stuckle 写道:

si*********@gmail.com wrote:
My php script is to call perl scipt which makes use of
Spreadsheet::ParseExcel module to parse Excel file. I am able to launch
php script from command line so that perl script can 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.

Anyone has any suggestion re how to fix this problem? Thanks a lot,

-Ying


Ying,

What kind of error are you getting? "can't run" is pretty broad.

Are you sure your host has the Spreadsheet::ParseExcel module on their system?
I'm assuming they have Perl - but even that might not be a safe assumption!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================



Well, the Perl processor in Apache will be governed by the LoadModule
statement(s) in your httpd.conf file, while the command like will be processed
by the one you specify in your input file or on the command line. They may or
may not be the same ones.

But in any case, since the file works without the Perl Spreadsheet::ParseExcel
module in it, PHP seems to be working fine. I'd suggest you follow up in a Perl
newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
May 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.