OCI8/oracle DLL HELL --

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DravenStone

    OCI8/oracle DLL HELL --

    Hi,
    I had just a horrible day at work, spent pretty much the entire day
    trying to get php_oci.dll and php_oracle.dll to load. It still never
    did.

    Super Quick Background.
    Jack of all trades IT guy, have written many tools using perl and JSP
    in the past.
    Had a chance to do a big project, and figured I would use it to learn
    PHP.
    Did all development on my XP Pro station, they bought a windows 2003
    Small Business Server to run the application on.
    99% of the application is powered by MQSQL
    Using XAMPP distrabution.

    Make ONE call on ONE page to a legacy oracle database we have (8)...
    Works FINE on my machine.

    Ported everything to the server. NO DICE enabling php_oci8.dll and
    php_oracle.dll
    PHP is 5.5.1.

    DL'ed instant client. Pulled the three dll's I am supposed to out, put
    them in C:\instantclien t
    Added C:\instantclien t to class path:

    Error loading dll, procedure not found (note: not module... It's
    finding the oci and oracle dll in the /ext directory)...

    I think it's more an oracle driver/dll/something I can't figure out
    problem.
    I've spent a whole day googling things, trying to change this classpath
    and that class path, adding something71.dll and somethingelse71 .dll
    (forgive me, I'm at home now and can't remember exactly)...

    But absolutely nothing worked.

    Does anyone know the secret to what I need to install on the server to
    get these babies to run? It's making me feel like a fool having spent
    all day working on something that really should be simple.

    If I need to install some other oracle "client software" can anyone
    tell me specifically what it is I need other then instant client? I ask
    that because I've seen three dozen refreances to a vague "oracle client
    software"

    I could go on, but I'm just venting now...
    Please, any pointers to what the heck I need would be SO SO SO
    appreciated.
    Kind Regards,
    ds

  • ^blib^

    #2
    Re: OCI8/oracle DLL HELL --

    DravenStone wrote:
    [color=blue]
    > Ported everything to the server. NO DICE enabling php_oci8.dll and
    > php_oracle.dll
    > PHP is 5.5.1.[/color]

    You mean 5.1.1?

    I have a bit of oracle & php experience, but only on *nix. However, I
    hate to see a fellow odd job man struggling, so I'll try and help.

    Try replacing your php_oci8.dll with the one corresponding to your php
    version here:



    Dump the php_oracle.dll completely if you can. You should need the
    full-blown Oracle client for that anyway, it won't work with the
    instantclient (as I recall). The Oracle extension is highly deprecated
    in favour of the oci8 extension.

    Talking of the big fat Oracle client, you can download it from here if
    you need it:



    Good luck,
    Gareth

    Comment

    • DravenStone

      #3
      Re: OCI8/oracle DLL HELL --

      Yeah, 5.1.1 doing everything from (not so sharp) memory now that I'm
      home and trying to stop being annoyed.

      Much thanks for your links, I'll try both straight away in the morning.

      With regards to the oracle client -- do you find/believe that it in
      fact a necessary component to get oci to work with PHP under windows?

      -ds

      Comment

      • DravenStone

        #4
        Re: OCI8/oracle DLL HELL --

        Oh and one more piece of pseudo interesting information...

        The XAMPP dist. installs adodb as well.

        I found that it works fine on the development machine to make a test
        connection using that library to my oracle server, but again, that does
        not work on the new (soon to be) production machine... Thinking that
        this just goes to help support my theory that it's a windows/oracle
        issue more so then a PHP one.

        However, that doesn't discount my new interest in trying an updated
        version of the oci8.dll from Gareth's post, since I can tell it's a
        newer build for 1.1 then was packaged with XAMPP

        more thanks,
        -ds

        Comment

        • Andy Hassall

          #5
          Re: OCI8/oracle DLL HELL --

          On 6 Feb 2006 15:15:23 -0800, "DravenSton e" <chiptricks@gma il.com> wrote:
          [color=blue]
          >I had just a horrible day at work, spent pretty much the entire day
          >trying to get php_oci.dll[/color]

          What is php_oci.dll? Do you mean php_oci8.dll?
          [color=blue]
          > and php_oracle.dll to load.[/color]

          Forget php_oracle.dll, that's for Oracle 7.
          [color=blue]
          >Make ONE call on ONE page to a legacy oracle database we have (8)...
          >Works FINE on my machine.
          >
          >Ported everything to the server. NO DICE enabling php_oci8.dll and
          >php_oracle.d ll
          >PHP is 5.5.1.[/color]

          What version is it really?

          Not that it should actually make any difference in terms of getting it going
          in the first place, but 5.1.2 comes with a considerably updated version of the
          OCI8 extension with lots of bug fixes and some new features (persistent
          connection pinging and timeouts, for example).
          [color=blue]
          >DL'ed instant client. Pulled the three dll's I am supposed to out, put
          >them in C:\instantclien t[/color]

          Unpack all of the instant client zip rather than picking and choosing, unless
          you really know what you're doing.
          [color=blue]
          >Added C:\instantclien t to class path:[/color]

          Class path is Java, do you mean PATH?
          [color=blue]
          >Error loading dll, procedure not found (note: not module... It's
          >finding the oci and oracle dll in the /ext directory)...[/color]

          Which of the two PHP extensions were you trying to load at this point?
          [color=blue]
          >I think it's more an oracle driver/dll/something I can't figure out
          >problem.
          >I've spent a whole day googling things, trying to change this classpath
          >and that class path, adding something71.dll and somethingelse71 .dll
          >(forgive me, I'm at home now and can't remember exactly)...
          >
          >But absolutely nothing worked.[/color]

          Hacking around isn't going to help and will just get you into more of a mess
          since you won't know how to undo it. There's a just a few steps you have to do
          to get Oracle PHP support working, but it's not at all forgiving to messing
          around. Were you following any particular instructions, such as:
          http://www.oracle.com/technology/pub...p_instant.html ?

          I see there it mentions unzipping just three of the Instant Client DLLs, well,
          I suppose that's on an Oracle site so they should know which ones are needed,
          but it makes sense to unpack the lot.

          The usual snag I hit on Windows is getting the updated environment variables
          into the web server process - remember that if you just restart it, it may not
          see the new environment. If you open a new command window after changing the
          environment variable, then use "net stop apache2" and "net start apache2" then
          it's more likely to pick up the change. (Or reboot)

          The other one is permissions; make sure the web server user has permissions to
          access all the libraries and files involved. That's usually an issue with the
          full client install that locks down permissions by default, rather than the
          instant client.

          --
          Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
          http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

          Comment

          • DravenStone

            #6
            Re: OCI8/oracle DLL HELL --


            What is php_oci.dll? Do you mean php_oci8.dll?

            Of course... sorry, I reference it properly three other times in the
            post...
            [color=blue]
            > and php_oracle.dll to load.[/color]

            Forget php_oracle.dll, that's for Oracle 7.

            Agreed...

            [color=blue]
            >Make ONE call on ONE page to a legacy oracle database we have (8)...
            >Works FINE on my machine.[/color]
            [color=blue]
            >Ported everything to the server. NO DICE enabling php_oci8.dll and
            >php_oracle.d ll
            >PHP is 5.5.1.[/color]

            What version is it really?

            5.1.1, which I clarafied in an earlier response, sorry...

            Not that it should actually make any difference in terms of getting it
            going
            in the first place, but 5.1.2 comes with a considerably updated version
            of the
            OCI8 extension with lots of bug fixes and some new features (persistent
            connection pinging and timeouts, for example).

            Yup, I read all about that today, but I'm not running 5.1.2...
            [color=blue]
            >DL'ed instant client. Pulled the three dll's I am supposed to out, put
            >them in C:\instantclien t[/color]

            Unpack all of the instant client zip rather than picking and choosing,
            unless
            you really know what you're doing.

            I've tried that as well... I tried everything I could think of...
            [color=blue]
            >Added C:\instantclien t to class path:[/color]

            Class path is Java, do you mean PATH?

            Yes, I mean path. Sorry, like I said, I'm a jack of all trades, master
            of none kind of guy and I have done a lot of JSP stuff so I've got java
            on the brain... (Plus I wrote this when I got HOME from work and was
            already brain fried)...
            [color=blue]
            >Error loading dll, procedure not found (note: not module... It's
            >finding the oci and oracle dll in the /ext directory)...[/color]

            Which of the two PHP extensions were you trying to load at this point?

            oci8 and oracle (both of which I load fine on my other machine)
            [color=blue]
            >I think it's more an oracle driver/dll/something I can't figure out
            >problem.
            >I've spent a whole day googling things, trying to change this classpath
            >and that class path, adding something71.dll and somethingelse71 .dll
            >(forgive me, I'm at home now and can't remember exactly)...[/color]
            [color=blue]
            >But absolutely nothing worked.[/color]

            Hacking around isn't going to help and will just get you into more of
            a mess
            since you won't know how to undo it. There's a just a few steps you
            have to do
            to get Oracle PHP support working, but it's not at all forgiving to
            messing
            around. Were you following any particular instructions, such as:
            http://www.oracle.com/technology/pub...p_instant.html ?

            I followed those exactly. Further, I had followed those exactly on my
            other machine and it worked in two minutes as it should... hence my
            amazingly high level of frustration.

            I see there it mentions unzipping just three of the Instant Client
            DLLs, well,
            I suppose that's on an Oracle site so they should know which ones are
            needed,
            but it makes sense to unpack the lot.

            Again, I tried that, no help.

            The usual snag I hit on Windows is getting the updated environment
            variables
            into the web server process - remember that if you just restart it, it
            may not
            see the new environment. If you open a new command window after
            changing the
            environment variable, then use "net stop apache2" and "net start
            apache2" then
            it's more likely to pick up the change. (Or reboot)

            Multiple times I restarted apache using a variety of methods AND
            rebooted...

            The other one is permissions; make sure the web server user has
            permissions to
            access all the libraries and files involved. That's usually an issue
            with the
            full client install that locks down permissions by default, rather than
            the
            instant client.

            Was logged in as administrator all day, XAMPP was installed as admin as
            well.

            Comment

            • DravenStone

              #7
              Re: OCI8/oracle DLL HELL --

              If anyone cares...
              I blew away 2003 small business server, and installed 2K advanced
              server, and boom... everything worked fine in under 10 minutes...

              Comment

              Working...