Because some people asked how to solve above error message and I just had this at a customer's machine...
You will need openssl support in your PHP setup and on a somewhat recent OS that should be enough. But you might be forced to work with a system you don't have much influence on. So for me the solution was to provide PHP with a custom certificate storage.
Simply download the most recent cacert.pem from https://curl.haxx.se/docs/caextract.html
(put it in your php directory for example) and set up PHP to use it in your php.ini using the cafile setting: