php配置oracle的问题, 错误

fristfly 2004-05-07 09:04:03
系统配置:win2k+ii5+php
照着这里配置的,
http://www.kehui.net/index.php?op=article&file=read&aid=16337
<?
print phpinfo();
?>
已能正常运行,
可是出现
Unable to load dynamic library 'c:/php/extensions/php_oci8.dll'的错误, 怎么办

我在一个网站看到这样子的解释:http://bugs.php.net/bug.php?id=12821
大家救命, 如何解决?
...全文
587 8 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
fristfly 2004-05-09
  • 打赏
  • 举报
回复
不是, 楼上的理解有错误, 我是说我的php配置好了, 任何asp程序就不执行了,
seamusonline 2004-05-08
  • 打赏
  • 举报
回复
PHP访问Oralce是使用API,也就是扩展模块,但是Asp访问Oracle是使用ODBC,你确认你安装了Oralce数据库的ODBC驱动了吗?
PHP能访问数据库,并不是说能ASP也可以,因为他们的访问方法不一样的,Asp不会去使用PHP的模块的,即使技术上可以,微软也不会这样做的。
seamusonline 2004-05-07
  • 打赏
  • 举报
回复
出现错误信息“Unable to load dynamic library 'c:/php/extensions/php_oci8.dll'”,其实是一个表面错误,我想你一定没有安装Oracle8i 的客户端。

首先,访问http://otn.oracle.com/software/products/oracle8i/index.html下载8.1.7 Client for windows,按照标准方式安装就可以了。

然后,检查你的php.ini中"extension_dir = c:\php\extensions"是不是设置正确(请确定'c:/php/extensions/php_oci8.dll'文件存在)。

最后,启动Apache成功!
fristfly 2004-05-07
  • 打赏
  • 举报
回复
两位所说的我都做过了, 这里出现的问题是:
1. 当我用C:\php\sapi\php4isapi.dll方式时, php连oracle运行正常,但是asp文件程序不能用了, 查过了安装文档, 有这么一段, 不大懂E文不知如何解决:
-----------------------------------------------------
PHP 4 for Windows comes in two flavours - a CGI executable (php.exe),
and several SAPI modules (for exapmle php4isapi.dll). The latter form
is new to PHP 4, and provides significantly improved performance and
some new functionality. However, please note that the SAPI modules
are *NOT* yet considered to be production quality.
In particular, with the ISAPI module, you are likely to encounter serious
reliability problems especially on platforms older than W2K - you may
witness a lot of server 500 errors and suffer from other server modules
such as ASP also failing. You have been warned!

The reason for this is that the PHP SAPI modules are using the
thread-safe version of the PHP code, which is new to PHP 4, and has
not yet been tested and pounded enough to be considered completely
stable, and there are actually a few known bugs. On the other hand,
some people have reported very good results with the SAPI modules,
and there a few reports of problems with the Apache module version.
In short - your mileage may vary; If you need
absolute stability, trade the performance of the SAPI modules
with the stability of the CGI executable.
-----------------------------------------------------

2. 当我用cgi模式时C:\php\php.exe %s %s
我的程序出现以下错误:
------------------------------------------------
Warning: Unable to connect to ORACLE (ORA-12699: TNS:本地服务内部错误) in C:\apache\htdocs\mananger\zongz\public\connect.php on line 6

Warning: ora_open(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 7

Warning: ora_commiton(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 8

Warning: ora_parse(): supplied argument is not a valid Oracle-Cursor resource in C:\apache\htdocs\mananger\zongz\public\functions.php on line 74
--------------------------------------------------------------------

附:
-----------------------------------------------------------------------
php-4.3.2-Win解压在D:\PHP4 //对了
copy d:\php4\php.ini-dist c:\winnt\php.ini //对了
copy d:\php4\php4ts.dll c:\winnt\system32\ //错了 考到winnt下好点
copy D:\PHP4\sapi\php4isapi.dll c:\winnt\system32\ //没必要

设置IIS中.PHP的解释文件为D:\PHP4\php.exe //这个是CGI方式 如果要这个方式 前面的步鄹多余的
-----------------------------------------------------------------------
xylegend 2004-05-07
  • 打赏
  • 举报
回复
php_oci8.dll拷贝到系统目录试试
zhuomaocn 2004-05-07
  • 打赏
  • 举报
回复
\php\extensions目录下有没有php_oci8.dll这个文件啊?
fristfly 2004-05-07
  • 打赏
  • 举报
回复
救命...
fristfly 2004-05-07
  • 打赏
  • 举报
回复
to seamusonline(包子) :
1. 我的机子是想用win2000+iis5.0配置的, 不是用apache
2. extension_dir = c:\php\extensions, 已设置正确
3. 客户端确已安装, 因为用C:\php\sapi\php4isapi.dll方式时, php连oracle运行正常, 函数也能用. 因为只有当客户端确已安装时, 他才能用.一切成功, 但是ASP also failing.


21,893

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧