FPDF error: Could not include font metric file

312 views
Skip to first unread message

Steve Krzysiak

unread,
Jun 10, 2010, 4:03:50 PM6/10/10
to CRT Appraisal Dashboard
This pertains to the following error:
( ! ) Warning: FPDF::include(/var/www/ad/external/fpdf/font/
helvetica.php) [function.FPDF-include]: failed to open stream:
Permission denied in /var/www/ad/external/fpdf/fpdf.php on line 541
Call Stack
# Time Memory Function Location
1 0.0002 74628 {main}( ) ../index.php:0
2 0.0141 979880 CReport->execute( ) ../index.php:26
3 0.0225 1717312 CPDF_listing->__construct( ) ../report.php:40
4 0.0225 1722004 CPDF->__construct( ) ../pdf_listing.php:41
5 0.0227 1730072 FPDF->SetFont( ) ../pdf.php:45

( ! ) Warning: FPDF::include() [function.include]: Failed opening '/
var/www/ad/external/fpdf/font/helvetica.php' for inclusion
(include_path='.:/usr/share/php:/usr/share/pear') in /var/www/ad/
external/fpdf/fpdf.php on line 541
Call Stack
# Time Memory Function Location
1 0.0002 74628 {main}( ) ../index.php:0
2 0.0141 979880 CReport->execute( ) ../index.php:26
3 0.0225 1717312 CPDF_listing->__construct( ) ../report.php:40
4 0.0225 1722004 CPDF->__construct( ) ../pdf_listing.php:41
5 0.0227 1730072 FPDF->SetFont( ) ../pdf.php:45
FPDF error: Could not include font metric file

I checked and my permissions were 600 on the font folder, this fixed
it:
chown -R www-data:www-data fpdf/font/

This post is a reference for those who encounter this error, and it
may be also noted in the docs.

Anyone think it may be wise to just advise in the docs to make the web
daemon(httpd, www-data, apache) the owner/group of the whole AD
directory? Would this be a security issue?
Reply all
Reply to author
Forward
0 new messages