简体   繁体   English

如何将PHP连接到Oracle9i服务器

[英]How to connect PHP to Oracle9i server

I read some steps about this one but I can't really get it. 我阅读了有关此步骤的一些步骤,但我确实无法理解。 I'm using wamp server for this with PHP 5.3.5. 我将wamp服务器用于PHP 5.3.5。 I tried to use the php_oci8.dll by checking the PHP>PHP extensions>php_oci8 but I get an error saying 我试图通过检查PHP> PHP扩展> php_oci8来使用php_oci8.dll,但出现错误提示

PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.5/ext/php_oci8.dll - The specified module could not be found

When I go to the path the php_oci8.dll is there. 当我转到路径时,php_oci8.dll就在那儿。 How can I fix this? 我怎样才能解决这个问题? Can anybody give me a steps on how can I configure it so that I can connect to a remote server? 有人可以给我一些如何配置它的步骤,以便可以连接到远程服务器吗?

尝试在此处下载最新版本的dll php_oci8-1.4.1-5.2-vc6-x86.zip

I already figured it out! 我已经知道了! Here's my solution: 这是我的解决方案:

  1. Install Oracle XE in your PC this will give you the latest oci.dll (not php_oci8.dll) 在您的PC上安装Oracle XE,这将为您提供最新的oci.dll(而非php_oci8.dll)
  2. Create a link between your user and the user you will need in connecting to your database. 在用户与连接数据库所需的用户之间创建链接。
  3. Restart your PC then try running your code if it's not working copy the oci.dll of your Oracle XE (C:\\Oracle\\OUIHome\\bin\\oci.dll) then paste it in 9i replacing the old one (make sure to have a backup). 重新启动PC,然后尝试运行您的代码(如果它无法正常工作),复制Oracle XE的oci.dll(C:\\ Oracle \\ OUIHome \\ bin \\ oci.dll),然后将其粘贴到9i中,以替换旧的代码(确保有一个备用)。 then restart your PC. 然后重启电脑。

Works fine on me. 对我很好。 Thanks for those who help me in solving this one. 感谢那些帮助我解决这一问题的人。

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

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