Hi

I have a problem with getting the php_oracle.dll and/or php_oci8.dll to work in windows.

I use win2k, iis and php4.2.2

Ive installed oracle client 8.0.5

After that i remove the ; from the extension row in php.ini and try to open a .php file that looks like this:
<?echo "test";?>

The page never comes up in explorer it just stands thinking. On the server i get the following error:
"Unable to load dynamic link library 'c:\php\ext\php_oracle.dll"(with oci8 dll it stands oci8 instead of oracle).

It works fine with for example php_mssql.dll and they are in the same folder. I have just copied them there from the extension folder from the dist.

I have no idea whats wrong, but need this to work so if someone know whats wrong or encountered this before PLEASE writw what u know..

thanks in advance..

    I have looked att oci8.dll in dependency walker and found that it reports errors in oci.dll when i open php_oci8.dll.

    If i open oci.dll by itself there seem to be no errors.

    Should i search for another oracle client version(have 8.0.5 now) or is it just shitty programming on the php side?

    And my question stands... is there ANYONE that has gotten this to work??
    And if so have you experienced these type of errors and what os/ora client/webserver did u use?

      Have it currently running on following combination:

      Os: Win98 and Win2K
      Oracle Version: 8i (8.1.7)
      Web Server : Apache 1.3.26 (have had it running on previous versions)
      Php Version : 4.2.2 (have had it runing under 4.1.x as well)

      Steps I did:
      1. Set up Apache for PHP (not very relevant in your case, sorry)
      2. Set the extensions directory in php.ini to where I had installed PHP.
      e.g. extension_dir = "E:\program files\php4\extensions"
      3. Uncommented the line:
      extension=php_oci8.dll
      4. Left the comment in on:
      ;extension=php_oracle.dll
      5. Installed the oracle client for 8i
      6. Set up tnsnames etc.

      It ran.

      Only thoughts on your situation are:

      1. Incorrect extensions directory in php.ini
      2. IIS doesn't have permission to access the php extensions directory.

      HTH
      Justin

        Hi!

        Thanks for the reply

        Regarding the right to files. All extension dll:s + the dir has full rights to the everyone group so that shouldnt bee a problem.

        The directory cant be wrong because the ms_sql.dll extension is in the same directory and that works fine.

        I have a little theory about that dependencies in php_oci8.dll fails due to lack or error in dependent files.

        Im using client 8.0.5(im gonna connect against an oracle 7 db but doesnt matter because i cant even load the extension so...)

        I would like to try out 8.1.7 client instead but then i have to get hold of it first...

        U know anyplace to hold of it justin?
        (i have a fast connection)

          Ohh one more thing...
          Justin, u wrote set up tns names.... Since im complete noob on oracle i just want to get one thing straight...

          After i install oracle client i ONLY need to config php for oracle right?
          I dont need to set up the client i mean, just as long as the right files are there?

            Getting hold of the client - sorry don't know anywhere that just has the client files.

            Tnsnames setup is only usefull because it lets you check your connection to the oracle database using sqlplus 🙂

            HTH
            Justin

              Got yet qnother question 🙂

              This is my code for conencting to oracle:

              putenv("ORACLE_SID=<database>");
              putenv("ORACLE_HOME=<ip adress>");
              ora_logon("<username>", "<password>");

              with this i get the error:

              Warning: Oracle: Connection Failed: ORA-12203: TNS:cannot connect to the destination in C:\webpublic\test.php on line 5

              anyone know what i did wrong? 🙂

                Write a Reply...