Jump to content

incomplete $_FILE var


nicholasstephan

Recommended Posts

Hi,

 

I've written some image gallery CMS software and I'm having some strange results with the $_FILE uploads.

 

I have recurring html fields that look like:

 

<input type="file" name="large[]"/>

 

 

when I submit the form the $_FILE array looks like the following. But there should be about 15 files in the array, not 5 (in the case of 'medium' images) or 4 (in the case of 'large' images)...

 

Why are these arrays being truncated?

 

 

thanks

 

 

    .

    .

    .

    [medium] => Array

        (

            [name] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                    [5] => sigline_maltese_chairs_01.jpg

                )

 

            [type] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                    [5] => image/jpeg

                )

 

            [tmp_name] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                    [5] => /tmp/phpuKDwYq

                )

 

            [error] => Array

                (

                    [0] => 4

                    [1] => 4

                    [2] => 4

                    [3] => 4

                    [4] => 4

                    [5] => 0

                )

 

            => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                    [5] => 21562

                )

 

        )

 

    [large] => Array

        (

            [name] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                )

 

            [type] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                )

 

            [tmp_name] => Array

                (

                    [0] =>

                    [1] =>

                    [2] =>

                    [3] =>

                    [4] =>

                )

 

            [error] => Array

                (

                    [0] => 4

                    [1] => 4

                    [2] => 4

                    [3] => 4

                    [4] => 4

                )

 

            => Array

                (

                    [0] => 0

                    [1] => 0

                    [2] => 0

                    [3] => 0

                    [4] => 0

                )

 

        )

 

)

Link to comment
https://forums.phpfreaks.com/topic/196916-incomplete-_file-var/
Share on other sites

that's a good idea... I took out all but the form elements to take a look, but everything looks fine. So I copied the code over to my MAMP dir to test locally and what do you know... it works. Hours of fiddling and it's a server issue.

 

It looks like the server is allowing 20 file inputs through, but no more than that. Is that something in php configs? How do I get around this?

 

 

thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.