Jump to content

Error installing prestashop 8.1.0


Recommended Posts

I wanted to try prestashop locally with xampp (php 8.1) and while installing I get the following error:

 

Create file parameters

An error occurred during installation...
You can use the links on the left column to go back to the previous steps, or restart the installation process by clicking here.

1: ErrorException: Warning: openssl_pkey_export(): Cannot get key from parameter 1 in C:\xampp\htdocs\prestatest002\src\PrestaShopBundle\Install\Install.php:197
Stack trace:
#0 C:\xampp\htdocs\prestatest002\install\controllers\http\process.php(150): PrestaShopBundle\Install\Install->generateSettingsFile('localhost', 'root', '', 'prestatest002', 'ps_', 'InnoDB')
#1 C:\xampp\htdocs\prestatest002\install\controllers\http\process.php(90): InstallControllerHttpProcess->processGenerateSettingsFile()
#2 C:\xampp\htdocs\prestatest002\install\classes\controllerHttp.php(277): InstallControllerHttpProcess->process()
#3 C:\xampp\htdocs\prestatest002\install\index.php(53): InstallControllerHttp::execute()
#4 {main}

 

How can I fix?

Link to comment
Share on other sites

  

Cause:

Apparently this issue happens on localhost for Windows users when installing PrestaShop 8.1 or upgrading from PS 8.0.4 to 8.1.

If you check php_error.log, and you find this error:

[17-Jul-2023 15:47:00 Europe/Paris] PHP Warning:  openssl_pkey_export(): Cannot get key from parameter 1 in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php on line 197
[17-Jul-2023 15:47:00 Europe/Paris] PHP Stack trace:
[17-Jul-2023 15:47:00 Europe/Paris] PHP   1. {main}() C:\wamp64\www\prestashop_8.1.0\install\index.php:0
[17-Jul-2023 15:47:00 Europe/Paris] PHP   2. InstallControllerHttp::execute() C:\wamp64\www\prestashop_8.1.0\install\index.php:53
[17-Jul-2023 15:47:00 Europe/Paris] PHP   3. InstallControllerHttpProcess->process() C:\wamp64\www\prestashop_8.1.0\install\classes\controllerHttp.php:277
[17-Jul-2023 15:47:00 Europe/Paris] PHP   4. InstallControllerHttpProcess->processGenerateSettingsFile() C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php:90
[17-Jul-2023 15:47:00 Europe/Paris] PHP   5. PrestaShopBundle\Install\Install->generateSettingsFile($database_host = '127.0.0.1', $database_user = 'root', $database_password = '', $database_name = 'prestashop_8.1.0', $database_prefix = 'ps_', $database_engine = 'InnoDB') C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php:150
[17-Jul-2023 15:47:00 Europe/Paris] PHP   6. openssl_pkey_export($key = FALSE, $output = NULL) C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php:197
[17-Jul-2023 15:47:00 Europe/Paris] PHP Fatal error:  Uncaught TypeError: openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php:198
Stack trace:
#0 C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php(198): openssl_pkey_get_details(false)
#1 C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php(150): PrestaShopBundle\Install\Install->generateSettingsFile('127.0.0.1', 'root', '', 'prestashop_8.1....', 'ps_', 'InnoDB')
#2 C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php(90): InstallControllerHttpProcess->processGenerateSettingsFile()
#3 C:\wamp64\www\prestashop_8.1.0\install\classes\controllerHttp.php(277): InstallControllerHttpProcess->process()
#4 C:\wamp64\www\prestashop_8.1.0\install\index.php(53): InstallControllerHttp::execute()
#5 {main}
  thrown in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php on line 198

Solution:

Then add a system variable OPENSSL_CONF pointing to openssl.cnf file

  • For Wampserver : C:\wamp64\bin\apache\apache2.4.37\conf\openssl.cnf
  • For Laragon : C:\laragon\bin\apache\httpd-2.4.54-win64-VS16\conf\openssl.cnf

Important : must restart your PC in order to make it work!

Resources:

Edited by joe16 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
On 7/18/2023 at 2:20 PM, joe16 said:

  

Cause:

Apparently this issue happens on localhost for Windows users when installing PrestaShop 8.1 or upgrading from PS 8.0.4 to 8.1.

If you check php_error.log, and you find this error:

[17-Jul-2023 15:47:00 Europe/Paris] PHP Warning:  openssl_pkey_export(): Cannot get key from parameter 1 in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php on line 197
[17-Jul-2023 15:47:00 Europe/Paris] PHP Stack trace:
[17-Jul-2023 15:47:00 Europe/Paris] PHP   1. {main}() C:\wamp64\www\prestashop_8.1.0\install\index.php:0
[17-Jul-2023 15:47:00 Europe/Paris] PHP   2. InstallControllerHttp::execute() C:\wamp64\www\prestashop_8.1.0\install\index.php:53
[17-Jul-2023 15:47:00 Europe/Paris] PHP   3. InstallControllerHttpProcess->process() C:\wamp64\www\prestashop_8.1.0\install\classes\controllerHttp.php:277
[17-Jul-2023 15:47:00 Europe/Paris] PHP   4. InstallControllerHttpProcess->processGenerateSettingsFile() C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php:90
[17-Jul-2023 15:47:00 Europe/Paris] PHP   5. PrestaShopBundle\Install\Install->generateSettingsFile($database_host = '127.0.0.1', $database_user = 'root', $database_password = '', $database_name = 'prestashop_8.1.0', $database_prefix = 'ps_', $database_engine = 'InnoDB') C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php:150
[17-Jul-2023 15:47:00 Europe/Paris] PHP   6. openssl_pkey_export($key = FALSE, $output = NULL) C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php:197
[17-Jul-2023 15:47:00 Europe/Paris] PHP Fatal error:  Uncaught TypeError: openssl_pkey_get_details(): Argument #1 ($key) must be of type OpenSSLAsymmetricKey, bool given in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php:198
Stack trace:
#0 C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php(198): openssl_pkey_get_details(false)
#1 C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php(150): PrestaShopBundle\Install\Install->generateSettingsFile('127.0.0.1', 'root', '', 'prestashop_8.1....', 'ps_', 'InnoDB')
#2 C:\wamp64\www\prestashop_8.1.0\install\controllers\http\process.php(90): InstallControllerHttpProcess->processGenerateSettingsFile()
#3 C:\wamp64\www\prestashop_8.1.0\install\classes\controllerHttp.php(277): InstallControllerHttpProcess->process()
#4 C:\wamp64\www\prestashop_8.1.0\install\index.php(53): InstallControllerHttp::execute()
#5 {main}
  thrown in C:\wamp64\www\prestashop_8.1.0\src\PrestaShopBundle\Install\Install.php on line 198

Solution:

Then add a system variable OPENSSL_CONF pointing to openssl.cnf file

  • For Wampserver : C:\wamp64\bin\apache\apache2.4.37\conf\openssl.cnf
  • For Laragon : C:\laragon\bin\apache\httpd-2.4.54-win64-VS16\conf\openssl.cnf

Important : must restart your PC in order to make it work!

Resources:

Thank you! it helped with xampp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...