Bug #53251 [Opn->Fbk]: bindtextdomain with null directory doesn't return the previously set
From: pajoye@php.net Date: Wed, 24 Nov 2010 22:39:00 +0000 Subject: Bug #53251 [Opn->Fbk]: bindtextdomain with null directory doesn't return the previously set References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-156417@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=53251&edit=1
ID: 53251
Updated by: pajoye@php.net
Reported by: jeanseb at au-fil-du dot net
Summary: bindtextdomain with null directory doesn't return
the previously set
-Status: Open
+Status: Feedback
Type: Bug
Package: Gettext related
Operating System: Debian 5.0.6
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
Besides our little difference about virtual CWD, please try the attached
patch against 5.3. It checks if the given directory is empty or NULL
(dir length == 0) and if yes, calls bindtextdomain with NULL.
Is it what you expect?
Previous Comments:
------------------------------------------------------------------------
[2010-11-24 23:38:42] pajoye@php.net
The following patch has been added/updated:
Patch Name: Test_if_NULL_or_empty
Revision: 1290638321
URL:
http://bugs.php.net/patch-display.php?bug=53251&patch=Test_if_NULL_or_empty&revision=1290638321
------------------------------------------------------------------------
[2010-11-24 23:23:44] pajoye@php.net
Using your script: it happens exactly what I explained earlier. The
library does not find the locale because its CWD is not the same as the
script CWD (which is a virtual CWD, created by the engine and specific
to the engine).
I suppose you use Apache in a non thread safe mode, that won't show you
the effect I was referring to as it happens only with threaded SAPI.
------------------------------------------------------------------------
[2010-11-24 20:44:02] greno at verizon dot net
The patch upload apparently won't take a zip.
The PHP bindtextdomain brokenness demonstration app can be found here:
http://greno-misc.googlecode.com/files/testbindtextdomain.zip
.
------------------------------------------------------------------------
[2010-11-24 20:32:59] greno at verizon dot net
Yes, I read and perfectly understood your comment.
There is no problem with CWD when using gettext. I've tested this many
times.
I prepared a little app that demonstrates the bindtextdomain problem.
There is a README.txt that explains in the zip.
I didn't see any way to attach a file to the bug so I'm taking the
liberty of attaching it as a Patch but it is not really a patch. It
demonstrates the problem of multiple translation stores with the broken
bindtextdomain.
------------------------------------------------------------------------
[2010-11-24 17:47:26] pajoye@php.net
For my own sake, please take 2.5 min to understand my comment.
Questions:
- relative directories, relative to what? CWD? Then please double read
my comment, check how PHP works (or any other languages working as
module of a server)
At any point after the call, the CWD can be different. The CWD inside
the gettext library (read: inside the gettext library) is not (read: is
not) equal to the actual script CWD, which is a virtual CWD based on the
directory where the script, unless the script changes using the chdir()
PHP function.
I perfectly understand what you said about how it should work, but that
does not help to resolve the actual problem. How in the world do you
know which CWD will be used by the library?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/bug.php?id=53251
--
Edit this bug report at http://bugs.php.net/bug.php?id=53251&edit=1
Thread (49 messages)
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [PATCH]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn->Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Fbk->Asn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Asn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Asn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Asn->Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Opn]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [PATCH]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Asn->Csd]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Csd]: bindtextdomain with null directory doesn't return the previously set
- Bug #53251 [Com]: bindtextdomain with null directory doesn't return the previously set
| « previous | php.bugs (#156417) | next » |
|---|