|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21447 gettext stopped working
Submitted: 2003-01-05 18:55 UTC Modified: 2003-05-20 05:06 UTC
Avg. Score:3.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: vigna at acm dot org Assigned:
Status: Closed Package: Gettext related
PHP Version: 4.2.2 OS: Linux Red Hat 8.0
Private report: No CVE-ID: None
 [2003-01-05 18:55 UTC] vigna at acm dot org
After installing Red Hat Linux 8.0 with Apache 2, gettext support stopped working. I am using the sequence of calls

setlocale(LC_MESSAGES, $_ERW_locale);
bindtextdomain("ERW", $_ERW_localePath);

to bind the text domain, and this worked perfectly in several different ERW installations ( up to the upgrade.

It is very difficult to give any other hint. If you create a script like

setlocale(LC_MESSAGES, "it_IT");
bindtextdomain("ERW", "/home/vigna/cvs/ERW/php/locale");
print _("something translated");

and the translation file is located as follows


the string does not get translated.

The complete lack of feedback of any of the gettext package functions makes it also very difficult to understand what's going wrong.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-01-05 18:58 UTC]
Which worker model are you using?
If you are using a thread based (worker) model you should be aware that gettext library is NOT thread safe and therefor you will encounter problems when you try using it within the threaded enviroment.
 [2003-01-11 18:19 UTC] vigna at acm dot org
No, I am using a stock Red Hat 8.0 and by default it should use the old process-per-request model (at least, httpd -l gives 

Compiled in modules:

Any suggestion?
 [2003-01-11 23:11 UTC]
restored correct summary.

 [2003-01-27 22:32 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

 [2003-05-20 03:20 UTC] b dot pura-vida at caramail dot com
I'm have exactly the same problem with Mandrake 9.0, Apache 1.3.26 and PHP 4.2.3 .
gettext does not translate anything, there isn't any error message neither warning. Nothing. 
Can somebody help?
 [2003-05-20 05:06 UTC] vigna at acm dot org
Simple: re-install with --force glibc-commons. RedHat install JUST the locales you required during the installation process (I'm not talking about the translation files--about the LOCALES!). So gettext does not find a locale, and does not translate (of course, it could be SO kind to give some error message!).

I filed this as a bug in Red Hat, and they claim that it is correct this way. No comment.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Mar 04 08:01:28 2024 UTC