RE: [PHP] Unable to load a file
| From: | Jānis Elmeris | Date: | Wed, 15 Jan 2025 08:20:46 +0000 |
| Subject: | RE: [PHP] Unable to load a file | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328607@lists.php.net to get a copy of this message | ||
Can you turn on "error_reporting( E_ALL )" and see if the "include" emits any
warnings trying to include the file? It should, if the problem is an inaccessible file. (The error
message you gave comes from the FPDF script, not PHP.)
Regards,
Janis
________________________________
No: John Iliffe <john.iliffe@iliffe.ca>
Nosūtīts: otrdiena, 2025. gada 14. janvāris 23:16
Kam: PHP Help <php-general@lists.php.net>
Tēma: Re: [PHP] Unable to load a file
On Mon, 2025-01-13 at 16:26 -0500, John Iliffe wrote:
> On Mon, 2025-01-13 at 20:30 +0000, AllenJB wrote:
> > On 13/01/2025 19:51, John Iliffe wrote:
> > > 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?
> >
> > Do you have chroot configured, either Linux level or in the php-fpm pool
> > config?
> >
> > Is open_basedir enabled? (for web requests - these may use a different
> > php.ini than commandline. Check the output of phpinfo() from a web
> > request - in particular the top section will tell you what ini files
> > were read)
> >
> > Are containers (eg. Docker, podman) involved at all?
> >
> according to phpinfo the ini file is /etc/php.ini
>
> I checked open_basedir and it has no value (commented) in the .ini file and "no
> value" in phpinfo.
> The instructions in the file make it look like this should NOT be set since I don't want
> to
> restrain
> php-fpm from loading external files like this font file. Am I not seeing something here?
>
> No containers involved; php-fpm is called from httpd (apache) as a proxy based on the script
> file
> extension (.php).
> ProxyPassMatch "^/.*\.php(/.*)?$" fcgi://127.0.0.1:9002/usr/httpd/(example)
Any further ideas anyone? Also, am I correct in thinking that the open_basedir parameter should
left blank for my setup?