Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 20, 2013, 09:53:03 am

Login with username, password and session length
Members
Total Members: 10761
Latest: Feingewinde
Stats
Total Posts: 32357
Total Topics: 5476
Online Today: 54
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 0
Guests: 32
Total: 32
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Increasing Upload Limits PHP  (Read 7009 times)
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10989


View Profile
« on: May 03, 2009, 09:45:19 am »

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:
<?php
phpinfo
();
?>

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:
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 » Logged
baboontester
Inline PM Customer
*****
Offline Offline

Posts: 5


View Profile
« Reply #1 on: September 04, 2009, 10:36:19 pm »

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?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10989


View Profile
« Reply #2 on: September 05, 2009, 08:03:33 am »

I would try contacting your host for support
Logged
baboontester
Inline PM Customer
*****
Offline Offline

Posts: 5


View Profile
« Reply #3 on: September 06, 2009, 05:00:05 pm »

tried that too, they wont up crap.

They dont seem to get what I'm saying I guess.  Stupid Host Monster.
Logged
tiger4020
Inline PM Customer
*****
Offline Offline

Posts: 1


View Profile
« Reply #4 on: May 02, 2010, 05:49:28 pm »

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
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10989


View Profile
« Reply #5 on: May 02, 2010, 07:34:08 pm »

Try the root directory of your site.

On windows i put in c:\windows
Logged
Scooter
Inline PM Customer
*****
Offline Offline

Posts: 2


View Profile
« Reply #6 on: December 28, 2010, 03:44:11 pm »

This was helpful. Thanks.
Logged
thefley
Inline PM Customer
*****
Offline Offline

Posts: 35


View Profile
« Reply #7 on: May 29, 2011, 09:49:17 pm »

updated

never mind I answered my own questions just by asking it. 
« Last Edit: May 29, 2011, 10:03:38 pm by thefley » Logged
StatFreak
Inline PM Customer
*****
Offline Offline

Posts: 1


View Profile
« Reply #8 on: August 21, 2011, 06:51:05 pm »

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.
Logged
dexter
Inline PM Customer
*****
Offline Offline

Posts: 1


View Profile
« Reply #9 on: December 26, 2011, 10:39:08 am »

hello,
First of all nice work on the software Smiley

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

Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10989


View Profile
« Reply #10 on: December 26, 2011, 02:27:36 pm »

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.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[May 19, 2013, 11:13:02 pm]

[May 19, 2013, 10:01:19 pm]

[May 19, 2013, 08:18:27 pm]

[May 19, 2013, 07:03:27 am]

[May 16, 2013, 10:13:46 pm]

[May 15, 2013, 11:32:14 pm]

[May 15, 2013, 11:31:24 pm]

[May 12, 2013, 09:10:43 am]

[May 10, 2013, 03:49:55 am]

[May 07, 2013, 07:12:40 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 2.374 seconds with 19 queries.