Call to undefined function oci_connect, php_oci8_11g.dll , windows 10, php5.6.24

谁说胖子不能爱 提交于 2019-11-28 14:36:02

You are getting startup errors for the OCI8 extension indicating that you are using an unsupported dll for your php version. You need to use the correct one, which - for PHP 5.6.x - is one of these:

You need to take the one that matches your architecture (x86 or x64), compiler (vc 9, 11, 14) and thread-safe (ts) or non-thread-safe (nts) php version, e.g. if you are running a thread-safe PHP 5.6.24 compiled with vc11 on an x86, you'd use

php_oci8-2.0.8-5.6-ts-vc11-x86.zip
-------- ----- --- -- ---- --- ---
^        ^     ^   ^  ^    ^   ^
|        |     |   |  |    |   \_____ extension
|        |     |   |  |    \_________ architecture
|        |     |   |  \______________ compiler
|        |     |   \_________________ thread-safety mode
|        |     \_____________________ php version
|        \___________________________ extension version
\____________________________________ extension name

If there is no download matching your PHP, then it does not exist and you need to compile it yourself. More info at http://windows.php.net

On a side note: in addition to the above, you can only use one oci extension at a time. You got both (php_oci8.dll and php_oci8_11g.dll). Make sure to remove the one you don't need.

You can only enable one of these at a time: extension=php_oci8.dll extension=php_oci8_11g.dll They both enable the same OCI8 extension but they require different Oracle Instant Client versions. You say you are using Instant Client 11.2, so comment out the first extension.

Make sure you add the Instant Client directory to PATH.

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