SmokeyB has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, I seek your guidance.

I have a script that calls a batch file using qx.

my $result = qx`commandImCalling`;
The web server I've been using was IIS and everything was working fine. Now that I have switch over to Apache, it doesn't seem to retrieve the result for me. If anyone has any suggestion to why, that would great!

Thank you!

Replies are listed 'Best First'.
Re: Problems with qx
by borisz (Canon) on Oct 15, 2004 at 15:35 UTC
    is command in your $PATH?
    Boris
      It is in the PATH

      It'll run properly from the command line. Plus it works in ISS and on a Boa server. It just doesn't seem to work in Apache. I am quite perplexed.
        It must be in the PATH environment var of your webserver. And your webserver user must have permission to execute the file. Try to type the full path before the command.
        Boris
Re: Problems with qx
by uwevoelker (Pilgrim) on Oct 15, 2004 at 15:30 UTC
    Is the batch file really started? Try to create a file if it runs.

    Do you use the absolute path to the batch file?