View Full Version : upload_max_filesize solutions
chopficaro
11-06-2010, 04:30 AM
im trying to make an art gallery site for my sister with free hosting, i need upload_max_filesize to be at least 3m
ive tried many free hosting services and they are all 1.5m
ive tried what these guys say
http://www.openg.info/entry/php-cpanel-change-upload-max-filesize-cpanel-access-php-ini
which is put this in htdocs:
.htaccess
#Enables mod_rewrite, otherwise all Rewrite directives below will not work
RewriteEngine on
#Activates php.ini config located in main folder to work also recursively for all subfolders, obviously replace your_cpanel_user with your full path, you find it in cPanel home page on the left it's called 'Home Directory'
suPHP_ConfigPath /home/vol2/20x.cc/20x_6657899/public_html
php.ini
upload_max_filesize = 3M
post_max_size 8M
memory_limit 128M
max_input_time -1
which just gives me a 404
and ive tried running this, and it gives me the same old 1.5m every time
index.php
<?php
phpinfo();
ini_set("upload_max_filesize", "3M"); // Think that's right...
phpinfo();
?>
If the host has configured their servers to limit the filesize for uploads, there is nothing you can do about it (at least, not legitimately).
You need to find a different host that allows larger uploads. You may have to pay for one.
james438
11-06-2010, 05:45 AM
I'm no expert, but I increased my upload limits by altering the php.ini settings.
upload_max_filesize=500M
post_max_size=501M
this sets the maximum file size to half a GB. my ini file is named php5.ini. Not php.ini. not sure why though.
what version of php are you using, what does the script look like that you are uploading, and what does the 404 message read? For example if you are using POST commands in your script you will need to increase the post_max_size to 3M.
max_input_time needs to be enabled if you are using a version of php prior to 5.2.1.
I have an increased upload size and I use GoDaddy hosting.
You can read more about php.ini settings here:
http://www.php.net/manual/en/ini.core.php
and
http://www.php.net/manual/en/ini.list.php
I like the second one as it lists the default values. The first one is more of an explanation of what the different settings do.
chopficaro
11-06-2010, 06:33 AM
i dont think the folder public_html exists actually
james438
11-06-2010, 06:51 AM
"public_html" is an example. If you create the folder with that name then it will exist. I am not familiar with the directive: user_dir, but I rather doubt it is relevant to what you are trying to do.
The example you are referencing is from http://www.php.net/manual/en/ini.core.php.
Many of the settings listed are probably not listed in your php.ini file. When these settings are not listed then the default values are used.
Are you using free hosting? Free hosting usually has a number of limits to what you can do with it. Generally you pay for what you get. ...generally.
bluewalrus
11-06-2010, 03:59 PM
You can't and shouldn't overwrite a setting that is not allowed. If as you say "they are all 1.5m" then that is what you must work with. If you do find a hack to get the setting up you will more than likely lose your whole account for violating the TOS when it is found by the host.
chopficaro
11-06-2010, 06:18 PM
thats fine i have backups of everything, if they do that ill just try to find another hosting service
it wont even be noticeable my sister has like 100 pieces of art she wants to show, and it will grow gradually, ill use jpegs to save space
thanks i have something to work with now, i just have to figure out the directory thing
thats fine i have backups of everything, if they do that ill just try to find another hosting service
it wont even be noticeable my sister has like 100 pieces of art she wants to show, and it will grow gradually, ill use jpegs to save space
thanks i have something to work with now, i just have to figure out the directory thing
No, it's not "fine."
You're completely missing bluewalrus' point, which is, IF you do manage to find a way around your host's restrictions, you will be violating their Terms of Service. You will be stealing from them.
Check with your host. If they're not willing to let you change the limit, then you should find a new host. You should not just "try" something that you know might be breaking their rules.
djr33
11-06-2010, 10:51 PM
Additionally, as a forum policy, we don't help with questions that violate terms of service agreements or other illegal requests.
chopficaro
11-07-2010, 12:40 AM
lol ok sorry dont want to get u guys in trouble
Beverleyh
11-07-2010, 12:40 PM
Violating your terms through lack of responsibility isn't something to laugh about.
For your last comment to have any kind of credibility, it really should have been phrased "ok, sorry, I don't want to get myself in trouble"
Back to your problem though, 1.5MB is surely ample for each piece of art you upload for your sister.
If you save a jpeg at the web standard 72dpi, even at a high quality (about 80-90% optimisation) they should still fall well below this threshold - 300-500kb tops. For example, here's a piece of my own artwork which is only 107kb
http://www.jemcon.org/images/2009/2009-boxart.jpg
james438
11-07-2010, 02:19 PM
I am upset that this guy is trying to hack his hosting service, knows it is illegal, and does not even care. I was not aware that this is what he was trying to do. I do hope he gets reported.
well, hopefully, he hasn't done it yet and will decide not to. :: thumbs up ::
Can we have a moderator lock this thread? Thanks!
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.