First is the DB remote ie on another boxen as asked? Anyway I expect it is so try this:

$user = 'foo@localhost';

Replace localhost with the external NUMERICAL (probably ;-) IP of your box - the one it is going to use to connect to Oracle.

Now ITFM it is noted that:

If the environment variable DBI_AUTOPROXY is defined (and the driver i +n $data_source is not ``Proxy'') then the connect request will automa +tically be changed to: $ENV{DBI_AUTOPROXY};dsn=$data_source DBI_AUTOPROXY is typically set as ``dbi:Proxy:hostname=...;port=...''. + If $ENV{DBI_AUTOPROXY} doesn't begin with 'dbi:' then ``dbi:Proxy:'' + will be prepended to it first. See the DBD::Proxy documentation for +more details.

So it may well be that your actual connect is specifying diffenerent details like the hostname and port perhaps? Hostnames and ports are handy connecting to remote DBs. But I am speculating because you don't supply enough detail. Still this is one of my current working theorums. Perhaps this env variable is set for you but not apache. To test the ENV dump in off the command line where it is working and dump it in you CGI before it explodes. If there are differences you could do worse than to fix them and see if the problem goes away.

Thinking about it on Win32 with ODBC database access you set up (or the installer does) a mapping from a DSN (Data Source Name) to the actual DB. Do this. Start|Run|odbcad32. You will see a dialog. I expect that you have a user DSN (which lets you connect to Oracle) but Apache does not. Add a system DSN and the problem should go away. If that is the problem. But then other people could perhaps get a the DB which may be another problem. Too many problems for one night.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: Re: Re: Re: Re: perl db connection problems by tachyon
in thread perl db connection problems by foobarbaz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.