#17958 [Com]: <input type=file> loses $_POST vars
| From: | php at vta dot com | Date: | Wed, 19 Feb 2003 18:50:54 +0000 |
| Subject: | #17958 [Com]: <input type=file> loses $_POST vars | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-33577@lists.php.net to get a copy of this message | ||
ID: 17958
Comment by: php at vta dot com
Reported By: ddp at deakin dot edu dot au
Status: Closed
Bug Type: Apache2 related
Operating System: Linux 2.4.18
PHP Version: 4.2.3
New Comment:
Hi all,
New here, big fan of php.
Dunno if this has been covered already, hoping to help.
I had this same problem all day long, until I landed here,
and read the history.
With some careful grepping in the php4.3.1/NEWS for
'form-data' i found mention of the 'variables-order' directive. Taking
that over to php-ini, I found the directive
'gpc-order' uncommented, and noted as depricated in favor of
the 'variables_order' directive. Lo and Behod, when I removed
'gpc-order', <multipart/form-data> began to work.
friendly sugestion to comment out the gpc_order directive
in the distribution file 'php-ini' if not done already.
(Also possible that it was overlooked in the *.tar.gz file
and not the *.bz distribution, I use fetch:// to fish for
a *.gz distribution because even tho I love PHP I hate pointy-mashy
dowmload tools on unix boxes, generally, and
the website only shows *.bz2 . :) )
My build information follows, to help anyone who may need it,
just in case this is not the only solution, or if this
turns out to be a red herring because something else I did fixed it:
Host OS: FreeBSD RELENG 3
PHP version: 4.3.1 build date 2/19/2003 8:21 EDT
Apache build 1.3.27 build date: same ( slightly later :) )
Static module --with-mysql
client OS MAC OS-X 10.1
Browsers: Netscape 4.75 Mac
And: I.E 5.1 for mac
Problem: Pretty much as previously described.
Reference code sample:
"PHP4 developers's guide" McGraw-Hill, ISBN 0-07-212731-7
page 84
(Pretty much same as sample code posted by others.)
Cheers, HTH
< php at vta.com >
Previous Comments:
------------------------------------------------------------------------
[2003-01-10 11:06:34] harry at ilo dot de
I'm sorry, the bug still appears with PHP 4.3.0.
---
System Windows NT localhost 5.1 build 2600
Build Date Dec 27 2002 05:28:00
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Apache Version Apache/1.3.24
Apache Release 10324100
Apache API Version 19990320
SERVER_SOFTWARE Apache/1.3.23 (Win32) PHP/4.3.0 mod_gzip/1.3.19.1a
mod_ssl/2.8.6 OpenSSL/0.9.6c
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461;
.NET CLR 1.0.3705)
---
It doesn't matter if I use Mozilla instead.
------------------------------------------------------------------------
[2002-12-29 05:03:53] derick@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php
------------------------------------------------------------------------
[2002-12-28 19:17:07] mati at poczta dot pl
When I change in (php.ini) register_globals = On
and restart Apache everythings looks to work OK
Ps. Sorry - my english is terrible but I want help :)
------------------------------------------------------------------------
[2002-12-23 12:07:30] harry at ilo dot de
@sorry@aol.com
No, it doesn't.
The problem is that the whole $_POST-Array is empty if the data is
submited as multipart/form-data.
------------------------------------------------------------------------
[2002-12-12 21:27:38] sorry at aol dot com
Use $_FILES to access the the file specs. Use $_POST for all others.
-----taken from phpinfo()----------------------
$_POST["user"] (gives me) ryan
$_FILES["userfile"] (gives me)
Array
(
[name] => Test.class
[type] => application/octet-stream
[tmp_name] => /tmp/phpyXUyr7
[error] => 0
[size] => 444
)
----------------------------
PHP Version 4.2.2
Apache/1.3.12
Hope this helps
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/17958
--
Edit this bug report at http://bugs.php.net/?id=17958&edit=1