Perl-CGI Tomcat

Please support our Perl advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2009
Posts: 5
Reputation: gsarin is an unknown quantity at this point 
Solved Threads: 0
gsarin gsarin is offline Offline
Newbie Poster

Perl-CGI Tomcat

 
0
  #1
May 10th, 2009
Hi,

I am trying to run a Perl-CGI script through Tomcat Server and running into issues.

The script runs fine through command prompt and also runs half through webpage. The problem comes when I try to access some files in directories located on some other server.

I think tomcat security does not allow me to access those directories.

Are there any configuration settings which will allow to access thise directories.? Am I looking into the right issue? Or is the issue related to something else>?

Any pointers will be appreciated.

Please let me know if this is not the right forum to post this stuff.

Thanks in Advance!!!

Gaurav
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 58
Reputation: mitchems is an unknown quantity at this point 
Solved Threads: 2
mitchems's Avatar
mitchems mitchems is offline Offline
Junior Poster in Training

Re: Perl-CGI Tomcat

 
0
  #2
May 11th, 2009
What uid is the Tomcat Server running as? What uid are you running at the command prompt? You might try an su to the uid of the Tomcat server and see if the script runs. You might have to change ownership or chmod the directories. If that doesn't work, I'm... uh ... sort of out of ideas.
And don't tell me there isn't one bit of difference between null and space, because that's exactly how much difference there is.

Larry Wall
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 898
Reputation: KevinADC has a spectacular aura about KevinADC has a spectacular aura about 
Solved Threads: 67
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Practically a Posting Shark

Re: Perl-CGI Tomcat

 
0
  #3
May 11th, 2009
The question is probably best asked on a forum dedicated to http servers and not a CGI forum dedicated to CGI scripts.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 5
Reputation: gsarin is an unknown quantity at this point 
Solved Threads: 0
gsarin gsarin is offline Offline
Newbie Poster

Re: Perl-CGI Tomcat

 
0
  #4
May 11th, 2009
Thanks for replying..
I actually get stuck when I try to run Esscmd script from with a perl-cgi script as follows

system ("E:\\Hyperion\\essbase\\bin\\esscmd.exe", "E1_test.cmd")
Or
system ("esscmd.exe", "E1_test.cmd")

Both give the following error:

"Essbase Command Mode Interface - Release 9.3.1 (ESB9.3.1.0.0B181) Copyright (c) 1991, 2007, Oracle and/or its affiliates. All rights reserved. U.S. Patent Number 5,359,724 U.S. Patent Number 6,317,750 Failed in GCInit(). Return code 10 ARBORPATH variable isn't set, using default value You should always set ARBORPATH variable Using ARBORPATH [\ARBOR] ARBORPATH dump: \(5c) A(41) R(52) B(42) O(4f) R(52) \(5c) Path to locale files passed to GCInit() was ESSLANG variable isn't set Could not find the locale files at specified location".

Esscmd command runs fine from windows command promt. Env. ARBORPATH is set to "E:\Hyperion\Essbase" and PATH is set to "E:\HYperion\essbase\bin".

Esscmd.exe is present in "E:\Hyperion\Essbase\bin" and "E:\Hyperion\AnalyticAdministrationServices\server\bin".

I understand that perl-cgi script is unable to locate esscmd because it looks in it's default cgi-bin folder somewhere in C:\Program files\Apache Group\Apache\cgi-bin.

Will the problem be solved if I set ARBORPATH to "E:\HYperion\essbase\bin" along with "E:\Hyperion\Essbase". Will this have any other implications?

IS there any other way I can get rid of this issue.

Any pointers will be appreciated.

Thanks in Advance!!
Gaurav


Originally Posted by mitchems View Post
What uid is the Tomcat Server running as? What uid are you running at the command prompt? You might try an su to the uid of the Tomcat server and see if the script runs. You might have to change ownership or chmod the directories. If that doesn't work, I'm... uh ... sort of out of ideas.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 5
Reputation: gsarin is an unknown quantity at this point 
Solved Threads: 0
gsarin gsarin is offline Offline
Newbie Poster

Re: Perl-CGI Tomcat

 
0
  #5
May 12th, 2009
Issue Solved.

I had to set up the environment variables related to essbase in apache config file.

THE environment variables for Apache CGI are different from that of the operating system and have to be set in the Apache httpd.confg file.

Thanks for the replies though.

Gaurav
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Perl
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC