pregunta
php -r "copy('http://install.phpcomposer.com/installer', 'composer-setup.php');"
Error después de la ejecución :
[root@localhost ~]# php -r "copy('http://install.phpcomposer.com/installer', 'composer-setup.php');"
PHP Warning: copy(): 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: copy(): 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
PHP Warning: copy(): Failed to enable crypto in Command line code on line 1
Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning: copy(http://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
Warning: copy(http://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
resolver
Descarga el certificado:
wget http://curl.haxx.se/ca/cacert.pem
Si se informa un error:
错误: 无法验证 curl.se 的由 “/C=US/O=Let's Encrypt/CN=R3” 颁发的证书:
颁发的证书已经过期。
要以不安全的方式连接至 curl.se,使用“--no-check-certificate”。
Luego ejecuta:
wget --no-check-certificate http://curl.haxx.se/ca/cacert.pem
Luego mueva el certificado al directorio de certificados:
mv cacert.pem /usr/local/openssl/certs
Edite el archivo de configuración php.ini (tenga en cuenta que debe reemplazarse con la ruta del archivo de configuración de php):
vim /www/server/php/56/etc/php.ini
Busque openssl.cafile=
y localice esta línea en el archivo y modifíquela a:
openssl.cafile=/usr/local/openssl/certscacert.pem
La última ejecución php -r "copy('http://install.phpcomposer.com/installer', 'composer-setup.php');"
no reportará un error.