ikran Posted July 14, 2023 Share Posted July 14, 2023 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 More sharing options...
juanrojas Posted July 14, 2023 Share Posted July 14, 2023 hello, it probably has a solution, but I would say that it is better to work with wampserver instead of xampp Link to comment Share on other sites More sharing options...
ikran Posted July 14, 2023 Author Share Posted July 14, 2023 I tried to install version 8.0.4 locally on xampp and there were no problems... Most likely 8.1 has bugs... Link to comment Share on other sites More sharing options...
joe16 Posted July 18, 2023 Share Posted July 18, 2023 (edited) 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 Edited July 18, 2023 by joe16 (see edit history) Link to comment Share on other sites More sharing options...
rtvt Posted August 1, 2023 Share Posted August 1, 2023 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: https://stackoverflow.com/questions/17272809/openssl-pkey-export-and-cannot-get-key-from-parameter-1 https://www.php.net/manual/en/openssl.installation.php Thank you! it helped with xampp Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now