简体   繁体   English

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

[英]Fatal error: Call to undefined function oci_connect()

I have the next lines uncommented (in my php.ini): 我的下一行没有注释(在我的php.ini中):

extension=php_oracle.dll 
extension=php_oci8.dll

And I downloaded this file instantclient-basiclite-nt-11.2.0.2.0.zip and unzipped and put that on drive D... 然后我下载了该文件instantclient-basiclite-nt-11.2.0.2.0.zip并将其解压缩并放在驱动器D上。

I am using Windows XP 我正在使用Windows XP

I set environment variable like this: 我像这样设置环境变量:

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

But when I execute oci_connect() function, I see this error : 但是当我执行oci_connect()函数时,我看到此错误:

Fatal error: Call to undefined function oci_connect() in ... 致命错误:在...中调用未定义的函数oci_connect()

and i found this warnings on erroeLog file: 我在erroeLog文件上发现了以下警告:

[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. [29-Dec-2011 00:36:39] PHP警告:PHP启动:无法加载动态库'c:\\ php \\ ext \\ php_oci8.dll'-找不到指定的模块。 in Unknown on line 0 在第0行的Unknown中

[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. [2011年12月29日00:36:39] PHP警告:PHP启动:无法加载动态库'c:\\ php \\ ext \\ php_oracle.dll'-找不到指定的模块。

Things to check: 检查事项:

  • You don't need to set LD_LIBRARY_PATH nor ORACLE_HOME . 您无需设置LD_LIBRARY_PATHORACLE_HOME However, you need to add D:\\instantclient_11_2 to the PATH environmental variable and restart the computer so changes apply. 但是,您需要将D:\\instantclient_11_2添加到PATH环境变量中,然后重新启动计算机,以便应用更改。

  • Before configuring PHP, check that your Oracle client libraries actually work (for instance, try to connect with SQL Developer). 在配置PHP之前,请检查您的Oracle客户端库是否真正起作用(例如,尝试与SQL Developer连接)。

  • Comment out the extension=php_oracle.dll . 注释掉extension=php_oracle.dll It belongs to the old and deprecated Oracle extension. 它属于旧的且已弃用的Oracle扩展。

  • Double check that the php_oci8.dll file is really at c:\\php\\ext\\php_oci8.dll ? 仔细检查php_oci8.dll文件是否确实位于c:\\php\\ext\\php_oci8.dll

php_oci8.dll文件放入php/ext目录后,是否重新启动了Apache?

Just add this line to the php.in file that point to the location of extensions, should know where they are located, but normally in php folder. 只需将此行添加到php.in文件中即可指向扩展的位置,应该知道它们的位置,但通常在php文件夹中。

extension_dir = C:\\xampp\\php\\ext ; this is for me using xampp, be wise. 这是我使用xampp的明智选择。

It worked for me. 它为我工作。 The problem is with accessing the extensions and has nothing to do with oracle libraries. 问题在于访问扩展,与oracle库无关。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 致命错误:调用未定义的函数 oci_connect() php 错误 - Fatal error: Call to undefined function oci_connect() php error 致命错误:调用Wamp中未定义的函数oci_connect() - Fatal error: Call to undefined function oci_connect() in Wamp PHP8 + Oracle OCI8 => 致命错误:未捕获错误:调用未定义的函数 oci_connect() - PHP8 + Oracle OCI8 => Fatal error: Uncaught Error: Call to undefined function oci_connect() 无法加载oci8 - >致命错误:调用未定义的函数oci_connect() - can not load oci8 -> Fatal error: Call to undefined function oci_connect() PHP中的Oracle连接错误。 致命错误:调用未定义函数oci_connect() - Oracle Connection Error in PHP. Fatal error: Call to undefined function oci_connect() WAMP服务器由于致命错误而停止工作:调用未定义函数oci_connect() - WAMP server stopped working due to Fatal error: Call to undefined function oci_connect() 调用未定义函数 oci_connect() - Call to undefined function oci_connect() 致命错误:在第3行的C:\\ xampp \\ htdocs \\ Project1 \\ connect.php中调用未定义函数oci_connect() - Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\Project1\connect.php on line 3 致命错误:未捕获错误:通过命令提示符运行php脚本时调用未定义函数oci_connect() - Fatal error: Uncaught Error: Call to undefined function oci_connect() while running the php script through command prompt 致命错误:在第71行的C:\\ xampp81 \\ htdocs \\ aaainc \\ db.php中调用未定义函数oci_connect() - Fatal error: Call to undefined function oci_connect() in C:\xampp81\htdocs\aaainc\db.php on line 71
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM