Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Running dynamically linked CGIs?

Re: Running dynamically linked CGIs?

From: Ramon F Herrera <ramon_at_conexus.net>
Date: 3 Jul 2003 13:11:18 -0700
Message-ID: <c9bc36ff.0307031211.7a7ec290@posting.google.com>


As several of you correctly guessed, the problem turned out to be a missing environment variable ($ORACLE_HOME).

Boy, there's really more than one way to skin a cat. My solution was to modify the cgi-bin program as shown below. That'll do for now.

Later on, I'll look into the NG suggestions.

Thanks to all!

-Ramon

void
setupEnvironment()
{

// if Oracle is homeless, give him a good home

    if (!getenv("ORACLE_HOME")) {

        setenv("ORACLE_HOME", "/home/oracle/product/9.2.0", 0);
        fromWeb = TRUE;
        }
    else
        fromWeb = FALSE;

    return;
}

[...]

if (fromWeb)

    printf("Content-type: application/pdf\n\n");

ramon_at_conexus.net (Ramon F Herrera) wrote in message

> Having said that, I am not out of the woods yet. The
> new error message says:
>
> nclaims:
> FAILED: OCIInitialize()
> nclaims:
> FAILED: init_handles()
> nclaims:
> There was an error on 'OCILogon'
> [Thu Jul 3 03:39:02 2003] [error] [client x.x.x.x]
> Premature end of script headers:
> /home/ramon/public_html/cgi-bin/claimsof.cgi
>
> (the same programs runs flawlessly from the Unix shell).
>
> Now it looks like the OCI .so library is being found
> at link time, but not at execute time??
>
> TIA,
>
> -Ramon
Received on Thu Jul 03 2003 - 15:11:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US