Re: Unable to load a file

From: Date: Mon, 13 Jan 2025 20:05:45 +0000
Subject: Re: Unable to load a file
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-328603@lists.php.net to get a copy of this message
The font file - garamond-pro.php is owned by root with group/world read and execute. All the online scripts are owned by root with group/world read-only so this is more permissive than the actual scripts. On Mon, 2025-01-13 at 14:56 -0500, Aziz Saleh wrote: > 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@iliffe.ca> 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.

« previous php.general (#328603) next »