I am new to PHP, I have a Symfony 2.5 project and the installed PHP version is 5.4.4.
I am using XAMPP for running the PHP project. When I am executing composer install it throws the below error
[Composer\Downloader\TransportException] The
"https://repo.packagist.org/packages.json" file could not be
downloaded: SSL operation failed with cod e 1. OpenSSL Error
messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1
alert protocol version Failed to enable crypto failed to open
stream: operation failed
If you guys have faced this issue before, Could you please help me with this?
I have enabled the openssl extension in php.ini file
extension=php_openssl.dll
TIA.
The issue has been resolved after upgrading the PHP version to 5.5.19.
This question already has answers here:
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages: error: 1416F086
(7 answers)
Closed 1 year ago.
When I have tried to install composer for laravel 8 on XAMPP localhost (on Macbook pro- on the path /Applications/XAMPP/xamppfiles/htdocs/the my project folder),
and when I have run first command:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
I have gotten this message in command line (terminal):
-bash: /Applications/MAMP/bin/php/php7.4.16/bin/php: No such file or directory
further to, I have found the following information:
You need to install XAMPP for Windows, MAMP for Mac OS and Apache with PHP 5 on Linux.
on :
https://nmgtechnologies.com/blog/web-application-php-laravel-framework.html
(in requirements for Laravel section)
For that, I have installed localhost MAMP, then I have tried installing composer on MAMP by running 4 commands that existing on https://getcomposer.org/download/.
Commands 1 & 2 were OK, but for command 3, it gave me errors as follow:
*The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Retrying...
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
Retrying...
The "https://getcomposer.org/versions" file could not be downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
The download failed repeatedly, aborting.
So, I opened php folder (first one) in the following path:
/Applications/MAMP/bin/php/php7.4.16/bin/php
and I found other versions expect required one (php7.4.16),so I installed it, but when I opened its folder, I found its subfolders are different of other versions, and it doesn't contain same folders (bin, php) in the path.
for that, the installing is failed (command 3)
NOW:
Should I use and complete installing with /MAMP, could me to install on XAMPP
also?
how to solve this problem?
Note: I have currently PHP Version 8.0.9, and as show in installing path : php7.4.16, is the problem from here?
Thank you for my helping in advance.
I assume your last php was version 7.* and you installed 8.* now you want to use php version 8.*
for that you can add php installation path to your system environment paths.
MAMP and XAMP are offers a web server, database server, and php pre configured.
but if you dont want to use MAMP or Xamp applications you can download php from follwoing link and follow the documentation instructions for operating system.
https://www.php.net/downloads
I'm getting the following error message when i try to install guzzle with composer require guzzlehttp/guzzle:
You are running Composer with SSL/TLS protection disabled.
The "https://repo.packagist.org/packages.json" file could not be downloaded:
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
The "https://repo.packagist.org/packages.json" file could not be downloaded:
https://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
[Composer\Downloader\TransportException]
The "https://passthrough.fw-notify.net/static/auth_transparent.html?return=http://repo.packagist.org/p/guzzlehttp/guzzle%24b1cfe2f977a75ca671f5b311f8d4163989b8b742599dcfee07d767f01c8cd0e5.json" file could not be downloaded: SSL operation failed with code 1. Op
enSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
I tried to remove the semicolon before extension=openssl in my php.ini file. When its removed it throws:
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
I am using PHP Yii2 framework and my local server is MAMP Pro 4 on MAC OS. My php version was 5.5 and I updated it from system path according to this tutorial(https://gist.github.com/irazasyed/5987693 [instruction on how to change php version][1]). After updating version, I have tried to download widgets from composer, however when I typed composer update it shows following errors:
The "https://bower.herokuapp.com/packages/jquery" file could not be
downloaded: SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
Failed to enable crypto
failed to open stream: operation failed
I believe this is a error of updating php version from system path because when I return to my old php 5.5 version my composer worked fine!
Many thanks for your attention!
I m new to php and rabbitmq.In Debian I have installed composer.phar in /bin direcoty. Now I want to run below command to fetch the defined dependencies for local project.
php composer.phar install
But it throws an error message using red background as below
[Composer\Downloader\TransportException]
The "https://packagist.org/packages.json" file could not be downloaded: SSL
operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify
failed
Failed to enable crypto
failed to open stream: operation failed
Please help what to do ?
when enable openSSL in php.ini it throws below warning
Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
You have to enable openssl otherwise you can't make a ssl connection.
You can do that in your php.ini if its already installed. Otherwise you have to install it first.
Perhaps as another solution install the php5-cli version with openssl and don't use the lampp stack. You can install the command with apt-get install php5-cli php5-openssl. Then you should use the internal package and it should work.