oci_connect connection failed

后端 未结 5 1403
长发绾君心
长发绾君心 2020-12-18 15:55

I am having serious problem connecting to external ORA DB 11g from local Zend server CE. OCI8 is enabled and running version 1.4.6 (due to phpinfo()).

I

5条回答
  •  有刺的猬
    2020-12-18 16:38

    Due to several misconfigurations and 3 days lost while looking for a solution I moved to develop on Linux server and all of the problems are gone.

    What I have found:

    • both php_oci8.dll and php_oci8_11g.dll are depending on the Oracle Instant Client libraries
      • these libraries does not contain oci_ functions (like oci_connect), only ociX functions (like ociLogon) which is strange...
    • though I am pretty sure I have downloaded Oracle Instant Client Basic and all of the extensions, I was not able to connect to another Oracle server due to unknown charset and the error was saying I am using only Lite instant client...
    • I tried both 64bit and 32bit instant client version at no avail
    • my Apache is 64bit, windows is 64bit, PHP is 32bit, remote Oracle server is 64bit, remote Linux server is 64bit...
    • tried many environment settings (ORA_HOME, TNS_ADMIN, adjusted PATH to look to instant client installation) at no avail
    • tried uninstalling local Oracle XE server due to possible environment settings interference at no avail
    • almost lost my head - at no avail...

    So finaly on Linux server I have no problems connecting to remote Oracle server. Somewhere (while surfing over thousands of PHP-Oracle related pages) I have found an information that "one shouldn't develop PHP application connecting to Oracle server under windows" and should stick to UNIX system instead...

    So anybody experiencing similar or same problems - be so kind and do not waste Your time, install a VirtualBox, run Linux on it and move forward!

提交回复
热议问题