#25474 [Opn->Fbk]: apache2filter: posting from a multiple select box is not working correctly

From: Date: Tue, 23 Sep 2003 13:31:09 +0000
Subject: #25474 [Opn->Fbk]: apache2filter: posting from a multiple select box is not working correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47987@lists.php.net to get a copy of this message
ID: 25474 Updated by: sniper@php.net Reported By: fmuller at cisco dot com -Status: Open +Status: Feedback Bug Type: Apache2 related Operating System: redhat 7.3 PHP Version: 4.3.3 New Comment: Instead of using --with-apache2filter, use --with-apxs2, which enables the apache2handler version. Please let us know if that works. Previous Comments: ------------------------------------------------------------------------ [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' '--with-apxs2filter=/usr/sbin/apxs' 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] sniper@php.net Works fine for me. How did you configure PHP? How did you configure PHP for Apache2? Add this line to your test script: echo $HTTP_RAW_POST_DATA; 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 Description: ------------ 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: _REQUEST["param"] Array ( [0] => 1 [1] => 2param[]=1 [2] => 2 ) _POST["param"] Array ( [0] => 1 [1] => 2param[]=1 [2] => 2 ) Reproduce code: --------------- <html> <body> <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> </select> <input type=submit> </form> </body> </html> ------------------ phpinfo.php <? phpinfo(); ?> Expected result: ---------------- _REQUEST["param"] Array ( [0] => 1 [1] => 2 ) _POST["param"] Array ( [0] => 1 [1] => 2 ) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25474&edit=1

« previous php.bugs (#47987) next »