ID: 25474
User updated by: fmuller at cisco dot com
Reported By: fmuller at cisco dot com
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: redhat 7.3
PHP Version: 4.3.3
New Comment:

Here is what the raw post data looks like:

param%5B%5D=1&param%5B%5D=2param%5B%5D=1&param%5B% 5D=2

Here is my configure info: Need more?

Command './configure' 'i386-redhat-linux' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic'
'--disable-rpath' '--enable-inline-optimization' '--with-bz2'
'--with-db4=/usr' '--with-curl' '--with-dom=/usr'
'--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
'--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png'
'--with-regex=system' '--with-xml' '--with-expat-dir=/usr'
'--with-pcre=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-discard-path' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--with-pear=/usr/share' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=/usr' '--with-mysql=/usr'
'--with-oci8=/opt/oracle/product/9.2' '--with-mssql'
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath'
'--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring'
'--enable-mbstr-enc-trans' '--enable-mbregex'

Additional info:
Things also work fine if my action is a perl cgi-bin script:

content_length = 27
stdin = param%5B%5D=1&param%5B%5D=2

Previous Comments:

[2003-09-10 20:18:23] [email][/email]

Works fine for me. How did you configure PHP?
How did you configure PHP for Apache2?

Add this line to your test script:


And set "always_populate_raw_post_data" php.ini option to 'On'. Then
post the result here.


[2003-09-10 14:30:47] fmuller at cisco dot com

Red Hat 7.3/Apache 2.0/PHP 4.3.3.

If I select multiple selections on a select box,
with an array name,
with a form method of post

I do not get the array of selected values I expect.

If one option is selected it works fine.
If I use a method of get it works fine.

Here is what phpinfo.php displays when I select 1 and 2:


[0] => 1
[1] => 2param[]=1
[2] => 2


[0] => 1
[1] => 2param[]=1
[2] => 2

Reproduce code:
<form method=post action=phpinfo.php>
<select name="param[]" multiple size=6>
<option value=0>0</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
<option value=6>6</option>
<input type=submit>



Expected result:

[0] => 1
[1] => 2


[0] => 1
[1] => 2


Edit this bug report at [url][/url]