|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20655 Arrays and Hashes get cut-off the first 4 characters
Submitted: 2002-11-26 12:52 UTC Modified: 2003-04-06 21:12 UTC
From: joel at elserver dot com Assigned:
Status: Closed Package: mbstring related
PHP Version: 4.2.3 OS: Linux Slackware 8.1 Kernel 2.419
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: joel at elserver dot com
New email:
PHP Version: OS:


 [2002-11-26 12:52 UTC] joel at elserver dot com
Whenever a GET/POST is done from a web form, the resulting $_GET, $_POST arrays are auto-generated with the first 4 chars of the string cut-off IF the string is 4 or more chars.

For instance:

<form method="get">
name: <input type="text" name="test[name]"><br>
age: <input type="text" name="test[age]"><br>
<input type="submit">

completed with name = "123456"
and age = "654321"

would generate:

(with this code)

the following:

    [0] => 56
    [1] => 21

as you can see the first 4 chars have been truncated.

it's been done with linux slackware 8.1, kernel 2.4.19+grsecurity on AMD and Intel microprocessors.

the configure line:


./configure \
--prefix=/usr/local/php \
--enable-force-cgi-redirect \
--with-zlib \
--enable-sockets \
--with-mysql=/usr/local/mysql \
--enable-memory-limit \
--with-mm=/root/software/apache/mm-1.1.3/ \
--with-gd=/usr/local/gd-lib \
--enable-ftp \
--enable-calendar \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-freetype-dir= \
--enable-gd-native-ttf \
--with-mcrypt=/usr/local/lib/libmcrypt \
--enable-inline-optimization \
--enable-pcntl \
--enable-mbstring \
--enable-mbstr-enc-trans \
--enable-mbregex \
--with-imap=/root/software/lib/imap-2002/ \
--with-imap-ssl \

with version 4.2.3. have not tested any variants.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-26 12:55 UTC]
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
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

Also try --disable-mbstring if you still want to use the released version.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 01 22:01:28 2024 UTC