两位所说的我都做过了, 这里出现的问题是: 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 6Warning: ora_open(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 7Warning: ora_commiton(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 8Warning: 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方式 如果要这个方式 前面的步鄹多余的 -----------------------------------------------------------------------
出现错误信息“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成功!
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 6Warning: ora_open(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 7Warning: ora_commiton(): supplied argument is not a valid Oracle-Connection resource in C:\apache\htdocs\mananger\zongz\public\connect.php on line 8Warning: 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方式 如果要这个方式 前面的步鄹多余的
-----------------------------------------------------------------------
1. 我的机子是想用win2000+iis5.0配置的, 不是用apache
2. extension_dir = c:\php\extensions, 已设置正确
3. 客户端确已安装, 因为用C:\php\sapi\php4isapi.dll方式时, php连oracle运行正常, 函数也能用. 因为只有当客户端确已安装时, 他才能用.一切成功, 但是ASP also failing.
PHP能访问数据库,并不是说能ASP也可以,因为他们的访问方法不一样的,Asp不会去使用PHP的模块的,即使技术上可以,微软也不会这样做的。