Window 7,PHP,无法加载动态库' C:\ PHP \ ext \ php_oci8.dll'

时间:2015-11-06 00:29:54

标签: php

我在窗口7中安装了PHP,运行简单的PHP没有问题。 当我想连接oracle db 11g XE时,使用from django.db.backends.postgresql_psycopg2.base import DatabaseError, \ IntegrityError, DatabaseWrapper as PostgresWrapper class DatabaseWrapper(PostgresWrapper): def _reconnect(self): try: self.connect() except (DatabaseError, OperationalError): pass def ensure_connection(self): """ Guarantees that a connection to the database is established. """ if self.connection is None: with self.wrap_database_errors: self._reconnect() else: try: self.connection.cursor().execute('SELECT 1') except (DatabaseError, OperationalError): self._reconnect() 我收到以下错误:

$conn = oci_connect ($user, $pawd, 'localhost/XE');

我检查了C:\ PHP \ ext \ php_oci8.dll,我在php.ini文件中更改了以下内容。

Unable to load dynamic library 'C:\PHP\ext\php_oci8.dll' ...
Unable to load dynamic library 'C:\PHP\ext\php_oci8_11g.dll' ...
PHP Fatal error: Call to undefined function oci_connect (..);

这背后的问题是什么?

1 个答案:

答案 0 :(得分:0)

尝试将文件orannzsbb11.dll,oci.dll和oraociei11.dll复制到c:\ windows \ system32