这已在bugs.php.net上报道过。如果我将libeay32.dll和ssleay32.dll xampp/apache/bin中的SSL替换为xampp/php/中的相同文件,那么它可以工作,但不能使用SSL。
我需要使用SSL,有人能解决这个问题吗?
我在XAMPP(1.8.1)上使用OpenSSL库在PHP(5.4.7)上进行加密、解密等,我还在本地主机上使用SSL。
我能够使用openssl_pkey_new()方法创建私钥对,并生成证书。
但是当我试图访问我的根证书(使用上面的函数创建)时,网页会崩溃
$root_private_key = openssl_get_privatekey(file_get_contents($path), $pass);
echo "KEY: " . $root_private_key; // KEY: Resource id #11
openssl_private_encrypt($plaintext, $encrypted_data, $root_private_key);我甚至尝试使用phpseclib库,但这也做了同样的事情。
我也尝试过设置ini_set('max_execution_time', 0);
我检查了PHP ,它是空的,并在Apache 中找到了以下内容:
[mpm_winnt:notice] [pid 3312:tid 484] AH00428: Parent: child process exited with status 3221225477 -- Restarting.
[ssl:warn] [pid 3312:tid 484] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[mpm_winnt:notice] [pid 3312:tid 484] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[mpm_winnt:notice] [pid 3312:tid 484] AH00456: Server built: Aug 18 2012 12:41:37
[core:notice] [pid 3312:tid 484] AH00094: Command line: 'apache\\bin\\httpd.exe -d C:/xampp/apache'
[mpm_winnt:notice] [pid 3312:tid 484] AH00418: Parent: Created child process 1520
AH00548: NameVirtualHost has no effect and will be removed in the next release C:/xampp/apache/conf/extra/httpd-vhosts.conf:19
[ssl:warn] [pid 1520:tid 496] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[mpm_winnt:notice] [pid 1520:tid 496] AH00354: Child: Starting 150 worker threads.我试过以下几点,但这些都没有帮助:
使用openssl功能时,Apache服务器(xampp)崩溃
我希望得到任何帮助/建议。
发布于 2013-05-19 02:57:44
这已在bugs.php.net上报道过。如果我将xampp/apache/bin中的下列文件替换为xampp/php/中的相同文件,那么它可以工作:
但是,SSL不能使用,否则在启动时会出现错误。
发布于 2013-05-30 05:41:24
对于那些仍有困难的人:
在使用apache的下一个版本发布完整打包的xampp正式构建之前,我已经成功地修复了这个问题,方法是将我的Apache版本更改为下面的一个:http://www.apachelounge.com/download/ --它修复了bug,但仍然允许我使用OpenSSL。
这个页面上的第二个Apache2.2.4下载是专门为修复这个错误而构建的。对我来说,这很简单,因为:
xampp\apache重命名为xampp\apacheold,以防它坏了。Apache24中从下载的zip复制到xampp\Apache24apache.bat文件从xampp\apacheold文件夹复制到新的xampp\apache文件夹中。xampp\apache\conf文件夹替换为来自xampp\apacheold的文件夹我希望这能帮上忙。
发布于 2013-05-19 16:21:28
phpseclib使用OpenSSL (如果可用)来生成RSA私钥。若要禁用此行为,请在Crypt/RSA.php包含之后执行此操作:
define('CRYPT_RSA_MODE', CRYPT_RSA_MODE_INTERNAL);顺便说一句,你想要生成的钥匙有多大?
https://stackoverflow.com/questions/16628102
复制相似问题