致命错误:调用未定义的函数oci_connect() [英] Fatal error: Call to undefined function oci_connect()

查看:1271
本文介绍了致命错误:调用未定义的函数oci_connect()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下一行未注释(在我的php.ini中):

I have the next lines uncommented (in my php.ini):

extension=php_oracle.dll 
extension=php_oci8.dll

我下载了这个文件 instantclient-basiclite-nt -11.2.0.2.0.zip 并解压缩并将其放在驱动器D上...

And I downloaded this file instantclient-basiclite-nt-11.2.0.2.0.zip and unzipped and put that on drive D...

我使用的是Windows XP

I am using Windows XP

我设置了这样的环境变量:

I set environment variable like this:

LD_LIBRARY_PATH     C:\instantclient_11_2:$LD_LIBRARY_PATH 
ORACLE_HOME     C:\instantclient_11_2 

但是当我执行 oci_connect()函数,我看到这个错误:

But when I execute oci_connect() function, I see this error :


致命错误:调用未定义的函数oci_connect()in ...

Fatal error: Call to undefined function oci_connect() in ...

我在erroeLog文件中发现了这个警告:

and i found this warnings on erroeLog file:


[29-Dec-2011 00:36:39] PHP警告:PHP启动:无法加载动态库'c:\ php \ ecxt \ php_oci8.dll' - 指定的mod找不到你。第0行的未知

[29-Dec-2011 00:36:39] PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\php_oci8.dll' - The specified module could not be found. in Unknown on line 0

[29-Dec-2011 00:36:39] PHP警告:PHP启动:无法加载动态库'c: \php\ext\php_oracle.dll' - 找不到指定的模块。

[29-Dec-2011 00:36:39] PHP Warning: PHP Startup: Unable to load dynamic library 'c:\php\ext\php_oracle.dll' - The specified module could not be found.


推荐答案

要检查的事项:


  • 您无需设置 LD_LIBRARY_PATH 也不是 ORACLE_HOME 。但是,您需要将 D:\ instantclient_11_2 添加到 PATH 环境变量,然后重新启动计算机以应用更改。

  • You don't need to set LD_LIBRARY_PATH nor ORACLE_HOME. However, you need to add D:\instantclient_11_2 to the PATH environmental variable and restart the computer so changes apply.

在配置PHP之前,请检查您的Oracle客户端库是否真正有效(例如,尝试与SQL Developer连接)。

Before configuring PHP, check that your Oracle client libraries actually work (for instance, try to connect with SQL Developer).

注释掉 extension = php_oracle.dll 。它属于旧的和已弃用的Oracle扩展。

Comment out the extension=php_oracle.dll. It belongs to the old and deprecated Oracle extension.

仔细检查 php_oci8.dll 文件是否为真的在 c:\ php \ ecxt \php_oci8.dll

Double check that the php_oci8.dll file is really at c:\php\ext\php_oci8.dll?

这篇关于致命错误:调用未定义的函数oci_connect()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆