On Mon, Sep 9, 2013 at 6:02 AM, Chris Wright <daveran...@php.net> wrote:
>> But the docs mentions that "file_uploads" accept integer values, too.
>> It says: "When an integer is used, the value is measured in bytes."
>
> The documentation here is indeed misleading/wrong.
>
> file_uploads is represented internally as a boolean:
> http://lxr.php.net/xref/PHP_5_5/main/php_globals.h#130
>
> ...and (unsurprisingly) it is parsed as a boolean:
> http://lxr.php.net/xref/PHP_5_5/main/main.c#534
>
> This has actually been raised as a docs bug before:
> https://bugs.php.net/bug.php?id=60036
>
> salathe, do you have any more info on this?
>
>> What would that mean for example:
>> ;php.ini
>> file_uploads = 1024
>
> According to what I see at first glance, this would be the same as On
>
> I'll try and take a closer look at this later today.


You are right. file_uploads is a boolean and has nothing to do with
the allowed max upload size.

The misleading paragraph was accidentally introduced when trying to
unify how PHP parses "mb", "kb", "b" and whatelse as part of ini
values (9 years ago!).

See http://svn.php.net/viewvc?view=revision&revision=165348

That entity should be removed from file_upload, along with the later
commit to add "or integer" :]

-Hannes

Reply via email to