Pro*C/C++ Execution problem...

Hi,

I created a program with Pro*C/C++ to connect with ORACLE.. It's run OK as when i use oracle user to execute it...

I added the following enviroment variables to nobody user:
LD_LIBRARY_PATH=/usr/local/oracle/app/product/8.0.6/lib
ORACLE_BASE=/usr/local/oracle
ORACLE_HOME=/usr/local/oracle/app/product/8.0.6
ORACLE_SID=USADOS

But when i try to execute with other username  (nobody) i get the next error:
Can't find libclntsh.so.1.0 library...

I copied libclntsh.so.1.0 to /lib but i get a lot of errors like:
ORACLE error--
 Error while trying to retrieve text for error ORA-12547

nobody user can execute sqlplus and connect to oracle with next problems:

Error accessing PRODUCT_USER_PROFILE
Warning:  Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM

Can anyone help me!
Regards...
javi2Asked:
Who is Participating?
 
cadabraConnect With a Mentor Commented:
Maybe you have to tweak your apache configuration files, to enable the environment variables to be visible to Perl/CGI.

Maybe try using SetEnv directive ...
0
 
cadabraCommented:
1. Which platform are you running your program on (OS / Oracle version)?
2. What error messages are you getting (interactively, and in sqlnet.log) ?
3. Can you connect to the "nobody" user with sql*plus ?
0
 
kkootyCommented:
As cadabra commented please give us a clear picture where the
file resides and how your trying to fire it. Does the user  
(nobody) having acess to all the tables your using in the pro*c.

What are all the error messages u get when u run the exe.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
javi2Author Commented:
Edited text of question.
0
 
cadabraCommented:
===================================================================================
> nobody user can execute sqlplus and connect to oracle with next problems:

> Error accessing PRODUCT_USER_PROFILE
> Warning:  Product user profile information not loaded!
> You may need to run PUPBLD.SQL as SYSTEM

This is'nt a problem. If you run the pupbld.sql script as user system, this will go away ...

Which Unix are we talking about  ?

Can you post all the environment variables and their values as defined in the Oracle unix user account ?

Which shell is defined for the Oracle unix account, and which for the nobody unix account ?

Note: Please don't edit the text of the question, but rather post comments with additional information, so that everyone may follow the history of the discussion .
0
 
kkootyCommented:
The problem is only with environment setup.
You will have to login in to oracle as system and run PUPBLD.SQL  .

And set the enviroment for the user  nobody. This should solve your problem.
0
 
javi2Author Commented:
Unix --> Solaris 6

My oracle user as next enviroment variables...
LD_LIBRARY_PATH=/usr/local/oracle/app/product/8.0.6/lib
ORACLE_BASE=/usr/local/oracle
ORACLE_HOME=/usr/local/oracle/app/product/8.0.6
ORACLE_SID=USADOS
TNS_ADMIN=/usr/local/oracle/app/product/8.0.6/network/admin
LD_LIBRARY_PATH=/usr/local/oracle/app/product/8.0.6/lib

and uses /bin/sh shell

nobody user uses tcsh shell and i added all enviroment variables to nobody user like oracle user...

When i execute a Pro*C/C++ program in nobody shell it works fine...
but when i use the program like a apache CGI i get next error from sql_error()

ORACLE error--
Error while trying to retrieve text for error ORA-12547

Manual says TNS connection is broken...
0
 
cadabraCommented:
Run a CGI script in apache that displays all the environment variables it sees and their values, and post them as a comment.

0
 
javi2Author Commented:
Hi,,
This are server variables:

SERVER_SOFTWARE: Apache/1.3.3 (Unix) mod_perl/1.16
DOCUMENT_ROOT: /data/imail/httpd/htdocs
GATEWAY_INTERFACE: CGI-Perl/1.1
REMOTE_ADDR: 212.66.181.89
SERVER_PROTOCOL: HTTP/1.0
SERVER_SIGNATURE:
REQUEST_METHOD: GET
QUERY_STRING:
HTTP_USER_AGENT: Mozilla/4.7 [en] (WinNT; I)
PATH: /bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin
TZ: US/Eastern
HTTP_CONNECTION: Keep-Alive
HTTP_ACCEPT: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
REMOTE_PORT: 64257
LD_LIBRARY_PATH: /data/imail/lib:/data/imail/lib:/data/imail/lib
MOD_PERL: 1.16
HTTP_ACCEPT_LANGUAGE: en
SCRIPT_NAME: /cgi-bin/login/env.cgi
SCRIPT_FILENAME: /data/imail/httpd/cgi-bin/login/env.cgi
HTTP_ACCEPT_ENCODING: gzip
SERVER_NAME: sun00838.dn.net
REQUEST_URI: /cgi-bin/login/env.cgi
HTTP_ACCEPT_CHARSET: iso-8859-1,*,utf-8
NLSPATH: /data/imail/lib/nlslib/%L/%N.cat:/data/imail/lib/nlslib/%L/%N.cat
SERVER_PORT: 82
PERLHOME: /data/imail/perl
HTTP_HOST: 209.207.236.62:82

I don't have ORACLE environment variables, how can i had to user?!?
0
 
javi2Author Commented:
OK...

I'm using putenv at C programm, it's works fine...

Cadabra i want accept you the question...
0
 
cadabraCommented:
You can use "accept comment as answer option" ...
0
 
kkootyCommented:
kkooty changed the proposed answer to a comment
0
All Courses

From novice to tech pro — start learning today.