upload_max_filesize change

Discussion regarding Joomla! 1.5 Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security and Performance FAQs
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
criz2fer
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Nov 15, 2009 2:34 pm

upload_max_filesize change

Post by criz2fer » Sat Nov 21, 2009 2:14 pm

is there anyone who could help me change the upload_max_filesize into 2M? :(

i don't know which file is to be configured..and where/what folder to locate..


thanks...

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: upload_max_filesize change

Post by dhuelsmann » Sat Nov 21, 2009 2:57 pm

It's set up on the host you're using, controlled directly by a PHP setting called upload_max_size, and a few associated ones: post_max_size, max_execution_time and memory_limit. This is often set at '2M' by default in shared hosting environments.

Being able to set it any higher really depends on how your site's host handles the situation. Oftentimes, they'll allow you to add a .htaccess file to your site's root directory to change the value, i.e.

Try placing these in .htaccess, setting the value to what you want.

Code: Select all

php_value post_max_size "8M"
php_value upload_max_filesize "3M"
or will allow you to make the same kind of override in a php.ini file somewhere in your installation. In some cases, the host won't provide you that option directly, for one reason or another, and you'd need to appeal to support to set these values.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

User avatar
TwinDaddy
Joomla! Explorer
Joomla! Explorer
Posts: 319
Joined: Sun Feb 19, 2006 2:24 pm
Location: Belgium
Contact:

Re: upload_max_filesize change

Post by TwinDaddy » Sat Nov 21, 2009 3:10 pm

Go to configuration -> system. There you can change the file size.

Or in your .htaccess file you put

Code: Select all

php_value upload_max_filesize 20m
Where 20m can be what you want (MB)
Hans "TwinDaddy"
http://www.dekookbijbel.be (Dutch)
http://www.kleuterdigitaal.be (Dutch)
Moderator on JoomlaCommunity.eu (Dutch)

criz2fer
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Nov 15, 2009 2:34 pm

Re: upload_max_filesize change

Post by criz2fer » Sat Nov 21, 2009 4:09 pm

I guess configuring .htaccess file really is the solution.. but I don't see this anywhere in the root.. what I see is the htaccess.txt instead..

Does this have anything to do with the hosting?
Is there any other remedy...

by the way, Dhuelsmann & TwinDaddy
thanks guys..
I hope I could sort this out with your help..

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: upload_max_filesize change

Post by dhuelsmann » Sat Nov 21, 2009 4:50 pm

rename htaccess.txt to .htaccess (note the leading period). Place the statements provided in the earlier messages at the top of the .htaccess file.
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

criz2fer
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Nov 15, 2009 2:34 pm

Re: upload_max_filesize change

Post by criz2fer » Sat Nov 21, 2009 5:47 pm

I've renamed it and placed php_value upload_max_filesize 20m now into .htaccess but still i get this error everytime i upload a component zip 1,641 KB size or a template 1,865 KB:
"There was an error uploading this file to the server"

the current PHP Core Configuration seen at the backend is
upload_max_filesize 1M


here are the contents of the .htaccess file:

php_value upload_max_filesize 20m
##
# @version $Id: htaccess.txt 13415 2009-11-03 15:53:25Z ian $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section


is there anyway I could fix this error?
thanks...

User avatar
dhuelsmann
Joomla! Master
Joomla! Master
Posts: 19659
Joined: Sun Oct 02, 2005 12:50 am
Location: Omaha, NE
Contact:

Re: upload_max_filesize change

Post by dhuelsmann » Sat Nov 21, 2009 6:10 pm

Your format is not correct in .htaccess.
Use this

Code: Select all

php_value post_max_size "8M"
php_value upload_max_filesize "3M"
Regards, Dave
Past Treasurer Open Source Matters, Inc.
Past Global Moderator
http://www.kiwaniswest.org

criz2fer
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Nov 15, 2009 2:34 pm

Re: upload_max_filesize change

Post by criz2fer » Sun Nov 22, 2009 1:47 pm

I've done my best pals, but still nothing happened..


thanks for the help guys..

vcpanel
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Nov 24, 2009 6:03 pm

Re: upload_max_filesize change

Post by vcpanel » Tue Nov 24, 2009 6:22 pm

Hello,

You can copy the server php.ini to your document root and edit it and change the value as you wish.
Or you can simply upload a modified php.ini

wpattie
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jan 23, 2008 10:56 pm

Re: upload_max_filesize change

Post by wpattie » Sat Dec 12, 2009 5:45 am

This suggestion by dhuelsman did it for me - many thanks.

Try placing these in .htaccess, setting the value to what you want.
Code:
php_value post_max_size "8M"
php_value upload_max_filesize "3M"

webhostuk
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 195
Joined: Thu Aug 27, 2009 3:05 am
Location: UK
Contact:

Re: upload_max_filesize change

Post by webhostuk » Sat Dec 12, 2009 10:09 am

When .htaccess rules dont help you will have to upload the server php.ini or create a php.ini file under your public_html folder and add those rules in php.ini file 100% it should work fine.
https://www.webhostuk.Co.uk/joomla-hosting.html | Best UK Joomla Hosting!
http://www.webhost.US.Com | Best US Joomla Hosting
One click auto installer for Joomla

User avatar
TOpSEssIOn
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Thu Jun 10, 2010 8:04 am
Contact:

Re: upload_max_filesize change

Post by TOpSEssIOn » Thu Jun 10, 2010 8:59 am

well i have the same exactly issue my webhost godaddy linux sharing plan and i been through many posts and google it for 2days and did all the previous steps... i had no php.ini and i create php5.ini with modified values and now my back end reflect the modified values and even the phpinfo show the modified values in the local and the master everything going very well except >:( >:( in the real life if i upload file larger than 8Mb it gives error like the very start and if less than 8Mb it success like nothing at all happened ... hope anyone can help help me really cause this issue hang all of my work

User avatar
thoman
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Jan 02, 2006 3:07 pm
Location: KayBee
Contact:

Re: upload_max_filesize change

Post by thoman » Wed Feb 27, 2013 2:11 pm

My Hosting provider has put the .htacces file on the /public_html
the file
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName xxxxxxx.com
AuthUserFile /home/xxxxxxx/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/xxxxxx/public_html/_vti_pvt/service.grp

When i delete this file and use joomla supplied file htaccess.txt and rename to .htaccess i got internal server error.

i need more than 2M file upload to install a component.
Everyday is a good Day

webinspired
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sun Apr 04, 2010 1:05 pm

Re: upload_max_filesize change

Post by webinspired » Fri Jun 13, 2014 6:22 am

To anyone still stuck with shared hosting setting limitations (where changing php.ini settings can only be requested thru the provider), both Joomla 2.5 and 3 has the feature to install extensions from URL or from directory.

For me, uploading the component installer thru FTP to my public_html/tmp/ folder and entering that path in the URL and/or directory (whichever works).

Examples:
(by directory path) /home/root/public_html/tmp/yourcomponent.zip

or relatively

(by URL) http://www.yourwebsite/tmp/yourcomponent.zip

Worked for me, without having to hassle you webhosting provider on changing their settings globally that will affect all sites hosted on the same shared server.

Hope this helps.

User avatar
trichnosis
Joomla! Explorer
Joomla! Explorer
Posts: 315
Joined: Wed May 17, 2006 4:15 pm

Re: upload_max_filesize change

Post by trichnosis » Fri Jan 23, 2015 10:33 am

Hi;

Method # 1: Edit php.ini

Code: Select all

upload_max_filesize = 2M
Method #2: Edit .htaccess

Code: Select all

php_value upload_max_filesize 2M
suhosin
if your hosting has Suhosin , you will need to edit the following parameter too

Code: Select all

suhosin.memory_limit=2M


Locked

Return to “Performance - Joomla! 1.5”