php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #16400 $_FILES array and mp3 files
Submitted: 2002-04-02 17:06 UTC Modified: 2002-04-05 15:27 UTC
From: cmoneti at twcny dot rr dot com Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.1.2 OS: Linux RH7.1
Private report: No CVE-ID: None
 [2002-04-02 17:06 UTC] cmoneti at twcny dot rr dot com
I am using PHP4.2.0RC1. When referencing .mp3 file uploads, the $_FILES[name]['tmp_name'] is empty, and $_FILES[name][size] is 0. When referencing other file types, everything works fine.

Thanks.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-03 01:40 UTC] torben@php.net
Does it work with other file types of similar size to the
MP3s which you are uploading? i.e. are you sure it's not
a max_file_size problem?

Torben
 [2002-04-03 11:02 UTC] cmoneti at twcny dot rr dot com
After further investigation, I have found that ini_set("upload_max_filesize", "15M")
or
ini_set("upload_max_filesize", "15000000")
or
ini_set("upload_max_filesize", 15000000)
does not work. If I change the setting in php.ini, the uploads work. So, ini_set seems to be the culprit. The cutoff size _was_ the default 2M in php.ini. If "upload_max_filesize" cannot be set via a script, it is an unfortunate problem.

I also tried setting ini_set("memory_limit","15M") and wonder about "post_max_size" (no detailed documentation). However, I didn't need to change them to make things work.
 [2002-04-03 12:31 UTC] sander@php.net
PHP decides whether a file is accepted BEFORE your script runs. The changes to php.ini with ini_set() are made AFTER the uploads are processed by PHP, and thus have no effect on the the decision.
This is intended behaviour.
 [2002-04-03 17:26 UTC] cmoneti at twcny dot rr dot com
So, you are saying that the max filesize for uploads cannot be set in script? Perhaps the documentation is confusing me. Would you explain what the ini_set parameter "upload_max_filesize" is used for? The documentation for ini_set() says this parameter is settable via script (PHP_INI_ALL).

Thanks.
 [2002-04-04 04:05 UTC] sander@php.net
It is settable in a script, but it just doesn't have any effect.
Reopening as a documentation problem and assigning to myself.
 [2002-04-05 15:27 UTC] sander@php.net
This bug has been fixed in CVS.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 20 06:01:34 2024 UTC