XAMPP PHP OPENSSL openssl_pkey_get_details () removes a webpage

I currently have OpenSSL configured in XAMPP on Windows. Following this , I tried using the following code:

$privateKey = openssl_pkey_new(array( 'private_key_bits' => 1024, 'private_key_type' => OPENSSL_KEYTYPE_RSA, )); openssl_pkey_export_to_file($privateKey, 'private.key'); $a_key = openssl_pkey_get_details($privateKey); file_put_contents('public.key', $a_key['key']); openssl_free_key($privateKey); 

When I open the page, I get the error "Webpage Unavailable." I managed to identify the problem before openssl_pkey_get_details() , because if I delete this, the page will load successfully. In addition, private.key is generated without problems in the first part of the code. Any help would be appreciated.

+4
source share
1 answer

This was reported in bugs.php.net .

If you replace libeay32.dll and ssleay32.dll with xampp / apache / bin with the same files in xampp / php / , then it works, but you CANNOT use SSL.

I tried this and it works. I am using the OpenSSL library in PHP (5.4.7) on XAMPP (1.8.1). However, I had to disable SSL.

0
source

All Articles