File Upload Size Limit

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Ideas Centre
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
chemical_brother2001
Registered User
Posts: 9
Joined: Sun Apr 27, 2008 12:04 pm

File Upload Size Limit

Post by chemical_brother2001 » Sun Apr 27, 2008 12:25 pm

Hello wondering if you can help. Im trying to upload a pdf to my site which is a computer technical help forum located at http://www.tearingmyhairout.co.uk only problem is the file is 4 mb and there is a limit on file size uploads which apparantly cant be changed and this is set at 2mb which is ridiculous, can anyone help, how do i increase the allowed file size limit ?

This is the message i get :

The attachment’s file size is too large, the maximum upload size is 2 MB.
Please note this is set in php.ini and cannot be overridden

Any help would be greatly appreciated

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 12:30 pm

You could try putting these in the .htaccess file at your site's root:
php_value upload_max_filesize "6M"
php_value post_max_size "25M"
Adjust the values to get what you need.

Sometimes this can get round your inability to edit php.ini

The_Descendant
Registered User
Posts: 233
Joined: Thu Sep 13, 2007 5:48 pm

Re: File Upload Size Limit

Post by The_Descendant » Sun Apr 27, 2008 12:30 pm

You will need to contact your host and ask for an increase.

Pit$Bull
Former Team Member
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: File Upload Size Limit

Post by Pit$Bull » Sun Apr 27, 2008 12:36 pm


User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 12:39 pm

Pit$Bull wrote:This is not a phpBB3 issue.
http://us.php.net/manual/en/ini.core.ph ... x-filesize
It's not related to your phpBB installation, though as Pit$Bull points out.

More a hosting/server config issue.
Last edited by jimdunn on Sun Apr 27, 2008 12:48 pm, edited 2 times in total.

Pit$Bull
Former Team Member
Posts: 23099
Joined: Sat Dec 02, 2006 4:08 pm
Name: Can't Remember

Re: File Upload Size Limit

Post by Pit$Bull » Sun Apr 27, 2008 12:44 pm

jimdunn wrote:
Pit$Bull wrote:This is not a phpBB3 issue.
http://us.php.net/manual/en/ini.core.ph ... x-filesize
No, it isn't strictly a phpBB3 issue

I didn't think it would hurt anyone too much to try and help, though...


Sorry if I've breached a protocol somewhere

Jim
:)
I think you missed my intent ;)
I was just letting you know that changes could not be done via phpBB3.

chemical_brother2001
Registered User
Posts: 9
Joined: Sun Apr 27, 2008 12:04 pm

Re: File Upload Size Limit

Post by chemical_brother2001 » Sun Apr 27, 2008 12:48 pm

Well i actually run a VPS server and this is were my site sits, so this is a problem because i need to increase the file size for the VPS account itself and not look at trying to increase the size through phpbb3 ? ?

Thanks for the swift help

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 12:51 pm

Pit$Bull wrote:
jimdunn wrote:
Pit$Bull wrote:This is not a phpBB3 issue.
http://us.php.net/manual/en/ini.core.ph ... x-filesize
No, it isn't strictly a phpBB3 issue

I didn't think it would hurt anyone too much to try and help, though...


Sorry if I've breached a protocol somewhere

Jim
:)
I think you missed my intent ;)
I was just letting you know that changes could not be done via phpBB3.

So I edited my response, because you're right, I missed your intent, sorry...

The_Descendant
Registered User
Posts: 233
Joined: Thu Sep 13, 2007 5:48 pm

Re: File Upload Size Limit

Post by The_Descendant » Sun Apr 27, 2008 12:52 pm

The_Descendant wrote:You will need to contact your host and ask for an increase.
This, as stated earlier should help you. Btw, who's your host, just wondering?

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 12:53 pm

chemical_brother2001 wrote:Well i actually run a VPS server and this is were my site sits, so this is a problem because i need to increase the file size for the VPS account itself and not look at trying to increase the size through phpbb3 ? ?

Thanks for the swift help
Then if you run a VPS you should be able to adjust these values yourself, shouldn't you ?

Sorry if I'm being thick, here

The_Descendant
Registered User
Posts: 233
Joined: Thu Sep 13, 2007 5:48 pm

Re: File Upload Size Limit

Post by The_Descendant » Sun Apr 27, 2008 12:55 pm

I would think so JimDunn, thats why I'm questioning his host. Because some hosts even offer a shared server to change.

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 12:57 pm

The_Descendant wrote:I would think so JimDunn, thats why I'm questioning his host. Because some hosts even offer a shared server to change.
Gotcha

fair question then.

We need more info from the OP it seems.

chemical_brother2001
Registered User
Posts: 9
Joined: Sun Apr 27, 2008 12:04 pm

Re: File Upload Size Limit

Post by chemical_brother2001 » Sun Apr 27, 2008 1:57 pm

Yes your not being thick im just a little green at the moment when it comes to VPS as i have only been running it for 3 months, the reason i run a VPS is because my gaming site www.ukmarinecore.com which is a very popular site kept getting DDOS attacked and our "shared" hosts kept terminating our web account straight away.

Thats why im at the learning stage with phpbb3 also because of the other site im running mentioned before. I set up the VPS account for www.tearingmyhairout.com so there must be a setting in the WHM panel to raise the allowed upload limit on files, but now i just have to find it as i have no idea in whm were that setting is held !!

Again really appreciate you guys helping me out and showing interest in this topic

:mrgreen:

User avatar
jimdunn
Registered User
Posts: 1570
Joined: Tue Mar 25, 2008 11:49 am
Location: Australia

Re: File Upload Size Limit

Post by jimdunn » Sun Apr 27, 2008 10:13 pm

I don't think you can edit php.ini directly from WHM.

You may need to log in with a shell (ssh) and look for it at:

/usr/lib/php.ini or /usr/local/lib/php.ini or even /etc/php.ini

Type: locate php.ini to find it

Do make a backup of php.ini before you edit it - if you make a mistake editing it, you could cause php to not run at all - not good.

Once you have located the file,In php.ini search for this line “upload_max_filesize = 2M”, replace the 2M with your desired value like 5M, 10M etc. Save the file. Now you need to restart Apache for the changes to effect, this can be done through WHM, or with the command

Code: Select all

 /etc/rc.d/init.d/httpd restart
Refresh the browser, your site should work normally.

ChoppedPhoto.com
Registered User
Posts: 10
Joined: Sat Mar 22, 2008 7:36 pm

Re: File Upload Size Limit

Post by ChoppedPhoto.com » Wed May 07, 2008 4:59 am

The attachment’s file size is too large, the maximum upload size is 2 MB.
Please note this is set in php.ini and cannot be overridden.


I located the original php.ini file in the public_html folder. Under the [Zend] section, I added these lines:

; Maximum size of POST data that PHP will accept.
upload_max_filesize = 740M
post_max_size = 800M


With my hosting service, the key to this is to place a copy of the edited php.ini in the forum folder.

If this file is not in my forum folder, then I will see the error message when uploading anything over 2MB to my forum.

Now, all seems to work as I would expect after making all the necessary attachment settings in phpBB3 ACP.

Locked

Return to “[3.0.x] Support Forum”