I've added PrestaShop into my Windows 10 using Xampp. Now when I'm trying to install it by going to ://localhost/prestashop
it's giving the following diagnostic message:
Unable to generate private keys using openssl_pkey_new. Check your OpenSSL configuration, especially the path to openssl.cafile.
I've installed OpenSSL and made a few changes on my hosts file located in C:\Windows\System32\drivers\etc
but it still is not working and I'm clueless of how to set it up more properly.
This is a diagnostic message that is common on Microsoft Windows running Xampp or Wampp.
For (Open)SSL to work there must be an environment variable named OPENSSL_CONF
that points to the file named openssl.cnf
.
Xampp and Wamp have that openssl.cnf
file, but they don't create the correct paths to those files in the environment, namely the OPENSSL_CONF
variable.
Previous and outdated versions of PrestaShop didn't bother either about SSL/TLS consequentially, but now for obvious reasons it is required to have it configured properly.
So it is not a problem with PrestaShop, but the system configuration.
This is how:
Press Win + R to open the Windows Run prompt.
Type in sysdm.cpl
and click OK. Open the Advanced tab and click on the Environment Variables button in the System Properties window.
Add (or edit) a variable named OPENSSL_CONF
, with a value similar to "C:\xampp\apache\conf\openssl.cnf"
having the correct path to the file named openssl.cnf
on your system where you installed Xampp. Note that after setting an environment variable you need to restart Windows for it to apply the changes (for the whole system including services like Xampp or Wamp.)
For more information about environment variables on your system, please consult the handbook (or manual) of your operating system. In case you don't have it at hand or you don't know where the information is located therein, contact vendor of your operating system for your support options.