• Resolved bradbpw

    (@bradbpw)


    I am attempting to upload a few PDF files that are over 1mb (1.25mb and 6.3mb) and I get the “HTTP Error” warning. I have been able to upload several files that are less than 1mb.

    My max upload size is set to 250mb in my php settings

    Any idea how to fix this?

Viewing 15 replies - 1 through 15 (of 32 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    I would ask your hosting company about that. I know on mine it read a max of 128mb and my PHP setting said otherwise. Sent my host an email and they fixed the issue. ??

    Thread Starter bradbpw

    (@bradbpw)

    I am self-hosting.

    When you go to your Dashboard > Media > Add New, the “Upload New Media” dialog opens. At the bottom, left corner of that page (for both the multi-file uploader and the browser uploader options) you will see this indicator:

    Maximum upload file size: 2MB

    2MB being a php default setting. What does your say?

    [edit] Maybe we can fast forward a bit as well..

    a) Windows, OS X or Linux host?

    b) IIS, Apache, or Nginx?

    c) Or something else entirely, such as a pre-configured XAMPP, WampServer, MAMP, etc..

    d) What is the http error code?

    Thread Starter bradbpw

    (@bradbpw)

    My maximum upload size on that page is 250mb

    a) Windows, OS X or Linux host?
    Linux host

    b) IIS, Apache, or Nginx?
    Apache

    d) What is the http error code?
    There is no code, it just says “HTTP Error”

    Probably this is something to do with PHP Settings on php.ini file. Usually located in /etc/Apache2/php.

    Change the upload_max_filesize property to bigger size:
    upload_max_filesize = 100M;

    Restart the service
    `/etc/init.d/apache restart’

    hope it helps

    You’ll need to change the max. upload size settings in your php.ini file. That’s what controls the upper limit for uploads (as well as alot of other resources and uses).

    Thread Starter bradbpw

    (@bradbpw)

    My max upload size is already at 250mb

    etc/php5/apache2/php.ini

    ; Maximum allowed size for uploaded files.
    ; https://php.net/upload-max-filesize
    upload_max_filesize = 250 mb

    That’s not the only value that you need to change: https://stackoverflow.com/questions/3263480/upload-max-size-in-php

    You should also set post_max_size and possibly max_input_time if you’re getting time out errors.

    Thread Starter bradbpw

    (@bradbpw)

    Those should be good too

    ; Maximum size of POST data that PHP will accept.
    ; https://php.net/post-max-size
    post_max_size = 250mb

    ; Maximum amount of time each script may spend parsing request data. It’s a good
    ; idea to limit this time on productions servers in order to eliminate unexpectedly
    ; long running scripts.
    ; Note: This directive is hardcoded to -1 for the CLI SAPI
    ; Default Value: -1 (Unlimited)
    ; Development Value: 60 (60 seconds)
    ; Production Value: 60 (60 seconds)
    ; https://php.net/max-input-time
    max_input_time = 60

    That’s all that I’ve seen that sets those values. Depending on the file size the time out still might be an issue, but it’s hard to say.

    my last suggestion is that ther could be some other php.ini file or setting somewhere that’s blocking that. If you add a phpinfo() file to your site you’ll be able to see what the settings are on the actual site.

    The error that you’re getting doesn’t suggest much at all, so you should look through the access and error logs on your server to see what the actual error is. That will no doubt help you to see what’s really going wrong rather then having that sort of generic error message.

    If all that fails, I’d suggest that you contact a knowledgeable server administrator for help.

    Thread Starter bradbpw

    (@bradbpw)

    Here is my phpinfo page. I don’t see anything that would be causing it, but I’m not an expert

    https://ap.bpwgroup.com/phpinfo.php

    I’m no expert at this either, but I can see one setting that looks suspocious:

    apc.max_file_size 1M

    The max_file_size bit made it stand out, and seeing as how it’s set to 1M, that would explain why you can’t upload files over 1MB. Might not be it, but that’s the only thing that I can see either.

    Thread Starter bradbpw

    (@bradbpw)

    I’m having some trouble finding this setting in my php.ini file or finding a separate file that contains apc.max_file_size. I don’t have a apc.info, apc.ini, file or an apc section in my php.ini file. Is there a way to tell where my phpinfo() is pulling those settings from?

    Thanks for the help so far. I’m hopefully optimistic that this is my issue!

    Not that I know of. Like I said, I only know the basics of server admin, and I don’t know about wthe APC side of things. But… You might want to have a look at these and see if they can give you some idea:

    https://www.php.net/apc/
    https://www.php.net/manual/en/apc.configuration.php
    https://www.php.net/manual/en/configuration.changes.modes.php

    This is just a wild stab in the dark, but are you using nginx as a front end proxy for apache?

Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘Can't upload files over 1mb – HTTP Error’ is closed to new replies.