这是完整的错误:
PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[08004] SQLConnect: 1033 [unixODBC][Oracle][ODBC][Ora]ORA-01033: ORACLE initialization or shutdown in progress\nProcess ID: 0\nSession ID: 0 Serial number: 0\n'
我正在使用unixODBC连接到Oracle 11g数据库。 数据库已经起作用,可以作为certificate:
select open_mode from v$database;
回报
open_mode ----------------- read write
该服务的Web应用程序也是完全有效的。
最后,我可以运行:
isql -v [odbc store] [user] [password]
并以这种方式查询数据库就好了。
所以我真的不知道为什么我不能通过ODBC连接来获得我所需要的。 我读过的所有内容都表明,我应该遵循类似于以下的过程: 链接来解决类似的问题
感谢您的任何意见。 我真的在我的智慧在这里结束。
我的build议是,不是使用unixODBC,而是使用11g本地instantclient(从Oracle网站下载)和PHP Oracle Call Interfaces。 我一直在使用这些很长一段时间,到目前为止,我从来没有任何问题。
这里是如何设置PHP OCI的指南: http : //www.php.net/manual/en/oci8.installation.php
Oracle Instantclient: http : //www.oracle.com/technetwork/database/features/instant-client/index-097480.html