I have partially solved these problems
For re-captcha add function in class ReCaptchaGetRequestMethod:
/qa-plugin/recaptcha-captcha/recaptchalib.php
private function file_get_contents_curl( $url ) {
$ch = curl_init();
curl_setopt( $ch, CURLOPT_AUTOREFERER, TRUE );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_URL, $url );
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );
$data = curl_exec( $ch );
curl_close( $ch );
return $data;
}
And replace file_get_contents -> file_get_contents_curl
https://qna.habr.com/q/339897
For email Forcefully allowed insecure connections via the SMTPOptions
/qa-include/app/emails.php
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting#certificate-verification-failure
$mailer->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true,
)
);
Later I solved this problem correctly.
I wrote to server support and they renewed the certificate (file: ca-root-nss.crt). And also registered the paths to it in the php.ini file. Both mail and recaptcha started working as usual.
Directive |
Local Value |
Master Value |
openssl.cafile |
/usr/local/share/certs/ca-root-nss.crt |
/usr/local/share/certs/ca-root-nss.crt |
openssl.capath |
/usr/local/share/certs |
/usr/local/share/certs |