Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4341
Latest: jmac32here
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 44306
Total Topics: 7676
Most Online Today: 365
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 252
Total: 252

Author Topic: Increasing Upload Limits PHP  (Read 36581 times)

0 Members and 1 Guest are viewing this topic.

Increasing Upload Limits PHP
« on: »
Increasing Upload Limits PHP

By default php sets the max upload filesize to 2mb
To view your current php settings create the following file
Code: [Select]
<?phpphpinfo();?>

Save it as info.php and upload to your website then view it in your browser.

The two important variables are
upload_max_filesize
And
post_max_size


Next step is to change those settings. Look for "Configuration File (php.ini) Path " and
"Loaded Configuration File" on the phpinfo page to find your php settings are stored.

Edit that file and increase upload_max_filesize and post_max_size to the size of the largest file you wish to be allowed uploaded.

Then after your save those changes be sure to restart your webserver for the changes to take affect.


If you do not have access to the php.ini you can still override it in most cases on apache by creating a .htaccess file and place it in the root directory of your forum. If the file already exists just append these files to it.
Example .htaccess file
Code: [Select]
php_value upload_max_filesize 20M
php_value post_max_size 20M



Also if you are using Fast CGI mod_fcgi with apache you need to increase the
MaxRequestLen - variable in the fastcgi settings

« Last Edit: February 01, 2013, 12:15:58 am by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Increasing Upload Limits PHP
« Reply #1 on: »
increasing it through the Php.ini is no good to me b/c I cant restart the webserver,

I created an .htaccess file with that exact thing and but it in my root directory, but it gives me an http 500 internal server error

any ideas?

Re: Increasing Upload Limits PHP
« Reply #2 on: »
I would try contacting your host for support
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Increasing Upload Limits PHP
« Reply #3 on: »
tried that too, they wont up crap.

They dont seem to get what I'm saying I guess.  Stupid Host Monster.

Re: Increasing Upload Limits PHP
« Reply #4 on: »
i called the host master and they say the file php.ini has to be added by me.

how do i create one and where do i put it in which folder??

the php.ini file which is there on the sever i cannot change it.

what do i do now

Re: Increasing Upload Limits PHP
« Reply #5 on: »
Try the root directory of your site.

On windows i put in c:\windows
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Increasing Upload Limits PHP
« Reply #6 on: »
This was helpful. Thanks.

Re: Increasing Upload Limits PHP
« Reply #7 on: »
updated

never mind I answered my own questions just by asking it. 
« Last Edit: May 29, 2011, 10:03:38 pm by thefley »

Re: Increasing Upload Limits PHP
« Reply #8 on: »
Well, I just created an account here to ask this very question. I'll try the above suggestions and post back if there's a problem.

TIA for the thread.

Re: Increasing Upload Limits PHP
« Reply #9 on: »
hello,
First of all nice work on the software :)

My issue is i don't see the following commands in the php.ini:

upload_max_filesize
post_max_size

I got files up to 100MB that need to go on there? any ideas?
I was thinking to add them myself but can i just write them under there?

I tryed to add the commands to .htcacess but that gives a 500 internal server error.

Greetings
9Th|dexter

Ps the link to the info file: http://www.the9thlegionclan.com/info.php
and link to php.ini :http://www.the9thlegionclan.com/php.ini


Re: Increasing Upload Limits PHP
« Reply #10 on: »
If the commands are not in the php.ini you can just add them to there.
Some configurations require you to restart the webserver to take affect.

That should be it once you have that set. The only other limits would be webserver limits if you are using fcgi you might have to increase those upload limits as well and maybe adjust your webserver timeout settings to wait for long file uploads.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Increasing Upload Limits PHP
« Reply #11 on: »
My hosts php.ini max upload and post file size is 600M.
Still I get error "You need to enter a download title" if I try to upload file size over 100M or so.
What to do next?

Re: Increasing Upload Limits PHP
« Reply #12 on: »
It could be a fastcgi limit as well for request length if they are using fastcgi for php
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Re: Increasing Upload Limits PHP
« Reply #13 on: »
Ooops, my mistake, sorry.

There was php_value upload_max_filesize 600M but php_value post_max_size 80M

Now we increase php_value post_max_size to 600M and its working!

Thanks

Re: Increasing Upload Limits PHP
« Reply #14 on: »
Glad you have it working yes both values need to match in order for it to work correctly.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
5399 Views
Last post December 03, 2007, 11:08:05 am
by CrotalusCo
1 Replies
6861 Views
Last post April 10, 2008, 07:16:53 pm
by SMFHacks
1 Replies
6560 Views
Last post March 09, 2009, 07:18:38 pm
by SMFHacks
1 Replies
5429 Views
Last post August 01, 2009, 12:57:20 pm
by SMFHacks
7 Replies
8002 Views
Last post February 03, 2016, 07:52:47 pm
by SMFHacks

+- Recent Topics

Registration - anti bot pattern matching by SMFHacks
November 01, 2026, 07:20:17 pm

EZPortal 8 by davejo
October 21, 2026, 01:01:54 pm

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as &#39; in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

Powered by EzPortal