You are here: Re: Any reason why $_FILES['userfile']['error'] wouldn't be populated? « PHP Programming Language « IT news, forums, messages
Re: Any reason why $_FILES['userfile']['error'] wouldn't be populated?

Posted by Andy Hassall on 05/27/07 21:52

On 27 May 2007 10:36:10 -0700, lister <listerofsmeg01@hotmail.com> wrote:

>> Do you have error_reporting set to E_ALL? Are there any errors in the Apache
>> log? (in case PHP's done something unusual - although it doesn't sound like
>> it's dumping core). What version of PHP?
>
>Thanks for your pointers. Yes, I have E_ALL reporting on. On looking
>in the Apache error log I found I was getting a error about exceeding
>post_max_size on the ones that fail, but bizarrely not on the ones
>that work, but yet those are larger!!

What enctype do you have on the <form> for the upload? If you don't have
enctype="multipart/form-data", it'll upload it using
application/x-www-form-urlencoded.

Because of this, certain files may be encoded to data several times larger
than their original size - but it depends on the content of the file. Mostly
ASCII files would be closer to their original sizes.

>I can only assume there is some
>bug in PHP when checking post_max_size because the large ones that
>work are VERY large (2GB) (post_max_size is set to 2M)

With files that large then you quite likely run into various 32-bit integer
limits. Many versions of Apache have issues with 2Gb+ files, let alone PHP.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация