简体   繁体   English

如何使用Oracle oci8_11g在xampp(Windows 7)中配置PHP 5.6 / Apache 2.4?

[英]How to configure PHP 5.6/Apache 2.4 in xampp(Windows 7) with Oracle oci8_11g?

I'm using Xampp environment (PHP 5.6.21/Apache 2.4.17/MySQL 5.0) in windows 7 32 bit . 我在Windows 7 32位环境中使用Xampp环境(PHP 5.6.21 / Apache 2.4.17 / MySQL 5.0)

I'm trying to connect to the Remote Oracle Database using Oracle Instant Client in PHP. 我正在尝试使用PHP中的Oracle Instant Client连接到远程Oracle数据库。

I can able to load the oci8_11g related Dll files into the application, But Oracle Run-time Client Library Version is not loading. 我可以将oci8_11g相关的Dll文件加载到应用程序中,但是没有加载Oracle Run-time Client Library Version。 Here I have attached the screenshot, Kindly help me in resolving the issue. 在这里,我附上了屏幕截图,请帮助我解决问题。

your suggestions are appreciated. 您的建议表示赞赏。

点击这里查看图片

Really i got frustrated with oracle configuration with PHP. 确实,我对使用PHP进行oracle配置感到沮丧。 Finally i got the solution. 终于我得到了解决方案。 Please go through the Following steps. 请执行以下步骤。

  1. First check your PHP version and Windows OS(32-bit or 64-bit). 首先检查您的PHP版本和Windows OS(32位或64位)。
  2. Go to www.oracle.com/technetwork/topics/winsoft-085727.html. 转到www.oracle.com/technetwork/topics/winsoft-085727.html。
  3. Download the files which are related to your PHP and windows configuration. 下载与您的PHP和Windows配置相关的文件。
  4. Place the Oracle Instant Client folder in your system C:\\ drive. 将Oracle Instant Client文件夹放置在系统C:\\驱动器中。
  5. Update the PATH in the Environment Variables with your Oracle Instant Client folder path. 使用Oracle Instant Client文件夹路径更新环境变量中的PATH。
  6. Add this line to your Apache HTTP.conf file "LoadModule fcgid_module modules/mod_fcgid.so". 将此行添加到您的Apache HTTP.conf文件“ LoadModule fcgid_module modules / mod_fcgid.so”。
  7. Go to www.apachelounge.com/download/VC11/ and Download the file "modules-2.4-win32-VC11.zip" 转到www.apachelounge.com/download/VC11/并下载文件“ modules-2.4-win32-VC11.zip”
  8. Extract the folder "modules-2.4-win32-VC11.zip" and find the folder with this name "mod_fcgid-2.3.9" 解压缩文件夹“ modules-2.4-win32-VC11.zip”并找到名称为“ mod_fcgid-2.3.9”的文件夹
  9. Copy the "mod_fcgid.so" file and place this file into your "C:\\xampp\\apache\\modules". 复制“ mod_fcgid.so”文件,然后将此文件放入“ C:\\ xampp \\ apache \\ modules”中。
  10. Go to windows.php.net/downloads/pecl/releases/oci8/2.0.6/" and search for "php_oci8-2.0.6-5.5-ts-vc11-x86". 转到Windows.php.net/downloads/pecl/releases/oci8/2.0.6/”,然后搜索“ php_oci8-2.0.6-5.5-ts-vc11-x86”。
  11. Download the file "php_oci8-2.0.6-5.5-ts-vc11-x86" and extract this file and place them in your "C:\\xampp\\php\\ext". 下载文件“ php_oci8-2.0.6-5.5-ts-vc11-x86”,然后解压缩此文件并将其放在“ C:\\ xampp \\ php \\ ext”中。
  12. Go to php.ini and enable your extension "extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client" 转到php.ini并启用扩展名“ extension = php_oci8_11g.dll;与Oracle 11gR2 Instant Client一起使用”
  13. Just restart your Xampp Apache and Check your oci enable or or not by browsing phpinfo(); 只需重新启动Xampp Apache并通过浏览phpinfo()来检查是否启用了oci;
  14. Strat using your Oracle Services with PHP Application. 将您的Oracle Services与PHP应用程序一起使用。

Hope this solution is helpful for you guys.. Thanks. 希望此解决方案对您有所帮助..谢谢。

Have you got Oracle libraries in your PATH ? 您的PATH是否有Oracle库? They can be from a database installation or from http://www.oracle.com/technetwork/topics/winsoft-085727.html You'll need 32 bit libraries if you are using 32 bit PHP. 它们可以来自数据库安装,也可以来自http://www.oracle.com/technetwork/topics/winsoft-085727.html如果使用32位PHP,则需要32位库。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM