Stoil Stoyanov Stoil Stoyanov - 1 year ago 231
PHP Question

Cannot establish SSL connection with Composer with PHP 5.6.3

After cloning a repository on Ubuntu 14.04 with PHP 5.6.3 I am unable to run

php composer.phar selfupdate
php composer.phar update
. I get this message:

The "" file could not be downloaded: SSL ope
ration failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
Failed to enable crypto
failed to open stream: operation failed

I think the issue should be with the certificates that I have locally, but I can't imagine how to fix it.

Here is the composer.json:

"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"homepage": "",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.3.*",
"evandotpro/edp-module-layouts": "1.*",
"": "~6.0@stable",
"phpoffice/phpexcel": "1.7.*"
"require-dev": {
"phpunit/phpunit": "4.1.*",
"phpunit/phpunit-selenium": ">=1.2"
"autoload": {
"psr-0": {"BOZA\\": "vendor/BOZA/"},
"classmap": ["vendor/"]

Answer Source

One cause of this might be that certs are missing or not found by PHP.

Is the ca-certificates package installed?

If not: apt-get install ca-certificates or simply download the certificate bundle from here:

Then check and edit your php.ini, so that these certs are used for the SSL connection made by PHP.