nicholasstephan Posted March 29, 2010 Share Posted March 29, 2010 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 More sharing options...
PFMaBiSmAd Posted March 29, 2010 Share Posted March 29, 2010 Your form must be invalid (i.e. some of the form elements outside the <form></form> tags.) It would take seeing your actual form for someone to be able to help you. Link to comment https://forums.phpfreaks.com/topic/196916-incomplete-_file-var/#findComment-1033833 Share on other sites More sharing options...
nicholasstephan Posted March 30, 2010 Author Share Posted March 30, 2010 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. Link to comment https://forums.phpfreaks.com/topic/196916-incomplete-_file-var/#findComment-1034259 Share on other sites More sharing options...
PFMaBiSmAd Posted March 30, 2010 Share Posted March 30, 2010 It's likely that your server has this - http://www.hardened-php.net/ Link to comment https://forums.phpfreaks.com/topic/196916-incomplete-_file-var/#findComment-1034263 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.