MyBB Community Forums

Full Version: Can't upload or download large attachments.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've searched through the forum and elsewhere and don't see a good answer to this problem. I can not upload large attachments.

1. This is a new MyBB site that I converted from a phpBB3 site.
2. What I have done so far based on the comments I read here:
a. increased the size of the allowed attachments in the attachments section of admin_cp.
b. Increased the max size and max time for uploads in php.ini
c. the PHP size information in the tools&maintenance section of admin_cp show the increased size for PHP (Max Upload / POST Size 30M / 50M)

3. the size of the file (an excel file) that I am trying to load is ~ 5MB.

When I attempt to upload the file it pauses briefly, then displays my post with no error message and the attachment is not there. Looking at the upload directory, I don't see and additions.

Anyone got any suggestions as to what I am missing?
1) Are you able to check the apache error log?
2) Did you remember to restart apache after changing the php.ini setting?
3) Is your attachments directory writable? Try chmodding to 775.
4) Add this to inc/init.php and try again, it should display better errors.
error_reporting(E_ALL);
ini_set("display_errors", 1);
(2014-07-24, 10:00 PM)spork985 Wrote: [ -> ]4) Add this to inc/init.php and try again, it should display better errors.
error_reporting(E_ALL);
ini_set("display_errors", 1);

I'd suggest just reading the error logs instead of exposing error information to every user who encounters an error/warning.
(2014-07-25, 02:06 AM)Cameron:D Wrote: [ -> ]
(2014-07-24, 10:00 PM)spork985 Wrote: [ -> ]4) Add this to inc/init.php and try again, it should display better errors.
error_reporting(E_ALL);
ini_set("display_errors", 1);

I'd suggest just reading the error logs instead of exposing error information to every user who encounters an error/warning.

He indicated it was a new site. I can only assume he would be testing before making the site public/advertising it. Adding the error reporting in for a few minutes won't kill anything.
1) Are you able to check the apache error log?
Yes but I don't see anything related to this -- just some normal type things like this: [Fri Jul 25 07:57:45 2014] [error] [client xxx] File does not exist: /var/www/html/forum/media, referer: .../forum/cache/themes/theme2/global.css
2) Did you remember to restart apache after changing the php.ini setting?
Yes, restarted several times just to be sure
3) Is your attachments directory writable? Try chmodding to 775.
It is currently at 777

4) Add this to inc/init.php and try again, it should display better errors.
Haven't done this yet, but the error log shows the following many times -- since I tried to do the load many times.

[24-Jul-2014 16:09:21] PHP Fatal error: Maximum execution time of 80 seconds exceeded in /apps/MyBB/inc/class_error.php on line 601

I've split the file into smaller chunks and that works, but that is not optimal.
Is your server underpowered, like a very slow or overloaded CPU? You could try increasing the max execution time in php.ini and seeing if it accepts the larger files. I would not recommend leaving it set to high in your live site though for an extended period of time.
(2014-07-25, 02:23 PM)spork985 Wrote: [ -> ]Is your server underpowered, like a very slow or overloaded CPU? You could try increasing the max execution time in php.ini and seeing if it accepts the larger files. I would not recommend leaving it set to high in your live site though for an extended period of time.

It is a virtual machine with a very light load and the "uptime" values range form .02 to .12, so lots of capacity. The smaller files load and upload almost instantaneously, e.g., ~ 1-2 MB.