This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 143607 - "need to have php4 installed with the multibyte string function enabled"
"need to have php4 installed with the multibyte string function enabled"
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Joe Orton
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-22 15:15 EST by Suzanne Hillman
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: 4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-03 11:32:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Japanese mbox folder (7.11 KB, text/plain)
2004-12-22 15:15 EST, Suzanne Hillman
no flags Details
Folder as seen in Mozilla Mail (correct) (50.41 KB, image/png)
2005-01-13 10:35 EST, Christer Boräng
no flags Details
Folder as seen in Squirrelmail (NOT correct, mails missing) (52.00 KB, image/png)
2005-01-13 10:37 EST, Christer Boräng
no flags Details
maildir folder containing problem mails (26.00 KB, application/octet-stream)
2005-01-13 11:09 EST, Christer Boräng
no flags Details

  None (edit)
Description Suzanne Hillman 2004-12-22 15:15:05 EST
Created attachment 109048 [details]
Japanese mbox folder
Comment 1 Suzanne Hillman 2004-12-22 15:15:05 EST
Description of problem: Attempting to test Squirrelmail's errata resulted in
some strange behavior relating to PHP and Japanese character displaying. I don't
have enough information to be sure it's all archs, but the fact that it happened
(with varying results) on the stable s390x, ia64, and x86_64 qa boxes makes me
suspicious that it's not really arch-specific, regardless of the fact that the
stable i386, ppc, and s390 qa boxes seemed ok (i386 and s390 even appeared to be
able to handle Japanese characters even if the display for Squirrelmail was
still set to English, oddly enough).

Version-Release number of selected component (if applicable):
php-4.3.2-14.ent.i386

How reproducible:
Always, on the ones it was happening on.

Steps to Reproduce:
1. Start imap on the local host if not already running, since Squirrelmail needs
imap and it's easier to configure on one's local box. (imap is handled by xinetd)
2. put the attached file into your imap mail directory (default is 'mail' in the
home directory of user you log into Squirrelmail as)
3. Log into http://hostname/webmail - this will need to be as an existing user
on the server handling imap
4. Go to the 'Folder' setting, and add the folder named the same as the file you
put into the mail directory. Refresh the folder settings so you can see it on
the lefthand side.
5. Go into Options, click Display Preferences, and change the Language to Japanese.
6. Go into the Folder you added. There should be two mail messages here, both of
which are mostly japanese characters. You should also already be seeing "You
need to have php4 installed with the multibyte string function enabled
(using configure option --enable-mbstring)." messages at the top of the screen.
If you try to read either of the two messages, you will see that same message,
as well as "Fatal error: Call to undefined function: mb_detect_encoding() in
/usr/share/squirrelmail/functions/mime.php on line 351"
  
Depending on something I'm not entirely sure of, you might get the initial php
error message upon attempting to log into squirrelmail on the s390x (I may have
left it set to Japanese language. That could explain it, maybe), and not even
manage to login.

Actual results:
Errors about php as mentioned above.

Expected results:
No errors. Should just work happily.

Additional info:

The owner of squirrelmail suspects this behavior is php and not actually
squirrelmail. I had a similar suspicion.
Comment 2 Joe Orton 2005-01-04 04:44:23 EST
The mbstring extension is known to be 64-bit-unsafe so if it just gives
corrupted output or crashes or something on the 64-bit platforms that's
completely unsurprising.  An "undefined function" error is surprising though -
is that reproducible always?
Comment 3 Christer Boräng 2005-01-13 10:35:38 EST
Created attachment 109718 [details]
Folder as seen in Mozilla Mail (correct)
Comment 4 Christer Boräng 2005-01-13 10:36:46 EST
We believe we're seeing the same bug. Not only are japanese mails
unreadable (invisible), they also cause other mails to disappear from
folder lists. See attached images of the same folder in Mozilla mail
and Squirrelmail.

We're running up2date EL3 on x86_64.
Comment 5 Christer Boräng 2005-01-13 10:37:55 EST
Created attachment 109719 [details]
Folder as seen in Squirrelmail (NOT correct, mails missing)
Comment 6 Joe Orton 2005-01-13 10:43:46 EST
Could you attach a minimal mailbox which displays correctly e.g. via
Mozilla, and doesn't work correctly via Squirrelmail?
Comment 7 Christer Boräng 2005-01-13 11:09:00 EST
Created attachment 109721 [details]
maildir folder containing problem mails

Here's a maildir folder that contains a sanitized version of the problem mails
in the screenshots, and some additional mails. In squirrelmail, I see none of
the emails in the folder view, in mozilla mail I see them all.

The non-japanese mails can be seen if you search for them using Squirrelmails
built in search feature, but the japanese ones can't.
Comment 8 Björn Augustsson 2005-01-14 10:49:43 EST
FYI

We updated to php-4.3.9-3 (and the various things needed for that,
file, pcre, c-client) built from SRPMs from the nahant beta to get
around this. 

(We need it working on monday, when the students show back up)

That fixed it for us until a proper update (or RH4) comes along.
Comment 9 Joe Orton 2007-04-03 11:32:34 EDT
This is fixed in Red Hat Enterprise Linux 4 and later; the mbstring extension
was not 64-bit-safe in earlier releases.

Note You need to log in before you can comment on or make changes to this bug.