调用未定义的函数oci_connect() [英] Call to undefined function oci_connect()

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

问题描述

我收到此错误.

Fatal error: Call to undefined function oci_connect()
$conn = oci_connect('localhost', 'username', 'password') or die(could not connect:'.oci_error)

那是代码.

这是我得到的错误.

Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\org\org\php\myphp.php on line 51

我检查了ext文件夹中的PHP DLL文件.

I checked the PHP DLL files in ext folder.

在这个问题上有人帮助,谢谢.

Somebody help on this issue thanks in advance.

推荐答案

我只花了整整三天的时间来解决这个问题.

I just spend THREE WHOLE DAYS fighting against this issue.

我在Windows 7中使用我的ORACLE连接,没有问题.上周,我刚得到一台装有Windows 8的新计算机.安装XAMPP 1.8.2.此服务器上的每个应用程序PHP/MySQL都可以正常运行.当我尝试将php应用程序连接到Oracle DB时出现了问题.

I was using my ORACLE connection in Windows 7, and no problem. Last week I Just get a new computer with Windows 8. Install XAMPP 1.8.2. Every app PHP/MySQL on this server works fine. The problem came when I try to connect my php apps to Oracle DB.

调用未定义的函数oci_pconnect()

Call to undefined function oci_pconnect()

当我通过更改启动/停止Apache时,"PHP启动"上出现一个奇怪的警告",并带有"PHP警告:PHP启动:在未知的第0行"显示为LOG

And when I start/stop Apache with changes, a strange "Warning" on "PHP Startup" that goes to LOG with "PHP Warning: PHP Startup: in Unknown on line 0"

我做了所有操作(未注释php_oci8.dll和php_oci8_11g.dll,将oci.dll复制到/ext目录,在/Apache附近,并且没有任何作用.下载每个版本的Instant Client和NOTHING.

I did everything (uncommented php_oci8.dll and php_oci8_11g.dll, copy oci.dll to /ext directory, near /Apache and NOTHING it works. Download every version of Instant Client and NOTHING.

上帝帮助了我.当我下载32位ORACLE Instant Client时,一切正常. phpinfo()显示oci8信息,我的应用程序运行正常.

God came into my help. When I download ORACLE Instant Client 32 bits, everything works fine. phpinfo() displays oci8 info, and my app works fine.

因此,永远不要认为您的Windows版本是x64.链接位于XAMPP和ORACLE Instant Client之间.

So, NEVER MIND THAT YOUR WINDOWS VERSION BE x64. The link are between XAMPP and ORACLE Instant Client.

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

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