Re: Running dynamically linked CGIs?
From: Tim X (timx_at_spamto.devnul.com)
Date: 07/07/03
- Next message: Gareth Ansell: "NFSroot error 13"
- Previous message: Kieran: "Re: Connecting Wireless Router to a Linux-IP-Masquerading based network"
- In reply to: Ramon F Herrera: "Re: Running dynamically linked CGIs?"
- Next in thread: Steve Howard: "Re: Running dynamically linked CGIs?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 07 Jul 2003 18:30:21 +1000
>>>>> "Ramon" == Ramon F Herrera <ramon@conexus.net> writes:
Ramon> I am going to answer part of my own posting.
Ramon> ramon@conexus.net (Ramon F Herrera) wrote in message
Ramon> news:<c9bc36ff.0307022246.430292fd@posting.google.com>...
Ramon> [...]
>> It seems that the Apache server doesn't have access to the Oracle
>> libraries. I tried linking the application statically, but that
>> doesn't seem to be an option (?) with OCI. Next, I looked at the
>> httpd config file and copied the library in question
>> (libclntsh.so.9.0) to the directory /etc/httpd/modules/. (Am I in
>> the right direction?) The problem now is that I am not sure about
>> what the entry should look like. There is an example:
>>
>> # Example: # LoadModule foo_module modules/mod_foo.so
>>
>> So I figure that the entry should be something like this:
>>
>>
>> LoadModule what_the_heck_goes_here modules/libclntsh.so.9.0
>>
Ramon> The LoadModule has _nothing_ to do with this, dummy :-)
Ramon> Those modules are linked to the Apache server itself, and not
Ramon> to the cgi-bin or other apps that may be exec'd by Apache.
Ramon> The error message above was fixed simply by adding
Ramon> $ORACLE_HOME/lib
Ramon> To the /etc/ld.so.conf file and redoing the .so cache.
Ramon> Having said that, I am not out of the woods yet. The new
Ramon> error message says:
Ramon> nclaims: FAILED: OCIInitialize() nclaims: FAILED:
Ramon> init_handles() nclaims: There was an error on 'OCILogon' [Thu
Ramon> Jul 3 03:39:02 2003] [error] [client x.x.x.x] Premature end of
Ramon> script headers: /home/ramon/public_html/cgi-bin/claimsof.cgi
Ramon> (the same programs runs flawlessly from the Unix shell).
Ramon> Now it looks like the OCI .so library is being found at link
Ramon> time, but not at execute time??
When running your OCI cgi program from the unix shell are you using
the same user that apache is running as? e.g. nobody?
It could be that when you are testing it, you have a properly defined
oracle environment (ORACLE_HOME, ORACLE_SID etc), but not when the cgi
script is running under the user who runs apache or the user who is
running apache does not have access to directories needed etc.
Tim
-- Tim Cross The e-mail address on this message is FALSE (obviously!). My real e-mail is to a company in Australia called rapttech and my login is tcross - if you really need to send mail, you should be able to work it out!
- Next message: Gareth Ansell: "NFSroot error 13"
- Previous message: Kieran: "Re: Connecting Wireless Router to a Linux-IP-Masquerading based network"
- In reply to: Ramon F Herrera: "Re: Running dynamically linked CGIs?"
- Next in thread: Steve Howard: "Re: Running dynamically linked CGIs?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]