Re: [PHP-DEV] Strange behaviour on upload

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

 



Hey:

On Mon, Mar 30, 2015 at 5:16 AM, Kevin Ingwersen (Ingwie Phoenix)
<ingwie2000@xxxxxxxxxxxxxx> wrote:
> Hey.
>
> I am running my PHP app through a NodeJS server using a FastCGI bridge. Today, I was about to implement an image uploader on my site - only to realize that file uploads were not possible.
>
> So I generated a few files and tested how big the files must be for the upload to fail. I got surprised how early this happened:
>
> Ingwie@Ingwies-Macbook-Pro.local ~/W/BIRD3 $ genfile 31k text.txt; and curl -v -4 -X POST -F "img=@text.txt" http://localhost:8080/user/changeAvatar
> (…)
> Ingwie@Ingwies-Macbook-Pro.local ~/W/BIRD3 $ ls -l text.txt
> -rw-r--r--+ 1 Ingwie  staff  63488 29 Mär 23:10 text.txt
>
> the genfile command is a simple function:
>
> function genfile
>     command dd if=/dev/urandom of=$argv[2] bs=$argv[1] count=2
> end
>
> (I am using the fish shell, so its slightly different to Bash.)
>
> The error that I am seeing on the PHP end is that the file array’s error property shows „3“, which is the UPLOAD_ERR_PARTIAL constant.
>
> My question is, under which conditions is that error triggered? I can verify that my NodeJS FCGI bridge is correctly giving all bites to the process, so PHP should actually have the entire request body (the file names and contents) at hand.
This is not sure usage discussion list, you may want to write to
general instead(cced)

anyway, it may relates to nginx (apache)'s max_post_size configuration

thanks
>
> BTW, my backend is talking to PHP via php-fpm.
>
> Kind regards, Ingwie.
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux