CMD中的Php.exe会抛出“调用未定义函数oci_connect()”。 [英] Php.exe in CMD throws "Call to undefined function oci_connect()"

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

问题描述

我在Windows XP中安装了XAMPP和PHP 5.2.6。在我的php.ini中,我没有注释下几行:

I have XAMPP installed with PHP 5.2.6 in Windows XP. In my php.ini I have the next lines uncommented:


  • extension = php_oracle.dll

  • extension = php_oci8.dll

我有这样的文件:

<?php

$conn = oci_connect('hr', 'welcome', 'localhost/XE');

?>

但是当我尝试通过cmd对该文件调用php.exe时,控制台总是给我一个提示。错误:

But when I try call to php.exe through cmd to that file, the console always give me an error:


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

Fatal Error: Call to undefined function oci_connect()

在我的本地主机中,我对此没有任何问题。

In my localhost I have no problem with this.

推荐答案

可能,而不是在命令行中查看正确的php.ini文件。

Probably, you're not looking at the right php.ini file for the command line.

在php.exe中,运行:

In php.exe, run:

echo phpinfo();

然后在顶部查找php.ini路径。

then look for the php.ini path at the top.

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

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