php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19476 Array via form chopped when Multi-byte support on.
Submitted: 2002-09-18 08:48 UTC Modified: 2002-09-18 09:26 UTC
From: thomas at deliduka dot com Assigned:
Status: Not a bug Package: mbstring related
PHP Version: 4.2.3 OS: Red Hat Linux 6 and 7.x
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thomas at deliduka dot com
New email:
PHP Version: OS:

 

 [2002-09-18 08:48 UTC] thomas at deliduka dot com
Since I have disabled mb support on my servers to get my 
scripts to work I cannot give a concrete example online but 
I can give something here.

My configure string is:
./configure --quiet --with-apxs=/usr/local/apache-1.3.26/
bin/apxs --with-ftp --with-mysql=/usr/local/mysql --with-
pgsql=/usr/local/pgsql --enable-track-vars --enable-
calendar --disable-debug --with-curl=/usr/local/curl --
enable-mbstring --enable-mbstr-enc-trans --with-mcrypt --
with-gd --with-png-dir --with-zlib-dir --with-jpeg-dir

a second server which also had this problem had a configure 
string of:
./configure --quiet --with-apxs=/usr/local/apache-1.3.26/
bin/apxs --with-ftp --with-mysql=/usr/local/mysql --enable-
track-vars --enable-calendar --disable-debug --with-curl=/
usr/local/curl --enable-mbstring --enable-mbstr-enc-trans

Create a form in which some of the form values consist of:

<input type="text" name="myvar[myvar1]">
<input type="text" name="myvar[myvar2]">
<input type="text" name="myvar[myvar3]">

Then submit the form somewhere and echo back 
$myvar['myvar1'], etc or even do a print_r().  You'll find 
(hopefully as i did) that the first four characters of each 
input are chopped off.

In my case the form field names were like this:
submitui[address1]
submitui[address2]
submitui[city]
submitui[state]

I've seen other forms do this successfully (not with the mb 
support compiled in) so I incorporated it into my shopping 
cart program. After adding the two parameters " --enable-
mbstring --enable-mbstr-enc-trans" submissions using this 
form had the first four characters chopped off.

Since this is so weird I don't know if it would have been 
caught before. I would love to see a solution to this since 
I need MB support for a PHP Domain Registrar program we're 
using.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-18 09:26 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC