3 Replies Latest reply: Feb 14, 2013 11:52 AM by cj RSS

    Unable to configure OCI8

    ckapilc
      On rhel 6.3 Server with PHP Version 5.3.21 unable to configure oci8 Extension.

      [root@imauat ~]# rpm -qa | grep oracle
      oracle-instantclient11.1-devel-11.1.0.7.0-1.x86_64
      oracle-instantclient11.1-basic-11.1.0.7.0-1.x86_64
        • 1. Re: Unable to configure OCI8
          cj
          Review http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html

          See "Compiling PHP as an Apache Module on Linux" p. 71 and then follow
          "Installing OCI8 on Linux as a Shared Extension Using PECL" p. 75 or
          "Manually Installing OCI8 on Linux as a Shared Extension" p. 76
          [This post was updated; originally I referred to the previous edition
          of the book!]

          I'd use Instant Client 11.2 if possible, since this will give you some
          benefits if you ever use REF CURSORs, even if your DB is older.
          • 2. Re: Unable to configure OCI8
            ckapilc
            [root@imauat oci8-1.4.9]# php -v
            PHP Warning: PHP Startup: oci8: Unable to initialize module
            Module compiled with module API=20090626
            PHP compiled with module API=20100525
            These options need to match
            in Unknown on line 0

            Warning: PHP Startup: oci8: Unable to initialize module
            Module compiled with module API=20090626
            PHP compiled with module API=20100525
            These options need to match
            in Unknown on line 0
            PHP 5.4.11 (cli) (built: Feb 9 2013 15:31:26)
            Copyright (c) 1997-2013 The PHP Group
            Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
            • 3. Re: Unable to configure OCI8
              cj
              The API used by extensions to call core PHP functionality is versioned and you are using an extension from a different version of PHP.

              I don't know what you installed or where you got it from. I don't know what you want to use PHP for. This makes it difficult to give a direct solution.

              If you are not sure what information to post here, see "Be precise and informative about your problem" in http://www.catb.org/esr/faqs/smart-questions.html

              Installing PHP and OCI8 on RHEL is pretty easy once you decide on the method of install you want to do. The Underground PHP & Oracle Manual has several of the methods.

              Installing PHP and OCI8 on Oracle Linux (which is RHEL compatible) is even easier, since an OCI8 RPM is available to supported customers. The drawback is that the version of PHP was fixed by RH and is not the latest.