What does
ls -al /usr/fpdf186/font/garamond-pro.php
show for the place that it is working on? Match the permissions.
On Mon, Jan 13, 2025 at 2:52 PM John Iliffe <john.iliffe@xxxxxxxxx> wrote:
I use FPDF for both the web site and command line to generate PDF files. Both locations use the
same code and until I updated the O/S version on the server it all worked properly. Now the command
line processing works as normal but the web site fails with error message "Uncaught Exception: FPDF
error: Could not include font definition file: /usr/fpdf186/font/garamond-pro.php in
/usr/fpdf186/fpdf.php:267". The script that is included in both the web server and the command line
is:
----relevant part - the script fails at the line marked **-->
$pdf = new PDF();
$pdf->aliasNbPages();
$pdf->AddPage('P','Letter');
**---here--> $pdf->AddFont('garamond','','Garamond Pro-Regular.php');
$pdf->SetFont('garamond','',18);
$page_width = $pdf->GetPageWidth();
$page_centre = $page_width/2;
----------
The script file does exist and is where it says:
ls -al /usr/fpdf186/font/garamond-pro.php
-rwxr-xr-x. 1 root root 3738 Jan 2 22:04 /usr/fpdf186/font/garamond-pro.php
Selinux is not involved since the same failure occurs in both "enforcing" and "permissive" modes.
Since the script works in one place and not another I suspect that there is some difference between
php-fpm and php on the command line but I haven't been able to find it yet. Any ideas where to
look?
Further info: Rocky 9.5, PHP 8.0.30
Thanks in advance.