[php-src] Issue #21589: chrooted PDO suddenly needs /etc/resolv.conf in the chroot
[email protected] (karolyi)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/21589
Author: karolyi
### Description
Hey,
With the recent `8.5.4` (FreeBSD package), my roundcube installation that runs chrooted (there is a `chroot=/path` entry in `php-fpm.conf`) stopped working.
Upon looking into the error log, PDO complained about not being able to resolve the database server hostname. Upon creating an `etc/resolv.conf` file in the chroot, it started working again. I wonder, did something change recently regarding how the chroot is handled?
Now if I want to run roundcube chrooted, I need to expose https://roundcubehost/etc/resolv.conf that is within the chroot, and the only way to block it would be via a webserver config entry.
Can somebody please enlighten me if this is intended of if it's a newly introduced bug?
### PHP Version
```plain
PHP 8.5.4 (cli) (built: Mar 28 2026 02:22:24) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.4, Copyright (c) Zend Technologies
with Zend OPcache v8.5.4, Copyright (c), by Zend Technologies
```
### Operating System
FreeBSD 14.4-RELEASE