这已报告在bugs.php.net。如果我更换的libeay32.dll和xampp/apache/bin
ssleay32.dll在xampp/php/
那么它的工作原理相同的文件,但我不能使用SSLPHP OpenSSL - openssl_private_encrypt崩溃网页
我需要使用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.
我有尝试以下,但没有任何帮助:
PHP openssl_public_encrypt causing Page Timeout/Connection Reset?
php/timeout/connection to server reset?
Apache server (xampp) crashes when using openssl function
PHP dies unexpectedly without error
我希望得到任何帮助/建议。
在哪里崩溃? – doptimusprime
如果我不使用'openssl_private_encrypt()'方法,那么它运行良好。 – user427969
它似乎没有得到私钥。 – doptimusprime