php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19377 Translatings to certian multibyte strings causes php to die
Submitted: 2002-09-12 13:14 UTC Modified: 2002-11-14 01:44 UTC
From: mike at graftonhall dot co dot nz Assigned:
Status: No Feedback Package: Gettext related
PHP Version: 4.2.3 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mike at graftonhall dot co dot nz
New email:
PHP Version: OS:

 

 [2002-09-12 13:14 UTC] mike at graftonhall dot co dot nz
Description:
When translating some strings to Japanese or Chinese (and possibly other multibyte character sets) php will start using 100% CPU time and never exit. 

I acutally use the latest stable win32 snapshot from snaps.php.net and this problem has definatly been reproducable for the last week with the builds from there.

The same is from for CGI or Apache Module

My System:
Windows 2000 Pro SP2
Dual Athlon XP (I haven't tried removing a CPU to see if it's a dual CPU issue yet)
Apache
PHP 4.2.4-dev (http://www.graftonhall.co.nz/test.php for php info screen)

I am happy to supply more examples or test builds.

How to reproduce:
the file http://www.graftonhall.co.nz/temp/gettext/gettext.zip contains a test script and a single japanese translation that will cause this effect. The .mo and .po files are there. 

The script included is:
<?php
$lang='ja_JP';
@putenv('LANG=' . $lang);
@putenv('LANGUAGE=' . $lang);
setlocale(LC_ALL, $lang);

// Specify location of translation tables
bindtextdomain("broken", './locale');

// Choose domain
textdomain("broken");

echo _("Birthday");

?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-12 17:46 UTC] sniper@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.
 [2002-09-12 17:47 UTC] sniper@php.net
Oops..accidently clicked the url to close this..nothing was fixed in related to this. :I

Anyway, that url to that .zip package doesn't seem to work..at least not for me..is it correct?

 [2002-09-12 20:48 UTC] mike at graftonhall dot co dot nz
Sorry. My webserver died for a few hours. Just got a new motherboard in and I can basically confirm it is hardware independant. Now on a single Athlon XP and still the same problem.

Same URL will now work.
 [2002-10-28 10:55 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-11-14 01:44 UTC] sniper@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC