[英]PHP, IIS, Oracle (OCI) not working
We are migrating from a Windows SBS 2011 to Windows Server 2012 R2. 我们正在从Windows SBS 2011迁移到Windows Server 2012 R2。
We have an internal website that connects to our Oracle database using PHP. 我们有一个内部网站,可以使用PHP连接到我们的Oracle数据库。
I am trying to migrate this to the new server and so far I have: 我正在尝试将其迁移到新服务器,到目前为止,我已经:
I am still getting error messages like oci_ commands not being recognised etc. 我仍然收到诸如oci_命令无法识别等错误消息。
I'm lost. 我迷路了。 I've searched online and the instructions match what I have done from memory.
我已经在网上进行搜索,说明中的内容与我从内存中所做的内容相符。
I haven't found a single thing online that I haven't done. 我没有在网上找到一件我还没有做过的事情。
Depending on the version of InstantClient you have installed you might need to include the bin
folder in the path, like so: 根据您安装的InstantClient的版本,您可能需要在路径中包含
bin
文件夹,如下所示:
C:\instantclient\bin
To check if the DLL files are available in the path enter where oci*.dll
in a command prompt. 要检查DLL文件在路径中是否可用,请在命令提示符下输入
where oci*.dll
。 It should return a list of matching files. 它应该返回匹配文件的列表。
Also, remember that just because your account can see the DLL files doesn't mean IIS/PHP can. 另外,请记住,仅仅因为您的帐户可以看到DLL文件,并不意味着IIS / PHP可以。 That runs under a different account that might not have permission to access the files.
它在可能没有权限访问文件的其他帐户下运行。 Check your IIS error log and PHP
php_errors.log
file for any specific error messages. 检查您的IIS错误日志和PHP
php_errors.log
文件,以获取任何特定的错误消息。
Edit 编辑
After a rather lengthy chat , the problem was resolved by: 经过相当长时间的聊天 ,该问题已通过以下方法解决:
msvcr71.dll
to the InstantClient folder. msvcr71.dll
的副本添加到InstantClient文件夹中。 Path
environment variable correctly pointed to the InstantClient and PHP folders. Path
环境变量正确指向InstantClient和PHP文件夹。 try this: 尝试这个:
extension=php_oci8_12c.dll (instead of php_oci8.dll) - that is what I am using and you probably downloaded the same instant client as I did. extension = php_oci8_12c.dll(而不是php_oci8.dll)-这就是我正在使用的,您可能下载了与我相同的即时客户端。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.