I solved it in XAMPP by uncommenting
/apache/bin/php.inidespite phpinfo() telling me
/php/php.ini was the loaded ini file.
EDIT: I guess Ezra answer is the best solution directly adding the extension line to the appropriate ini file.
I had to add
extension=php_openssl.dll to my
php.ini file located in
xampp/php/php.ini. Somehow it was not there, after adding it and restarting Apache everything was working fine.