I took over someone else job, they had the website setup for work already. It connects to an Oracle DB and displays the reults of queries. We recently switched servers so I copied all the files over, installed PHP5(he had PHP4 on the old server) and I setup IIS. My homepage is a php file and it works, the php counter works too. When I try and access a php file that uses the OCIConnect function it displays everything up to the pointi in the file where that function is. I get no errors when I uncheck Show Friendly HTTP Error Messages.

I had learned that I need to recompile PHP so I thought I have Visual Studio at the house if I just need to go in and edit that code somehow.

I heard that I just needed to add extensions to php, I was told to uncomment the lines in the php.ini that say
extension=php_oci8.dll;
extension=php_oracle.dll;

But I did not find them in there so I added them. I then had to download the files from te PECL website. Still does not work. when I run phpInfo() I done see a mention of it installed. What am I doing wrong? I am running Oracle 9.2 BTW.

    I moved the php folder from c:\program files to c:\

    I seen somewhere I can run
    php -v in my command prompt to see errors and I get

    cannot find c:\php\php_oci8.dll

    its there!

      the actual error I get when I run
      php -v is

      Unable to load dynamic library 'c:\php\pho_oci8.dll'
      The specified module could not be found.

      I have the dll file in the correct place so why can it not find the module? Is the dll file the module? Or do I need to install something else?

        the actual error I get when I run
        php -v is

        Unable to load dynamic library 'c:\php\php_oci8.dll'
        The specified module could not be found.

        I have the dll file in the correct place so why can it not find the module? Is the dll file the module? Or do I need to install something else?

          I have copied the php(4.0) folder from the old server and the orant folder too Setup the new server to run from those folders. Whether I use the orant folder, the ora102(client 10.2 library that I downloaded) or the ora92(oracle 9.2 I installed) i get the same errors

          ora-12222 and sometimes ora-12505. I looked at the listener.ora file on the old server and it has no mention of the SID that the php was using to connect. Using php5.2.4 I do not get any error mgs I would like to use 5.2.4 but if it will not work with oracle then ill use 4.0 since I know it worked at one time.

            I have 5.2.4 working and now it cannot connect to the DB I checked this with an If statement.

            But phpinfo() now has a oci8 spot and I will share it with you to make sure everything looks good.

            oci8
            OCI8 Support enabled

            Version 1.2.4

            Revision $Revision: 1.269.2.16.2.38 $

            Active Persistent Connections 0

            Active Connections 0

            Temporary Lob support enabled

            Collections support enabled

            Directive Local Value Master Value
            oci8.default_prefetch 10 10
            oci8.max_persistent -1 -1
            oci8.old_oci_close_semantics 0 0
            oci8.persistent_timeout -1 -1
            oci8.ping_interval 60 60
            oci8.privileged_connect Off Off
            oci8.statement_cache_size 20 20

            I also put in the ODBC part becuase this may be the problem I don't have the Oracle ODBC Driver isntalled.

            odbc
            ODBC Support enabled
            Active Persistent Links 0

            Active Links 0

            ODBC library Win32

            Directive Local Value Master Value
            odbc.allow_persistent On On
            odbc.check_persistent On On
            odbc.default_db no value no value
            odbc.default_pw no value no value
            odbc.default_user no value no value
            odbc.defaultbinmode return as is return as is
            odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
            odbc.max_links Unlimited Unlimited
            odbc.max_persistent Unlimited Unlimited

              The fix to get the extension to work would have been adding the PHP directory to your system's PATH environment variable (a vital step outlined in both my guides here as well as the instruction guide in the manual).

              As to your current problem, we'd need to see some code as well as the exact error message returned.

                no TNS listener.

                Seems the listener.ora file has changed format between Oracle 8 and oracle 10.2 This seems to be the issue. I will make a new one(once I figure out how) and see if that works.

                  Write a Reply...