uwamp drupal 8 install new module fails - php

I am getting
Failed to fetch file due to error "cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
error message when I try to install a module in Drupal 8.1.8
I found https://www.drupal.org/node/2654474#comment-11232057 which seems to say it is a problem with my stack, UwAMP. I did not follow the procedure in that post because it indicated it did not fix the problem.
Can someone tell me how to fix this?

Found the solution at https://www.drupal.org/node/2654474#comment-11553625
In my case I had to add a "certs" folder to C:\UwAmp\bin\apache\conf\ then download the cacert.pem to that certs folder. I also had to add "curl.cainfo = C:\UwAmp\bin\apache\conf\certs\cacert.pem" to my php.ini file using the UwAmp GUI.
For the benefit of those of us who are newbies please explain what's happening here and why the solution fixed the problem. Please also explain why there is not some kind of fix to Drupal 8 to prevent this problem from happening.
Thanks!

Related

SSL Error for Sentry v2.10 with Laravel 6.20.27 (PHP v7.4.19)

I am using sentry (version 2.10) with Laravel v6.20.27 and PHP v7.4.19. I follow the same steps mentioned in the documentation (https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel5-6/). However I am not able to proceed as I am getting the below error
There was an error sending the event.
SDK: Failed to send the event to Sentry. Reason: "SSL peer certificate or SSH remote key was not OK for "https://oXXXXXXX.ingest.sentry.io/api/XXXXXXXX/store/".".
Please check the error message from the SDK above for further hints about what went wrong.
Please help me to solve this issue.
I faced the same issue on my local. I'm using Laragon on Windows.
I downloaded a new cacert.pem file using this link
Just replace it with the one you currently have in your ssl folder. Hope this will fix your issue.
When you generate SSL certificate, you have to specify the host or server name. If it doesn't match to your real host or server name you see this error.
Check this repo https://gitlab.com/damp-stack/mysql-ssl-docker/-/blob/master/gencerts.sh fake-server should be equal to your server name.

Where i can find the default system certificate used by PHP by deafult?

In php.ini i have specified to use the cafile of my domain.
This made email from PHP works and also i have no issue on loading my domain.
I have issue when i try to use composer as seems PHP is using the domain certificate who is not able to get validation.
If i remove the openssl ca.file from php.ini email from PHP stop to work but composer work fine.
Maybe i need find where is the system certificate used by PHP when i remove the openssl line than add the certificate content to mine domain certificate, this should solve the issue.
Any idea of where this certificate can be found?
Do you think this will solve the issue?
https://github.com/composer/composer/issues/7797#issuecomment-440585828
Thanks for the help.
Solved
https://github.com/composer/composer/issues/7797#issuecomment-440680491
In centos the position seems to be little bit different
How to add Certificate Authority in centos7?
I found it on etc/pki/ca-trust/extracted/openssl

Mailgun PHP API changed on 1/23/2018 SSL Certificate Error not resolved with new cacert.pem file

My PHP Mailgun interface had been working for 2 years until yesterday 1/23/2018 at about 12 noon central time.
Now all calls to the Mailgun API are returning the SSL certificate problem
Exception 0 [curl] 60: SSL certificate problem: unable to get local issuer certificate [url] https://api.mailgun.net/v2/
Curl also returns the same problem at the command line when attempting to access the mailgun API.
We have downloaded and installed the latest cacert.pem file from
https://curl.haxx.se/docs/caextract.html and includeded the path to this file in the php.ini file parameter curl.cainfo = /path/to/cacert.pem and the openssl.cafile = /path/to/cacert.pem
We have restarted our application and rebooted our server but the problem is not fixed.
Is anyone else having the same problem with the PHP Mailgun API ?
Is there a way to disable the SSL certificate check through the Mailgun API ?
The SSL Certificate problem with the PHP Mailgun API was resolved by copying the latest cacert.pem file to the following directory :
..PHP\v5.6\vendor\guzzle\guzzle\src\Guzzle\Http\Resources\
Apparently the PHP MailGun API uses this directory for the certificates when calling the guzzle and curl interfaces.
Changing the PHP.ini file parameter curl.cainfo = "/path/to/cacert.pem" is not sufficient to resolve this problem.
Do we really need to install guzzle to fix this issue? I encounter same issue.
I just came to SO myself to post a resolution my team and I found on this issue as well. As we have a Laravel 4.2 website running Guzzle 4.x for Mailgun mail delivery, all emails ceased functioning as Steve said on 1/23 around Noon.
For us, we simply had to update the cacert.pem found in the /vendor/guzzlehttp directory that the package uses and it came back online.
I can confirm updating php / curl on my dead ass old production server resolved this problem.
Actually, this should be sufficent:
sudo apt-get update && sudo apt-get upgrade
I fixed this problem... you just need to change de "pem" file inside:
guzzle/guzzle/src/Guzzle/Http/Resources/
You need to get de cacert.pem here... the last version:
https://curl.haxx.se/docs/caextract.html
And after, just change in your folder.
Actually, it's not a bug; it's for security reasons. To make it work, change
$sslEnabled = true
to
$sslEnabled = false
You can read extra details at this github issue.

cURL error 35: Unknown SSL protocol error in connection to api.mailgun

All of a sudden I have started getting this mailgun error ,
GuzzleHttp \ Exception \ RequestException
cURL error 35: Unknown SSL protocol error in connection to
api.mailgun.net:443
Any Mail gun user please help me out
Thanks
I have been having the same issue with Laravel 4.2 and Mailgun. I have contacted MG they are blaming this error on DDoS attacks they have been having. I included this thread in my latest support ticket. If you have any useful information to help them please include it here. I have noticed that it is only happening early to mid morning daily.
Mailgun's response 5/24/2016:
We made changes with our hosting provider late this morning that looks to have resolved the issue. Please let us know if you continue experiencing this error.
I'm getting the same error, but it is easy to solve and resolve for me!
Updating the version of php5-curl solved!
FOR UBUNTU => sudo apt-get install --only-upgrade php5-curl
enjoy! ;)
I also getting the same issue. After debugging the code with try-catch what I noticed is, some of the recipient email ids have spaces like:
testmail#google mail.com instead of testmail#googlemail.com
may this answer give a way to solve your issue

Bolt Extension Repo Currently Unavailable

I am running Bolt CMS locally on my machine using XAMPP. I just upgraded to version 2.0.1 today and everything seems to be working great. The only issue I am having is installing extensions.
On the view/install extensions page, I am seeing this message:
The Bolt extensions Repo at https://extensions.bolt.cm/list.json is currently unavailable. Check your connection and try again shortly.
I do have an active internet connection and am not sure why I cannot connect to the repository from the extensions page. Any help would be appreciated!
Update
In the CommandRunner.php file's setup method, there is this line:
$json = json_decode((file_get_contents($this->packageRepo)));
The problem is coming from the file_get_contents($this->packageRepo) call
The error message being returned from that call is
file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Update 2
The issue is not related to bolt CMS but rather my XAMPP configuration. However, if someone else using bolt CMS locally with XAMPP has already tackled this issue, I would appreciate their input.
At this point, I have not been able to solve the SSL issue with my local server.
I did, however, find a solution that allows me to install bolt extensions.
The solution is to open up the config.yml file and add the following:
extensions:
site: 'http://extensions.bolt.cm/'
This will tell bolt to use the http URL rather than https. I would recommend using the secure URL in production, but this has allowed me to install extensions on my local server until I solve the underlying problem.
I found that the following fixed it correctly for me!
PHP cURL error code 60
From that post:
Use this certificate root certificate bundle:
https://curl.haxx.se/ca/cacert.pem
Copy this certificate bundle on your disk. And use this on php.ini
curl.cainfo = "path_to_cert\cacert.pem"

Categories