[pkg-php-pear] Bug#1092095: Bug#1092095: php-gettext: debci failure with PHPUnit 11

Pete Batard pete at akeo.ie
Sun Mar 23 21:06:01 GMT 2025


Hi David,

Thanks for clarifying the evolution of the php-gettext package. I have 
indeed been using it more more than 10 years, so I wasn't aware that, in 
that time, gettext had been formally integrated into PHP without 
requiring a separate dependencies, and that the package also had gone 
through a (somewhat confusing) name change (though I recall that I had 
to figure some of it during the Bullseye or Bookworm dist upgrade).

It turns out that, as you suspected, my issue was not with 
(php-)php-gettext itself, but with not having php-intl installed.

For the record, the PHP content I was trying to render is found at 
https://github.com/pbatard/rufus-web/blob/gh-pages/index.php and you can 
see that it includes a call to locale_accept_from_http(). And the reason 
I thought there was an issue with not having a PHP gettext candidate 
package available is that, when I tried to serve that PHP on Trixie, I 
got the error :

[php:error] [pid 166476:tid 166476] [client ###.###.###.###:54940] PHP 
Fatal error:  Uncaught Error: Call to undefined function 
locale_accept_from_http() in /home/rufus/public_html/index.php:85\nStack 
trace:\n#0 {main}\n  thrown in /home/rufus/public_html/index.php on line 85

Now, I logically assumed that, since I was getting a localisation error, 
and I hadn't been able to install PHP gettext (and wasn't aware of the 
gettext integration into the PHP engine), the missing function call was 
part of the missing package, so I didn't bother trying with just 
php-intl on its own (since I always historically installed php-intl 
alongside (php-)php-gettext). However, as you will be happy to hear, 
installing php-intl on its own was all it took to fix my issue.

As such, I no longer have reservations about php-gettext/php-php-gettext 
not being available in Trixie, since I have confirmed that the 
functionality it provided (at least for my usage) should be available by 
default, and that the php-intl package, which is part of Trixie, does 
work as expected for the corollary function call.

You can therefore disregard my previous concerns, with my thanks for 
helping me figure out that I didn't actually need a separate gettext 
package.

Regards,

/Pete



More information about the pkg-php-pear mailing list