1

I have a gift voucher plugin for wordpress that creates a PDF after a user has finished filling in a form and sends it to the users email. This plugin uses the fpdf library to create the pdf.

It worked fine before my web hotel installed OpenSSL/1.0.2g. Now I think that the SSL certificate blocks the pdf creation. I'm getting the following error message:

PHP Warning:  fopen(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /wp-content/plugins/gift-voucher-pro/library/fpdf/fpdf.php on line 1259

And the code in fpdf.php on line 1259 is:

protected function _parsepng($file)
{
    // Extract info from a PNG file
    $f = fopen($file,'rb');
    if(!$f)
    $this->Error('Can\'t open image file: '.$file);
    $info = $this->_parsepngstream($f,$file);
    fclose($f);
    return $info;
}

My web hotel says that they have done everything correct and that I should contact the author of the plugin. But the author thinks that there is something wrong with the installation of the SSL certificate.

Does anybody here know what can I do about this?

  • the "fopen" call is for a local file or for a remote ? – mmm Jul 16 '18 at 7:01
  • Note sure, but my guess would be that it calls a local file. How would I check that? – Alex Jul 16 '18 at 7:48
  • look what is in $file. you should have something like /var/www/image.png and not https://server/image.png. – mmm Jul 16 '18 at 8:42
0

Problem is solved. It turns out that my web hotel had not installed the correct SSL certificate after all. I'm not excactly sure what they did or did wrong. But the problem is fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.