472,146 Members | 1,330 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

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

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
3 4023
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
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
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.

Similar topics

2 posts views Thread by Geru | last post: by
1 post views Thread by vertigo | last post: by
reply views Thread by tom | last post: by
reply views Thread by prudhivi | last post: by
6 posts views Thread by Keith Lee | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.