简体   繁体   English

PHP上的Oracle OCI连接已停止工作-Apache返回ERR_CONNECTION_RESET

[英]Oracle OCI connections on PHP have stopped working - Apache returns ERR_CONNECTION_RESET

All of a sudden ( ... I know ... ) my PHP app has stopped working. 我的PHP应用突然间(...我知道...)已停止工作。 When trying to establish a connection with the database I get a connection reset error. 尝试与数据库建立连接时,出现连接重置错误。

The PHP code is: PHP代码是:

 error_log("dbconn.php: db logon " . $un . "/" . $pw . "@" . $db, 0);
 $db_conn = oci_connect($un,$pw, $db); 
 error_log("dbconn.php: returned db logon ");

When I take the connection string and try using sqlplus it works fine. 当我使用连接字符串并尝试使用sqlplus时,它可以正常工作。

The php_error_log logs just the first message above. php_error_log仅记录上面的第一条消息。

XAMPP version is 1.8.1 PHP version: 5.4 XAMPP版本是1.8.1 PHP版本:5.4

OCI: OCI:

oci8
OCI8 Support    enabled
Version     1.4.7
Revision    $Id: bf2eaf558b050b6d2e6d098bed6345af7e842ea4 $
Active Persistent Connections   0
Active Connections  0
Oracle Run-time Client Library Version  10.2.0.3.0
Oracle Instant Client Version   10.2
Temporary Lob support   enabled
Collections support     enabled

Directive   Local Value Master Value
oci8.connection_class   no value    no value
oci8.default_prefetch   100 100
oci8.events Off Off
oci8.max_persistent -1  -1
oci8.old_oci_close_semantics    Off Off
oci8.persistent_timeout -1  -1
oci8.ping_interval  60  60
oci8.privileged_connect Off Off
oci8.statement_cache_size   20  20

I tried debugging using 我尝试使用调试

error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 'On');

oci_internal_debug(1); 

At the top of the script, but I cannot find any output. 在脚本的顶部,但是我找不到任何输出。

like I said this was working fine for over a year. 就像我说的那样,它可以正常工作一年以上。

I have tried with different databases and even tried on a completely different server with an untouched LAMPP install and I got the same result there too. 我尝试过使用不同的数据库,甚至尝试在完全未安装LAMPP安装的完全不同的服务器上进行测试,我也得到了相同的结果。

Further to the above, I found this in the Windows Event Viewer: 除上述内容外,我在Windows事件查看器中发现了这一点:

Faulting application name: httpd.exe, version: 2.4.2.0, time stamp: 0x4fafa3e6
Faulting module name: ntdll.dll, version: 6.1.7601.18229, time stamp: 0x51fb1072
Exception code: 0xc0000374
Fault offset: 0x000ce753
Faulting process id: 0x1d50
Faulting application start time: 0x01ceeaa5eef4ce6c
Faulting application path: C:\DevTools\xampp\apache\bin\httpd.exe
Faulting module path: C:\Windows\SysWOW64\ntdll.dll
Report Id: 2d3c2499-5699-11e3-86d7-005056c00008

I had a backup of the xampp folder structure. 我备份了xampp文件夹结构。 I recopied the php folder from the backup to the xampp folder and it started working again. 我将php文件夹从备份复制到了xampp文件夹,它再次开始工作。

I have a strong feeling that some Windows update or other is to blame. 我强烈认为应该责怪某些Windows更新或其他更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM