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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sir.linying@gmail.com

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

    My php script is to call perl scipt which makes use of
    Spreadsheet::Pa rseExcel 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

  • Jerry Stuckle

    #2
    Re: Problems of PHP script running Perl program with Spreadsheet::Pa rseExcelmodule

    sir.linying@gma il.com wrote:[color=blue]
    > My php script is to call perl scipt which makes use of
    > Spreadsheet::Pa rseExcel 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
    >[/color]

    Ying,

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

    Are you sure your host has the Spreadsheet::Pa rseExcel 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.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • sir.linying@gmail.com

      #3
      Re: Problems of PHP script running Perl program with Spreadsheet::Pa rseExcel module

      My server does have Spreadsheet::Pa rseExcel module and Perl installed.
      Indeed I ran the Perl program that uses Spreadsheet::Pa rseExcel 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::Pa rseExcel;" 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 写道:
      [color=blue]
      > sir.linying@gma il.com wrote:[color=green]
      > > My php script is to call perl scipt which makes use of
      > > Spreadsheet::Pa rseExcel 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
      > >[/color]
      >
      > Ying,
      >
      > What kind of error are you getting? "can't run" is pretty broad.
      >
      > Are you sure your host has the Spreadsheet::Pa rseExcel 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.
      > jstucklex@attgl obal.net
      > =============== ===[/color]

      Comment

      • Jerry Stuckle

        #4
        Re: Problems of PHP script running Perl program with Spreadsheet::Pa rseExcelmodule

        sir.linying@gma il.com wrote:[color=blue]
        > My server does have Spreadsheet::Pa rseExcel module and Perl installed.
        > Indeed I ran the Perl program that uses Spreadsheet::Pa rseExcel 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::Pa rseExcel;" 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 写道:
        >
        >[color=green]
        >>sir.linying@g mail.com wrote:
        >>[color=darkred]
        >>>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
        >>>[/color]
        >>
        >>Ying,
        >>
        >>What kind of error are you getting? "can't run" is pretty broad.
        >>
        >>Are you sure your host has the Spreadsheet::Pa rseExcel 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.
        >>jstucklex@att global.net
        >>============= =====[/color]
        >
        >[/color]

        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::Pa rseExcel
        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.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        Working...