-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenSSL Error 14090086 certificate verify failed #1022
Comments
Right. This is covered extensively in the troubleshooting guide that the error message links you to. |
Synchro was right, i did read the Troubleshooting but didn't recognise the problem was described there. The solution is at and involves adding
My website is hosted by hostpapa. Regards |
If you run the code locally in your computer then the most common reason for messed up TLS certificates are antivirus applications intercepting SMTP traffic. In production it might not be needed to skip certificate validation checks. |
@Synchro I am having the same issue. php -i | grep cafile the above snippet does not work in my terminal, and how do I even replace the certificate on my mail server??? Please be more specific, or give steps as to go about it... Thanks. |
If you can't use php in a windows terminal, put Ultimately though it's not complicated - download the CA file from the URL given in the docs, store it somewhere, set that path in your php.ini (there are plenty of php docs on how to do that), and restart PHP or your web server (depending on how your PHP deployment works). after that, you should see the new setting in your phpinfo page. Alternatively, use an operating system that ships up to date CA certificates, and then you don't have to do anything at all. You don't need to replace the certificate on your mail server - but if you did, the place to look would be in your mail server docs, not here. |
@Synchro Ok. I have windows 10 OS, so it should have an up-to-date CA certificate, yes? I will test your directions out on my localhost. Thanks. |
Windows certainly should have up to date certs - make sure you've applied all system updates - but it still may not. PHP normally gets CA certs from the OS, but what I've described above is a PHP-specific fix. You may have the same problem on your hosted domain, and you may need to do the same thing on there - but I can't tell. If you don't have full access (e.g. you're on shared hosting), you should request support from your hosting provider. |
@Synchro Wow, I checked my phpinfo file and it seems there is no set value, its empty!
Is this abnormal?? |
No, that's normal - it just means it's not been set explicitly, and so will fall back to using your OS. |
@Synchro Oh right, okay. |
in which file do we need to write this code?
|
As I say above, you should not have to do that at all - fix your TLS setup first. But if you insist on doing it, it should go in your own code, in the same place you use PHPMailer. |
I am getting this error Hosting company got no clue how to fix this. Is there any DNS entry needs to be done to fix this as well? |
Read the troubleshooting guide. It tells you how to diagnose and fix this. |
My certificate location on cPanel is ssl/certs but I can't find the codes where you mentioned below in which file is this? |
I am not using the SMTP method but still getting this error message as below [10-Mar-2018 19:23:35 UTC] PHP Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: |
You must be using SMTP or you would not get that error. If you run |
Where do I run this command from I am on a cpanel hosting? Any idea in which file the SMTP details would be as I don't seem to find any file with username or password contained in it considering it was working previously and not on the new hosting? |
I have no idea about cpanel or your hosting - ask them. I would expect you to be able to get to a |
I managed to view the openssl config details using below php code - any idea how to update the value on it?
openssl.cafile = no value Any way to update it via SSH access command line? |
It looks like my codes already has what you suggested but still getting the same error |
@Synchro I have noticed that it might be due to the path for the ca-bundle.crt file located on the server which is not verifying? located under public_html/wp-includes/certificates/ca-bundle.crt |
I am getting the error twice so i think it is failing at two different lines
|
No, that's the same failure happening twice in the same place; you must be causing it to be run twice. Look at the timestamps - they are several seconds apart. Do what the guide says - alter your PHP config to point at a fresh download of the CA certs - how you actually do that is something you need to find out from your control panel; it's not something I know about. |
@Synchro I have switched to public $Mailer = 'mail'; and not getting any error message but the PHPMailer is not working as well as I am not getting any email through. I tried your solution as well but still can't make it work, can you FTP and look in to this for me? |
If you switch to mail, it won't use SMTP at all but will send via a sendmail binary that talks to your local mail server. All errors relating to that will be in your mail server logs, just as the troubleshooting guide says. No, I can't fix your server for you - and you do have a server problem, not a PHPMailer problem. |
@Synchro it is a GoDaddy shared hosting account who got no clue and wouldn't help on this, I have configured the smtp with the username and password and the host ip address now, it doesn't give any error message but still no message going through. Any ways thanks for reply back on this. |
Seriously? The troubleshooting guide has specific comments on GoDaddy because they block outbound SMTP. If you won't read the docs I point you at, I'm not going to write the same thing here so you can ignore that too. |
@Synchro I have followed your documentation as mentioned earlier and get no errors - but I don't get any email as well from the form so not sure what's happening. |
If you're talking to a SMTP server, you will see what happens to the message if you have |
Hi @Synchro , Thanks for your help. |
PHPMailer works fine in PHP 7. If it's not working for you, you need to be more precise, and don't hijack closed, unrelated issues. |
Hi, I am getting the following log and error when trying to send an email via smtp. This occurs after the server gives the client a : 220 TLS go ahead.
Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\Users\Mark\OneDrive\www\orm\00\02\mailer\class.smtp.php line 368]
I have the latest PHPMailer, use autoload, and based my PHP code directly on the smtp example here on GitHub.
Ho do I fix this?
Thanks
The text was updated successfully, but these errors were encountered: