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

Recommended Answers

All 4 Replies

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.

The question is probably best asked on a forum dedicated to http servers and not a CGI forum dedicated to CGI scripts.

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

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.