我如何...如何使用xampp与PHP连接到oracle 12c [英] How do i...how to connect to oracle 12c with PHP using xampp

查看:215
本文介绍了我如何...如何使用xampp与PHP连接到oracle 12c的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到oracle 12c,它已经通过php安装在我的本地机器上,使用XAMPP服务器。我收到一个错误说明:



致命错误调用未定义的函数oci_connect()在php xampp

PLS帮助。

提前致谢。



我的尝试:



我已经在我的php.ini中启用了以下扩展名



; extension = php_oci8.dll

; extension = php_oci8_11。 g.dll

删除;所以结果如下:



extension = php_oci8.dll

extension = php_oci8_11.g.dll



应用更改后重新启动服务器



我已经下载并安装了Oracle Instant Client但没有进展。

解决方案

请参阅 PHP:安装 - 手册:使用OCI8配置PHP [ ^ ]:

Quote:

在Windows上使用Oracle 10gR2客户端库时,取消注释php.ini行extension = php_oci8.dll。使用Oracle 11gR2或更高版本的客户端库时,请取消注释extension = php_oci8_11g.dll或extension = php_oci8.dll。使用Oracle 12c库时,请使用extension = php_oci8_12c.dll或extension = php_oci8_11g.dll或extension = php_oci8.dll。 一次只能启用其中一个DLL 。具有更高版本的DLL可能包含更多功能。并非所有版本的PHP都可以使用所有DLL。 确保extension_dir设置为包含PHP扩展DLL的目录



另请参阅疑难解答部分:

引用:

安装OCI8最常见的问题是没有正确设置Oracle环境。使用oci_connect()或oci_pconnect()通常会出现问题。



Quote:

On Windows在一台计算机上具有多个版本的Oracle可能很容易导致库冲突,除非注意确保PHP仅使用正确版本的Oracle。


I am currently trying yo connect to oracle 12c, which has been installed on my local machine via php, using a XAMPP server. I am getting an error stating:

fatal error call to undefined function oci_connect() in php xampp
PLS help.
Thanks in advance.

What I have tried:

I have ttied to enable the below extension in my php.ini

;extension=php_oci8.dll
;extension=php_oci8_11.g.dll
by removing the ";" so that the results will below:

extension=php_oci8.dll
extension=php_oci8_11.g.dll

restarted the server after applying changes

I slso downloaded and installed the Oracle Instant Client yet no progress.

解决方案

See PHP: Installation - Manual: Configuring PHP with OCI8[^]:

Quote:

When using Oracle 10gR2 client libraries on Windows, uncomment the php.ini line extension=php_oci8.dll. When using Oracle 11gR2 or later client libraries, uncomment extension=php_oci8_11g.dll or extension=php_oci8.dll. With Oracle 12c libraries use extension=php_oci8_12c.dll or extension=php_oci8_11g.dll or extension=php_oci8.dll. Only one of these DLLs may be enabled at a time. DLLs with higher versions may contain more functionality. Not all DLLs may be available for all versions of PHP. Make sure extension_dir is set to the directory containing the PHP extension DLLs.


See also the Troubleshooting section:

Quote:

The most common problem with installing OCI8 is not having the Oracle environment correctly set. This typically appears as a problem using oci_connect() or oci_pconnect().


Quote:

On Windows, having multiple versions of Oracle on the one machine can easily cause library clashes unless care is taken to make sure PHP only uses the correct version of Oracle.


这篇关于我如何...如何使用xampp与PHP连接到oracle 12c的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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