unable to create certificates -- FPDF error: Can't open image file

unable to create certificates -- FPDF error: Can't open image file

by Brian Schmidt -
Number of replies: 2
Hello,

We just migrated to a new server and I tried to generate a certificate, but I'm getting this error:

Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /home/public_html/lib/fpdf/fpdf.php on line 1522

Warning: fopen(http://server/mod/certificate/pix/signatures/sig.png) [function.fopen]: failed to open stream: no suitable wrapper could be found in /home/mycourses/public_html/lib/fpdf/fpdf.php on line 1522

FPDF error: Can't open image file: http://server/mod/certificate/pix/signatures/sig.png

Any ideas? If I go straight to the URL, the image comes up fine, so I'm having trouble figuring out what this error is referring to. We are using 1.9.4+ (Build: 20090225).

This red line is line 1522:
function _parsepng($file)
{
//Extract info from a PNG file
 $f=fopen($file,'rb');
if(!$f)
$this->Error('Can\'t open image file: '.$file);

TIA,
Brian
Average of ratings: -
In reply to Brian Schmidt

Re: unable to create certificates -- FPDF error: Can't open image file

by Brian Schmidt -
OK, after a bit more research, I've tracked down that this is a security feature in PHP. And that pretty much everything I've come across so far recommends not enabling that feature and instead using something like curl instead.

Anyone else running into this?
In reply to Brian Schmidt

Re: unable to create certificates -- FPDF error: Can't open image file

by Chardelle Busch -
Picture of Core developers
Are your permissions set to 755?