We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

nGen file uploads bomb out when larger than 3MB or so?

Development and Programming

ewn's avatar
ewn
100 posts
16 years ago
ewn's avatar ewn

Has anyone else encountered an issue with nGen and file sizes?

We’re running a MSM site and uploads over 3MB or so bomb out when uploading. We are using nGen File Field 1.0.

The error we get is:

“Something happened while uploading (filname) Please try again”

We were on an earlier version before upgrading nGen to 1.0 and got an error, although not as pretty as the one in 1.0:

Warning: getimagesize() [function.getimagesize]: Filename cannot be empty in /home/(directory)/public_html/admin/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php on line 10 Warning: Cannot modify header information - headers already sent by (output started at /home/(directory)/public_html/admin/extensions/fieldtypes/ngen_file_field/ft.ngen_file_field.php:10) in /home/(directory)/public_html/admin/core/core.functions.php on line 296
       
ender's avatar
ender
1,644 posts
16 years ago
ender's avatar ender

probably running into the apache/php upload limit and/or max execution time.

in your admin (system) folder, create a .htaccess file and in it put:

php_value upload_max_filesize 60M
php_value post_max_size 65M
php_value max_execution_time 800

unfortunately all servers are configured a little bit differently so that might or might not work, but hopefully it will 😊

of course you’ll want to change the exact values to suit your needs and server resources.

       
ewn's avatar
ewn
100 posts
16 years ago
ewn's avatar ewn

Yup! That did it. Thank for reminding me about php limits and sorting them using .htaccess. Not sure why this didn’t occur to me earlier! 😊

       
ewn's avatar
ewn
100 posts
16 years ago
ewn's avatar ewn

Do you happen to know if there is a php upload limit for number of files (at once) or is it all just based on total file sizes (for future reference when working with nGen, and adding rows / files). Thanks!

       
ender's avatar
ender
1,644 posts
16 years ago
ender's avatar ender

post_max_size is the size of all files combined, upload_max_filesize is the largest any particular file can be. I’m not aware of anything that prevents them from uploading more than X files in one shot other than just limiting the number of file upload fields in the form (of course someone malicious could create their own html form pointing at your servers if they wanted to).

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Pretty sure there is indeed a max_file_uploads php.ini directive isn’t there?

Best wishes,

Mark

       
ender's avatar
ender
1,644 posts
16 years ago
ender's avatar ender

there is, but it was added fairly recently. I think it’s only available in PHP since 5.2.12 RC1 and 5.3.1 RC3

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
there is, but it was added fairly recently. I think it’s only available in PHP since 5.2.12 RC1 and 5.3.1 RC3

Ah well I’m using nothing less than 5.2.13 so that’s why I knew of it 😉

       
journalistone's avatar
journalistone
78 posts
16 years ago
journalistone's avatar journalistone

Dear all here.

I am just trying to cure a file upload problem that I am having via a Standalone Entry Form.

I have access to my php.ini and increased the following in the php.ini: upload_max_filesize 100M post_max_size 300M max_execution_time 800

… but I am still having problems uploading an 11MB file. I also have set a very large file upload preference in the EE File Upload preferences.

And, I contacted my server host and they tested a 20MB file and said it was no problem.

Somehow the server connection bombs out and it is infuriating the life out of me.

I have tested also a 3.5MB file and a 2.5MB. Somewhere in the region of 2MB seems to, on average, upload successfully.

Is there anything I should try here ? Would adding the .htaccess make any difference since I have already changed the php.ini file ?

Any guidance absolutely welcome 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.