Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

(Ovid) Re: DBD::Oracle issues

by Ovid (Cardinal)
on Jul 31, 2001 at 19:23 UTC ( [id://101187]=note: print w/replies, xml ) Need Help??


in reply to DBD::Oracle issues

This may be a complete Red Herring, but why do you need to load DBD::Oracle? The DBI module handles that for you. I've done a lot of database programming with DBI and I've never had to load a DBD. Have you simply tried to use DBI and let it handle the DBD for you?

Cheers,
Ovid

Vote for paco!

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

Replies are listed 'Best First'.
(jjhorner)Re: (Ovid) Re: DBD::Oracle issues
by jjhorner (Hermit) on Jul 31, 2001 at 19:25 UTC

    In the production script, we just do a DBI connect, but it is failing also. Since we can get the same error just by calling DBD::Oracle, I just sent this code to show the error.

    I hope this helps.

    J. J. Horner
    Linux, Perl, Apache, Stronghold, Unix
    jhorner@knoxlug.org http://www.knoxlug.org/
    

      You may not have a permissions problem, though it certainly appears to be one. Here's the comments in Dynaloader immediately prior to line 200:

      # Many dynamic extension loading problems will appear to come from # this section of code: XYZ failed at line 123 of DynaLoader.pm. # Often these errors are actually occurring in the initialisation # C code of the extension XS file. Perl reports the error as being # in this perl code simply because this was the last perl code # it executed.

      How did you install DBI and DBD::Oracle? If you compiled DBD::Oracle yourself, perhaps there was an error? Can you successfully load other DBDs?

      Side note: I think your Perl code is not doing exactly what you think it's doing. Your use statements are embedded in the HTML and you print statements saying that "such and such modules were loaded". However, use happens at compile time, not run-time, so your statements regarding when they were loaded are misleading. That's also why you're getting the incorrect headers: The error messages are output prior to "Content-type: text/html\n\n" being printed.

      Cheers,
      Ovid

      Vote for paco!

      Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

        Good points!

        As for the compile, this is on an NT box, so we just used install DBD::Oracle from the ppm command line.

        Here's the full story. I thought I could get by with a focused instance, but it appears not:

        We had a site developer trying to connect to an Oracle database and draw out some information from a table. He was getting an error similar to the one above. Almost word-for-word, actually. We copied his code, specifically his 'use DBI' line and his DBI connect statement, including the authentication stuff. When we put it into our own script in another area, without anonymous access turned on, and without our anonymous user having NTFS permissions, it worked, after we authenticated. When we looked at his again, it didn't work. We put our script in his area, and it didn't work. We turned off anonymous access, and after login, it worked. I'm not an NT expert. I'd prefer to use Apache, mod_perl, and Linux any day, and twice on Sundays, but this is not my box. This does, however, appear to be an NTFS permission, possibly regarding the anonymous user and the rights of the anonymous user somewhere inside perl or orant directories. We've temporarily awarded full control to the anonymous user and, to be sure, the Everyone group. Still, no love.

        Added:

        We have a script that gives us clues as to where things occur. We 'use DBI;', print out some html code, and say something along the lines of "Starting to connect to database...". Then try to connect to the database with uid, passwd, etc. This allows our developers to get a better idea of where things are failing. When I say developers, I mean site developers, not really hard-core perl people. We did do things by the book, at first, but as things have progressed, we have tried to distill the problem a bit, and this is really what you see. Thanks,

        Any ideas?

        J. J. Horner
        Linux, Perl, Apache, Stronghold, Unix
        jhorner@knoxlug.org http://www.knoxlug.org/
        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://101187]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 02:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found