Forum Stats

  • 3,827,643 Users
  • 2,260,802 Discussions
  • 7,897,323 Comments

Discussions

Can php not use oracle client rather than oracle instant client + trouble enabling oci8

user5716448
user5716448 Member Posts: 1,748 Silver Badge
edited Apr 11, 2017 5:15AM in PHP

Hi,

Have php installed and can run php.

Have oracle client installed and can use this with sqlplus and other third-part tools including 32-bit applications which use remote oracle datbases.

However, troubling enabling oci as doonot see it in phpinfo.

Have eidtefd php.ini checked have dll etc.

couple of questions

1)   what is difference between instant client and oracle client with regard php is oracle client not enough

2) is there a way to log errors/debug to see why cone ction between php and racle not ebing made.

php 7, oracle 11.2.0.3 iis on windows oracle on remote database

Thanks

Answers

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee
    edited Apr 9, 2017 10:38PM

    Re oracle client vs Instant Client: see the FAQ: Instant Client FAQ

    Re debugging, there are various levels of debugging, such as adding this to PHP scripts:

    error_reporting(E_ALL);  // In PHP 5.3 use E_ALL|E_STRICT 
    ini_set('display_errors', 'On');

    Start with this.  You probably don't need to do network tracing

  • user5716448
    user5716448 Member Posts: 1,748 Silver Badge
    edited Apr 10, 2017 10:38AM

    Thanks for reply.

    When copy the oci.dll from the oracle client directory we see oci8 enabled but then get message

    [10-Apr-2017 12:47:16 UTC] PHP Warning:  oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries

    we have the oracle client which is 32-bit and works with all other 32-bit applications on the pc which is running windows 8.1.

    Why can't it see oracle client - php extnesions o.k as when comment out in others can see O.K?

  • Christopher Jones-Oracle
    Christopher Jones-Oracle Member Posts: 1,648 Employee
    edited Apr 10, 2017 6:08PM

    > oci_connect(): OCIEnvNlsCreate() failed.

    This error means that you are using an OCI8 DLL compiled for Oracle 12 but your PATH is picking up Oracle 11 libraries.

  • user5716448
    user5716448 Member Posts: 1,748 Silver Badge
    edited Apr 11, 2017 5:15AM

    Thanks for advice.

    We have oracle 11.2.0.3 client installed and oracle 12 instant client which put in PATH as first entry so would have thought this would have picked it up.

    In the meantime, installed php 5.4.45 like my colleague and can see oci8 as enabled it and poving as you mentioned can use php with standard oracle client.

    Do you know if the latest version of php on the website requires a particular version of oracle 12 client client - had used the 32-bit one?

This discussion has been closed.