php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23855 strange handling of file uploading
Submitted: 2003-05-28 08:56 UTC Modified: 2003-05-28 08:59 UTC
From: df at nn dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4CVS-2003-05-28 (stable) OS: Debian GNU/Linux (2.4.19)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: df at nn dot ru
New email:
PHP Version: OS:

 

 [2003-05-28 08:56 UTC] df at nn dot ru
Small form 
<form method=POST enctype=multipart/form-data> 
<input type=file name=Params[5]> 
<input type=text name=Params[6] value='some text'> 
</form> 
and php code 
<?                                                                                                  
                                                                                                    
print "<pre>";                                                                                      
print_r($Params);                                                                                   
print_r($Params_name);                                                                              
print "</pre>";                                                                                     
                                                                                                    
?>   
--------------------------- 
When I try to call print_r($Params), it returns: 
Array 
( 
    [5] => some text 
) 
instead what I expect: 
Array 
( 
 [5] => /tmp/php.... 
 [6] => some text 
) 
 
And print_r($Params_name) returns: 
Array 
( 
    [6] => filename 
) 
 
But, if will replace file field and text, everything works 
fine. 
------------------- 
I'm using Apache 1.3.27 
 
And here is my configure options:  
'../configure' '--prefix=/usr' '--with-apxs=/usr/bin/apxs' 
'--with-regex=php' 
'--with-config-file-path=/etc/php4/apache' 
'--disable-rpath' '--disable-debug' 
'--enable-memory-limit' '--with-layout=GNU' 
'--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' 
'--enable-track-vars' '--enable-trans-sid' 
'--enable-bcmath' '--with-bz2' '--enable-ctype' 
'--with-db2' '--with-iconv' '--enable-exif' 
'--enable-filepro' '--enable-ftp' '--with-gettext' 
'--enable-mbstring' '--with-pcre-regex=/usr' 
'--enable-shmop' '--enable-sockets' '--enable-wddx' 
'--enable-sigchild' '--enable-xml' '--with-expat-dir=/usr' 
'--enable-yp' '--with-zlib' '--without-pgsql' 
'--with-exec-dir=/usr/lib/php4/libexec' 
'--with-pear=/usr/share/pear' '--disable-static' 
'--with-curl=shared,/usr' '--with-dom=shared,/usr' 
'--with-zlib-dir=/usr' '--with-gd=shared,/usr' 
'--with-jpeg-dir=shared,/usr' 
'--with-xpm-dir=shared,/usr/X11R6' 
'--with-png-dir=shared,/usr' 
'--with-freetype-dir=shared,/usr' 
'--with-imap=shared,/usr' '--with-kerberos=/usr' 
'--with-ldap=shared,/usr' '--with-mcal=shared,/usr' 
'--with-mhash=shared,/usr' '--with-mm' 
'--with-mysql=shared,/usr' '--with-unixODBC=shared,/usr' 
'--with-recode=shared,/usr' '--enable-xslt=shared' 
'--with-xslt-sablot=shared,/usr' '--with-snmp=shared' 
'--with-sybase-ct=shared,/usr' '--with-ttf=shared,/usr' 
'--with-t1lib=shared,/usr'  
 
PS: I noticed the same problem in a 4.3.1 
 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-05-28 08:59 UTC] sniper@php.net
Use the $_FILES array.

 [2003-05-28 09:11 UTC] covex at nn dot ru
When we changed the form:

<form method=POST enctype=multipart/form-data> 
<input type=text name=Params[4] value='some text'> 
<input type=file name=Params[5]> 
<input type=text name=Params[6] value='some text'> 
</form>

... <? print_r($Params); ?> worked well
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 03:01:32 2024 UTC