error on php composer.phar install - php

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.

Related

OpenSSL Error messages: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

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.

Problem with laravel 8 installing via composer [duplicate]

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

How to install pdo_mysql driver on OSX Catalina?

When I ran a script that uses PDO, I received an error from the console:
Can't connect to database: could not find driver
After which I read that I need to uncomment the line with pdo_mysql in php.ini. Unfortunately, this led to the following error now popping up in me:
Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql'
PHP set through brew install php#7.2
I tried to install via pecl, but it produces:
running: make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-artemsokoloviZ2ILB/install-
PDO-1.0.3" install
Installing shared extensions: /private/tmp/pear/temp/pear-build-artemsokoloviZ2ILB/install-PDO-1.0.3/usr/local/Cellar/php#7.2/7.2.31_1/pecl/20170718/
cp: modules/*: No such file or directory
make: *** [install-modules] Error 1
ERROR: `make INSTALL_ROOT="/private/tmp/pear/temp/pear-build-artemsokoloviZ2ILB/install-PDO-1.0.3" install' failed

How to solve Error while trying to install guzzle with composer?

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

php - composer update returns certificate verify failed

When I try to do composer install or composer update I get an error message that says that the SSL certificate cannot be verified.
[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 ver
ify failed
Failed to enable crypto
failed to open stream: operation failed
Has anybody an idea how I can solve this problem?
I haven't encountered this myself, but after doing a quick search, I found a potential solution (if you're using PHP 5.6):
# update the ports tree (software list)
$ sudo port -v selfupdate
# install php (shortcut for compiling php with our required libs)
$ sudo port install php56
# install the mcrypt library for php
$ sudo port install php56-mcrypt
# install the curl library for php
$ sudo port install php56-curl
# configure which php version your system should use
$ sudo port select php php56
Source: https://github.com/composer/composer/issues/2798 (there are other potential solutions for this problem available there as well. Hope it helps!

Categories