PHP openssl_public_encrypt导致页面超时/连接重置? [英] PHP openssl_public_encrypt causing Page Timeout/Connection Reset?

查看:422
本文介绍了PHP openssl_public_encrypt导致页面超时/连接重置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚迁移到新机器有问题。

Just migrated to a new machine and having issues.

注意:这是Windows 7的Apache 2.2.21中,MySQL 5.5.16,PHP 5.3.8设置

Note: This is a Windows 7 , Apache 2.2.21, MySQL 5.5.16, php 5.3.8 setup.

每个我运行一个特定的PHP脚本时,我面临着一个页面加载错误 - 连接被重置。我知道各种echo语句调用函数调用,但之前脚本工作:

Each time I run a certain PHP script, I am faced with a "Page Load Error - The connection was reset". I know the script works before the function call with various echo statements but calling:

openssl_public_encrypt();

openssl_public_encrypt();

我给一个页面超时。我已经添加了相应的openssl.dll PATH到我的Windows配置设置。(D:\\ XAMPP \\ PHP \\等),但我还是我的实际本地主机的机器上获取网页超时错误(及以上错误)

I am given a page timeout. I have added the appropriate openssl.dll PATH to my windows configuration settings (D:\xampp\php\etc) but I am still getting page timeout errors on my actual localhost machine (and the errors above).

页面回报:

连接被重置


      
  • 要与服务器的连接,而页面加载被重置。

  •   

Apache的SSL日志显示:

The apache ssl logs show:

[周三07年12月15点13分17秒2011] [信息]加载证书和放大器; SSL感知服务器私钥

[Wed Dec 07 15:13:17 2011] [info] Loading certificate & private key of SSL-aware server

[周三12月7日15点13分17秒2011] [调试] ssl_engine_pphrase.c(470):未加密的RSA私钥 - 不需要密码短语

[Wed Dec 07 15:13:17 2011] [debug] ssl_engine_pphrase.c(470): unencrypted RSA private key - pass phrase not required

[周三07年12月15点13分17秒2011] [信息]为SSL协议配置服务器

[Wed Dec 07 15:13:17 2011] [info] Configuring server for SSL protocol

[周三07年12月15点13分17秒2011] [调试] ssl_engine_init.c(465):创建新的SSL上下文(协议协议:SSLv2,SSLv3的,使用TLSv1)

[Wed Dec 07 15:13:17 2011] [debug] ssl_engine_init.c(465): Creating new SSL context (protocols: SSLv2, SSLv3, TLSv1)

[周三07年12月15点13分17秒2011] [调试] ssl_engine_init.c(420):配置TLS扩展处理

[Wed Dec 07 15:13:17 2011] [debug] ssl_engine_init.c(420): Configuring TLS extension handling

[周三07年12月15点13分17秒2011] [调试] ssl_engine_init.c(795):配置RSA服务器证书

[Wed Dec 07 15:13:17 2011] [debug] ssl_engine_init.c(795): Configuring RSA server certificate

[周三07年12月15点13分17秒2011] [提醒] RSA服务器证书的CommonName(CN)'localhost'的不匹配的服务器名!?

[Wed Dec 07 15:13:17 2011] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?

[周三07年12月15点13分17秒2011] [调试] ssl_engine_init.c(834):配置RSA服务器私钥

[Wed Dec 07 15:13:17 2011] [debug] ssl_engine_init.c(834): Configuring RSA server private key

phpinfo()函数所示:

PHPinfo() shows:

**

**

OpenSSL support          |  enabled
----------------------------------------------------------
OpenSSL Library Version  |  OpenSSL 1.0.0e 6 Sep 2011
----------------------------------------------------------
OpenSSL Header Version   |  OpenSSL 0.9.8r 8 Feb 2011 

-

应该不是我的库和头版本匹配吗?难道这是我的错误的原因是什么?

Shouldn't my library and header versions match? Could this be the cause of my error?

推荐答案

值得注意的是,这是在最新版本的Apache和PHP发现错误。 Apache的版本中使用不兼容的文件。要解决(暂时在本地机器上只):

Of note, this is an error found in recent versions of apache and php. The Apache version used non-compatible files. To resolve (temporarily on local machines only):

在您的XAMPP / Apache的/ bin文件夹下面两个文件替换:

Replace the following two files in your xampp/apache/bin folder:


  • 的libeay32.dll

  • ssleay32.dll

在你的XAMPP / PHP文件夹中的同名文件。这个问题是解决了我立即生效。

with the files of the same name in your xampp/php folder. The issue was resolve for me immediately.

这篇关于PHP openssl_public_encrypt导致页面超时/连接重置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆