Error: problem fetching salts from the WordPress generator service.
mike-source opened this issue · 3 comments
mike-source commented
This happens when I try to generate salts:
$ wp dotenv salts regenerate
Warning: file(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /Users/mike/.wp-cli/packages/vendor/aaemnnosttv/wp-cli-dotenv-command/src/Salts/Salts.php on line 58
Warning: file(): Failed to enable crypto in /Users/mike/.wp-cli/packages/vendor/aaemnnosttv/wp-cli-dotenv-command/src/Salts/Salts.php on line 58
Warning: file(https://api.wordpress.org/secret-key/1.1/salt/): failed to open stream: operation failed in /Users/mike/.wp-cli/packages/vendor/aaemnnosttv/wp-cli-dotenv-command/src/Salts/Salts.php on line 58
Error: There was a problem fetching salts from the WordPress generator service.
However, the Wordpress salt generator seems to be online and working: https://api.wordpress.org/secret-key/1.1/salt/
aaemnnosttv commented
This doesn't look like a problem with the package. Can you try this for me and see what you get?
php -r 'echo file_get_contents("https://api.wordpress.org/secret-key/1.1/salt/");'
mike-source commented
Hey, thanks, yep, that gives the same error:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in Command line code on line 1
Warning: file_get_contents(): Failed to enable crypto in Command line code on line 1
Warning: file_get_contents(https://api.wordpress.org/secret-key/1.1/salt/): failed to open stream: operation failed in Command line code on line 1
I'm on the OSX. Any idea what would likely be the cause of this then? (I should mention it didn't do this until very recently!)
aaemnnosttv commented
In my experience, issues like this have been due to an older version of OpenSSL that was compiled in with the version of PHP. The easiest solution is usually just upgrading to a newer (or just more recently built) version of PHP.