11 Replies Latest reply: Apr 24, 2012 7:08 PM by 926096 RSS

    Oracle 8.0.6.1.0 and PHP 5.2.17

    926096
      Hi all

      I need help, I've this enviroment:

      Dedicated Server:
      Oracle Version: 8.0.6.1.0 OS: UNIXware 6


      Web Server (Windows 7):
      Oracle Client Version: 9.2
      Oracle Instant Client: 10.1.0.5 (OCI Version: 1.2.5 Rev: 293036)
      Apache 2.2
      PHP 5.2.17 (OCI library uncommented)

      I can see the oci library enabled in phpinfo, but when I test my connection I got:

      *Warning: oci_connect() [function.oci-connect]:* ORA-03134: Connections to this server version are no longer supported. in C:\Apache\htdocs\reportes\cinco.php on line 3

      Fatal error: ORA-03134: Connections to this server version are no longer supported. in C:\Apache\htdocs\reportes\cinco.php on line 6

      The connection script that I used:


      +<?php+
      +$dbstr="(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.201.5.58)(PORT = 1521)) ) (CONNECT_DATA = (SID = ORA0) ) )";+
      +$conn = oci_connect('DBuser', 'DBpass', $dbstr);+
      +if (!$conn) {+
      +$e = oci_error();+
      trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
      +}+
      +?>+

      Please help me, bacause I'm so frustrated about it, I changed the instantclient version (10.1.05, 10.2.03, 10.2.0.4, 10.2.0.5, 11.1.0.6.0, ... 11.2.0.2.0) and the same error. Any idea for my case?

      Note: I can get a connection just using the client 9i, I mean with Toad or Telnet. (tnsping is OK )
        • 1. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
          cj
          Check Note 207303.1 on http://support.oracle.com. Oracle client libraries 9.2 and earlier will allow connection to Oracle Database 8.0.6.

          Since you have the 9.2 client, build PHP OCI8 using that.
          • 2. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
            926096
            I need to purchase a support license to see the Note *207303.1* on http://support.oracle.com .... But I don't understand what can I do for resolve my connection problem, the problem is for my oracle client 9.2?

            I've tried a lot but I don't know what is wrong. Could you explain me with more details?
            • 3. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
              cj
              Looking down the 8.0.6 column of the support interoperability matrix,
              the rows for Oracle clients 10.1 and higher are red "Not supported"
              status. They reference note #3 "An ORA-3134 error is correctly
              reported when attempting to connect to this version." This is what
              you are seeing.

              The Oracle 9.2 client row has purple "was supported" status meaning
              that it should technically work, but calling Oracle Support for help
              isn't possible.

              The PHP Windows team releases php_oci8.dll built with Oracle 10.2
              client libraries. You need to build PHP so it compiles and links with
              an Oracle 9.2 client, similar to this:

              export ORACLE_HOME=/path/to/my/9.2/oracle/home
              ./configure --with-oci8=$ORACLE_HOME ...
              make
              make install

              Windows instructions are at: https://wiki.php.net/internals/windows/stepbystepbuild

              I've never tested this combination.

              Overall, I'd step back and see if you have other options, such as
              upgrading the Database.

              Edited by: cj on Mar 26, 2012 11:17 AM
              • 4. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                926096
                Thanks for your time spent helping me. I'll check that you said and I'll back to tell you how's it going. I didn't know nothing about Windows SDK but I'll read so much about it. Also I'll install the Client Version 8.x.x maybe this could help me. By the way I can't upgrade the Data base, because it isn't mine and it works with other application called LG. Do I need to check something in the Server? maybe for enable or disable the oci library or something like that, I haven't done nothing in it.
                • 5. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                  cj
                  PHP OCI8 will only compile with Oracle 9.2 client or later. To connect to your Oracle 8.0.6 DB you will need to use only this Oracle 9.2 client.

                  There is no setting in the DB or in PHP that will prevent the ORA-03134. You must use a compatible Oracle client and Oracle DB version.

                  It is always easier to build and use PHP on Linux. You could install VirtualBox and try building PHP on any Linux.
                  • 6. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                    926096
                    I'm so disapointed with myself, I couldn't connect my php application to my oracle server. Anyone knows other connection option? Can I connect using ODBC connector, or a library, or whichever other?
                    • 7. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                      cj
                      Is it too hard to use Linux?
                      What does your PHP do?
                      How much data does the PHP app process? How often does it run?
                      Can you use an intermediate 9.2 DB that has DB links to the 8.0.6 database?
                      • 8. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                        926096
                        Answering the questions:
                        1.- It’s hard because I have a Windows Server 2003 as Webserver, and I can’t use other PC to configure another Webserver (He doesn’t want, I mean my boss), just for an app that use a connection to Oracle.
                        2. - First I want to connect to oracle 8i, after that, the app is going to make reports. I’m just want to use "SELECTS" and that’s’ it.
                        3. – It’s not too much.

                        How often does it run? When my boss wants to check them (the reports).
                        Can you use an intermediate 9.2 DB that has DB links to the 8.0.6 database?
                        Is it possible?  Can I have an intermediate DB?  How can I do it?



                        My job starts to depends on it.
                        • 9. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                          cj
                          2. - First I want to connect to oracle 8i
                          I assume you still meant 8.0 not 8i (which is 8.1). If it was 8.1.7
                          then you could use Instant Client 10.2 to connect to it.

                          Maybe you can sacrifice system efficiency and reliability by using
                          SQL*Plus to query the data on the DB machine? Use PHP to fetch the
                          results via remote file access.

                          Questions about DB links and DB architecture should be asked in other
                          OTN forums.
                          • 10. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                            926096
                            Yes you're right, I meant Oracle server 8.0.6.1.0, I'll open other thread about DB links, but I was thinking if is it possible to create a trigger (to copy in real time) or task to copy or export data from oracle Server 8.0.6.1.0 to Oracle server 10.x.x ?

                            If is it possible, I could connect any php app to Oracle 10.x.x, cause this one is still supported.

                            What do you think? Could it be a good way to try? Or are you still thinking about DB links? Which option is better?


                            Thanks for your time.
                            • 11. Re: Oracle 8.0.6.1.0 and PHP 5.2.17
                              926096
                              Hi all, the answer to my problem was a DBLink.

                              I installed Oracle 10g server in a different server than Oracle 8, then I made a Data base Link in Oracle 10g and I got it!... I connected PHP with Oracle 10g and then this one with oracle 8 server using DBlink.
                              It was like this:

                              Oracle 10g Server:

                              CREATE DATABASE LINK nombre_del_dblink
                              CONNECT TO usuario
                              IDENTIFIED BY password
                              USING '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST =
                              hostname)(PORT = 1521)) (CONNECT_DATA = (SID = SIDname)))'

                              Thanks for your help... I hope to help to someone else.

                              Regards