ID: 25474
User updated by: fmuller at cisco dot com
-Summary: apache2filter: posting from a multiple select box is
not working correctly
Reported By: fmuller at cisco dot com
Status: Bogus
Bug Type: Apache2 related
Operating System: redhat 7.3
PHP Version: 4.3.3
New Comment:

Yes, I agree this bug is bogus. I was able to reconfigure httpd.conf
as suggested in 18648, and fix the problem.

I simply commented out the following as suggested from the
Redhat sample httpd.conf file, and restarted apache.

#<Files *.php>
# SetOutputFilter PHP
# SetInputFilter PHP
# LimitRequestBody 524288

Previous Comments:

[2003-09-23 09:33:10] [email][/email]

See bug #18648.

That's caused by the configuration error.


[2003-09-23 09:31:08] [email][/email]

Instead of using --with-apache2filter, use --with-apxs2, which enables
the apache2handler version. Please let us know if that works.


[2003-09-11 07:25:12] fmuller at cisco dot com

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


[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]