Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: upload_max_filesize solutions

  1. #1
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default upload_max_filesize solutions

    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-cpan...access-php-ini

    which is put this in htdocs:

    .htaccess
    Code:
    #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
    Code:
    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
    Code:
    <?php
    phpinfo();
    ini_set("upload_max_filesize", "3M"); // Think that's right...
    phpinfo();
    ?>

  2. #2
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    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.

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I'm no expert, but I increased my upload limits by altering the php.ini settings.

    Code:
    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.
    To choose the lesser of two evils is still to choose evil. My personal site

  4. #4
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i dont think the folder public_html exists actually

  5. #5
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    "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.
    To choose the lesser of two evils is still to choose evil. My personal site

  6. #6
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    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.
    Corrections to my coding/thoughts welcome.

  7. #7
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  8. #8
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by chopficaro View Post
    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.

  9. #9
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Additionally, as a forum policy, we don't help with questions that violate terms of service agreements or other illegal requests.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  10. #10
    Join Date
    Dec 2009
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    lol ok sorry dont want to get u guys in trouble

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •