Re: Java with apache from perl script?
From: Helgi Briem (HelgiBriem_1_at_hotmail.com)
Date: 10/30/03
- Next message: Chris: "Re: Can't do setuid and file permision denied errors"
- Previous message: Helgi Briem: "Re: Repost: Conditional look-ahead?"
- In reply to: i5513: "Java with apache from perl script?"
- Next in thread: i5513: "Re: Java with apache from perl script?"
- Reply: i5513: "Re: Java with apache from perl script?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 10:57:49 +0000
On 29 Oct 2003 09:26:16 -0800, i5513@hotmail.com (i5513) wrote:
>Hi, I'm running Apache server with mod_perl active.
>
>I can run my script from command line and all is fine, but when I run
>my script from navigator, it doesn't run fine because my script is:
>
>system "java program_java";
>How can I do Apache to run java programs?
>
CGI is run under a special user with restricted rights and
an empty path variable.
You should always, yes *always* check the results
of system operations and return the error ($! for
internal processes, $? for daughter process).
Give it the full path to java and the program.
my $java = '/full/path/to/java';
my $program_java = '/full/path/to/program_java';
system ($java $program_java) == 0 or die $?;
- Next message: Chris: "Re: Can't do setuid and file permision denied errors"
- Previous message: Helgi Briem: "Re: Repost: Conditional look-ahead?"
- In reply to: i5513: "Java with apache from perl script?"
- Next in thread: i5513: "Re: Java with apache from perl script?"
- Reply: i5513: "Re: Java with apache from perl script?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|