+ Reply to Thread
Results 1 to 10 of 10

Thread: Need To Change Default "upload_max_filesize" Limit

  1. #1
    Join Date
    Jan 2010
    Posts
    3

    Default Need To Change Default "upload_max_filesize" Limit

    I am a photographer, and run an online portfolio. My images are always reduced in size to not only save on bandwidth, but to also reduce image load times.

    My question is this: my albums come with background music tracks - some of the mp3 files I wish to upload are over 5MB, and some are between 2MB and 5MB. Basically, any mp3 file that comes in over 2MB does not play on my site, which is a deal breaker.

    This is the message I receive in my admin's back end:

    ****Alert:****
    Your server does not allow file uploads larger than 2 MB.
    Please contact your hosting company and request that the php setting 'upload_max_filesize' is increased to at least 5 MB.


    I checked my "ini.php" file and tried changing the 2MB to 7MB, and it doesn't solve my problem.

    I need to know how I can go about changing this limit to something that will allow working uploads of mp3's, and have it perform without error.

    Thanks.

    My site, if it helps, is:
    www.davidkerryhannan.com

    Thank you in advance.

  2. #2
    Join Date
    Jan 2007
    Posts
    137

    Default

    Change upload_max_filesize in php.ini to 32MB or, better, 64MB. Make sure you save your changes.
    Last edited by breakingball; 01-17-2010 at 09:43 AM.

  3. #3
    Join Date
    Jan 2010
    Posts
    3

    Default

    so I must type 32MB exactly, in that format? I read somewhere that MB must be converted to bytes.

    Please advise, and thank you for responding so quickly.

  4. #4
    Join Date
    Jan 2007
    Posts
    137

    Default

    The proper syntax is 'M' for megabytes. Here's mine...


  5. #5
    Join Date
    Jan 2010
    Posts
    3

    Default

    this didn't work.

    I just added a blog to my portfolio, and again, while trying to upload a 5MB image I get this:

    "DismissThis file is too big. The maximum upload size for your server is 2M."

    How is this possible when my upload_max_filesize in php.ini read as follows:

    upload_max_filesize = 64M

    Please help, this is driving me mad.

  6. #6
    Join Date
    Jan 2007
    Posts
    137

    Default

    Not sure I remember how this works at Bluehost, but php.ini variables aren't necessarily recursive. In other words, if you have multiple php.ini files for multiple directories or domains, you may have to change the max_file_size variable for any or all of them that may effect the directories that contain them.

    Also, if you have a WordPress blog, then you can add the following to your wp-config.php file and it will take precedence over the php.ini setting...

    Code:
    define('WP_MEMORY_LIMIT', '64M');
    Good luck!

  7. #7
    Join Date
    Apr 2010
    Posts
    1

    Default

    other threads indicate bluehost doesn't allow overriding the upload_max_filesize, so you're stuck at 2m

    I'm not a fan of godaddy but they are progressive enough to at least allow for 8m on their shared hosting

  8. #8
    Join Date
    Jun 2009
    Location
    in your computer, messin with your stuff.
    Posts
    249

    Default

    Quote Originally Posted by techiediy View Post
    other threads indicate bluehost doesn't allow overriding the upload_max_filesize, so you're stuck at 2m
    techiediy is 100% wrong. You can raise it above 2M. If you don't feel you have the capacity to do so from the instructions provided here, contact support for further direction.

    1. Login to cPanel.
    2. Click on PHP Config from the Software / Services section.
    3. Select PHP5 (Single PHP.INI).
    4. Click Save Changes.
    5. On this same screen, select IONCube, and click 'Install PHP.INI Master File'.
    6. Go back to the cPanel.
    7. Click on 'File Manager' from the Files section.
    8. Select Webroot and click go.
    9. Find php.ini.default and rename it to: php.ini
    10. Select the php.ini file and click 'Code Edit'.
    11. Click 'Edit' in the lower right hand corner.
    12. Find the line that says 'upload_max_filesize'.
    13. Change that to:
    upload_max_filesize = 32M
    14. Find the line that says 'post_max_size'.
    15. Change that to:
    post_max_size = 32M
    16. Click 'Save Changes' (upper right hand corner).

    The above directions WILL work. If they aren't you may have some low level .htaccess issues preventing the script from inheriting the apache handler from public_html/.htaccess. Open a ticket if you still can't get it to work.

  9. #9
    Join Date
    Apr 2007
    Location
    Utah
    Posts
    17

    Default

    Just to be efficient change your max_post as well. 64M should be fine.
    And you can change your memory_limit while your at it to 128M.
    Solves alot of problems if your a plugin fiend.
    Glad I could Assit!
    Jim C.
    BlueHost Roxors

    PS, Why is my cubicle not a square?

  10. #10
    Join Date
    Aug 2008
    Location
    Vancouver, WA
    Posts
    27

    Default

    Quote Originally Posted by EricJ View Post
    techiediy is 100% wrong. You can raise it above 2M. If you don't feel you have the capacity to do so from the instructions provided here, contact support for further direction.

    1. Login to cPanel.
    2. Click on PHP Config from the Software / Services section.
    3. Select PHP5 (Single PHP.INI).
    4. Click Save Changes.
    5. On this same screen, select IONCube, and click 'Install PHP.INI Master File'.
    6. Go back to the cPanel.
    7. Click on 'File Manager' from the Files section.
    8. Select Webroot and click go.
    9. Find php.ini.default and rename it to: php.ini
    10. Select the php.ini file and click 'Code Edit'.
    11. Click 'Edit' in the lower right hand corner.
    12. Find the line that says 'upload_max_filesize'.
    13. Change that to:
    upload_max_filesize = 32M
    14. Find the line that says 'post_max_size'.
    15. Change that to:
    post_max_size = 32M
    16. Click 'Save Changes' (upper right hand corner).

    The above directions WILL work. If they aren't you may have some low level .htaccess issues preventing the script from inheriting the apache handler from public_html/.htaccess. Open a ticket if you still can't get it to work.
    Thanks for this, but need one change

    item 10 should read

    "10. Select the php.ini file and click 'Edit'."

    code edit doesn't work with the ini file correctly
    Available for Hosting assistance and Web site code, see info at http://www.webspinr.com

+ Reply to Thread

Posting Permissions

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