Jump to content

Edit History

joe16

joe16

  

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:

joe16

joe16

  

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:

joe16

joe16

  

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:

  • https://stackoverflow.com/questions/17272809/openssl-pkey-export-and-cannot-get-key-from-parameter-1
  • https://www.php.net/manual/en/openssl.installation.php
×
×
  • Create New...