php - composer update returns certificate verify failed - php

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!

Related

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

Woo commerce Error: How to enable soap client on debian server?

I have deployed WordPress on debian VM on GCP.
I am getting an error:
Your server does not have the SoapClient class enabled - some gateway plugins which use SOAP may not work as expected.
I have run below commands to install soap client:
sudo apt-get install php-soap
After installation, it is still same showing same error.
When I checked the php version, it shows below warning
PHP Warning: PHP Startup: Unable to load dynamic library 'soap' (tried: /usr/lib/php/20190902/soap (/usr/lib/php/20190902/soap: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/soap.so (/usr/lib/php/20190902/soap
.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
What to do to remove this error?
Seems to be that the php7.3-soap package is corrupted, please try reinstalling it and after that restart the Apache service, then validate the error is no longer present.
$ sudo apt-get reinstall php7.3-soap
$ php -m | grep soap
$ php -v
Please note that Debian 10 (buster) default Php version is 7.3.

error on php composer.phar install

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.

Install PHP5 Via Macports Always Error

I want to install php5 on my mac using macports. It throws the following error on terminal:
Attempting to fetch php5-5.3.12_0+apache2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/php5
Error: org.macports.archivefetch for port php5 returned: Failed to verify signature for archive!
Please see the log file for port php5 for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php5/php5/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
What should I do?

Installing Solr in a XAMPP server in a LINUX server

I try to install Solr PHP extension to my webserver. I already have an XAMPP server and I'm using PECL to install solr
$ cd /opt/lampp/bin
$ sudo ./pecl install solr-1.0.1
But I got the following error:
checking libxml2 install dir... /usr/lib
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
ERROR: `/tmp/pear/temp/solr/configure --enable-solr=yes --enable-solr-debug=no --with-curl=
/usr --with-libxml-dir=/usr/lib' failed
During the installation it prompts me to input a path:
libxml2 install prefix [/usr] :
I have tried with enter and the /usr/lib
What shall I input there to not get an error? Or how shall I install to not get an error?
Now I have libxml2 installed through yum install libxml2-devel. But I got some wierd errors now. Here are just a few of them, it ends with:
no such parameter
/tmp/pear/temp/solr/solr_types.h:388: error: declaration for parameter 'client_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:386: error: declaration for parameter 'document_count' but no such parameter
/tmp/pear/temp/solr/solr_types.h:384: error: declaration for parameter 'request_count' but no such parameter
/tmp/pear/temp/solr/php_solr.c:1185: error: expected '{' at end of input
make: *** [php_solr.lo] Error 1 ERROR: `make' failed
If you're using RHEL/Fedora/CentOS/Scientific linux then you need to install libxml2-devel
yum install libxml2-devel
I could easily install PECL Solr via my systems package manager, probably this works for you as well. I found it very easy so probably worth to share (Fedora 14):
$ sudo yum install php-pecl-solr
A little later I got php-pecl-solr-0.9.11-1.fc14.x86_64 installed, the package's fedora homepage is here.
I could locate the libxml2 version with this command:
$ locate libxml2.so
probably this is helpful as well.
Some useful links:
http://projects.mediashelf.us/projects/8/wiki/Setting_up_Fedora_and_Solr_for_use_with_ActiveFedora#Install-Solr
http://oxfordrepo.blogspot.com/2008/01/populating-search-engine-apache-solr.html

Categories