Re: File Upload in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi-

Thanks for the reply.

I'm near to the solution but was struct at teh end.

I have configured post_max_size, memory_limit, max_upload_filesize to '-1'
and max_execution_time to  ' 0'. and restarted the server.

But then, Apache and Browser problems were in place.
In IE6 and IE7, The connection Reset error occured.
In MFF 9 Error 413 occured whre $_Request and $_Server variables were
populated.
In Google Chrome, The complete request is processed, and The File is
uploaded to the server and its MD5 sum was intact. But The FILE SIZE in
$_FILES array turned to NEGATIVE bites.

The testing was done on WINXP 32 Bit system, with XAMP - Latest and with a
2.23 GiB file upload.

I suspect chrome to be doing some kind of magic compared to IE or FF.

Need to try on 64 bit Ubuntu system with respect to this Browser and
apache behavior testing.


[1] Can any one confirm me on what might be the impact if post_max_size,
memory_limit, max_upload_filesize is configured to '-1' and
max_execution_time to  ' 0' ?

[2] Is this type of solution prone to any kind of vulnerabilities?










2012/2/1 Ege Sertçetin <sertcetin@xxxxxxxxxx>

> Hi Trinath,
>
> You can use ini_set() function to change ini settings only for your upload
> script. http://php.net/manual/en/**function.ini-set.php<http://php.net/manual/en/function.ini-set.php>
>
> However, you cannot change any parameter you want. There is a list about
> php.ini parameters. As I remember, you just can set PHP_INI_ALL and
> PHP_INI_PERDIR parameters in your script. I do not remember if it is enough
> for file upload limits.
>
> php.ini parameters list: http://www.php.net/manual/en/**ini.list.php<http://www.php.net/manual/en/ini.list.php>
>
> Hope it helps :-)
> Ege Sertçetin
>
>
> Alinti Karl DeSaulniers <karl@xxxxxxxxxxxxxxx>
>
>
>  Sry, not better help... better luck. :)
>>
>> Best,
>> Karl
>>
>>
>> On Feb 1, 2012, at 7:01 AM, Karl DeSaulniers wrote:
>>
>>  I would set post_max_size in your htaccess for the directory where your
>>> upload.php file is.
>>> Or base64 your file and upload 8Mb chunks, then reassemble and store.
>>>
>>> but I am sure someone has a better solution than I.
>>>
>>> also, I may be wrong on this too, but this is a PHP General question,
>>> not database related.
>>> you may find better help on the PHP general list.
>>>
>>> Best,
>>>
>>> Karl
>>>
>>>
>>> On Feb 1, 2012, at 3:38 AM, Trinath Somanchi wrote:
>>>
>>>  Hi All-
>>>>
>>>> I have doubt regarding file upload in PHP.
>>>>
>>>> With out updating the INI file settings, Can PHP process File upload
>>>> just
>>>> like Apache handling Multipart post.
>>>>
>>>> Like, Irrespective of post_max_size being 8M, PHP must process a 15MB
>>>> Post
>>>> data (15MB Uploaded file.)
>>>>
>>>> How to work this out with PHP.
>>>>
>>>> Kindly help me in this regard.
>>>>
>>>>
>>>>
>>>> --
>>>> Regards,
>>>> ------------------------------**----------------
>>>> Trinath Somanchi,
>>>>
>>>
>>> Karl DeSaulniers
>>> Design Drumm
>>> http://designdrumm.com
>>>
>>>
>>> --
>>> PHP Database Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>> Karl DeSaulniers
>> Design Drumm
>> http://designdrumm.com
>>
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Regards,
----------------------------------------------
Trinath Somanchi,
+91 9866 235 130

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux