Stuck Call to undefined function oci_connect() using XAMPP

你离开我真会死。 提交于 2019-12-22 08:12:20

问题


i'm want connect PHP to Oracle Database 12c, i'm already try in this video https://www.youtube.com/watch?v=KJme5JMxKeo

  • i'm already install xampp v3.2.2 and using PHP 5.6

  • install oracle database 12c : http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  • test login in SQLPlus

  • unzip and paste Instant Client(Version 12.1.0.2.0) http://www.oracle.com/technetwork/topics/winsoft-085727.html to directory C

  • set path environtment C:\instantclient_12_1;

  • uncoment semicolon (;) extension=php_oci8_12c.dll in php.ini

  • and already download php_oci8_12c.dll file in here : http://pecl.php.net/package/oci8/2.0.8/windows

    and already paste to in C:\xampp\php\ext

  • when i test script connect : http://pastebin.com/f1isKKar

error message : Call to undefined function oci_connect()

i'm confused why can't connect to ORACLE DATABASE 12c :(


回答1:


you are very close.

  1. Add oci.dll, oraociei12.dll, and oraons.dll from C:\instantclient_12_1 to xampp/apache/bin folder. Replace the existing ones.

  2. Restart the Apache

N.B: Make sure that your PATH environment variable are set to this folder "C:\instantclient_12_1".




回答2:


Check whether command line PHP works. See if there are any log errors. Make sure you have the right OCI8 DLL. Triple check you have 32bit Oracle Instant Client and that it occurs first in PATH. If you have other Oracle libraries installed then your webserver may be finding them first: fix this.




回答3:


i have the exact same problem and fix it in the php.ini file by uncommenting this

extension_dir = "./" "remove semicolon"



来源:https://stackoverflow.com/questions/41652210/stuck-call-to-undefined-function-oci-connect-using-xampp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!