• I know this issue has been around a lot, but I can’t find a solution to this specific scenario. I am setting up a new website and have tried a lot of “solutions” but have had no success.

    Scenario: New installation, When I try to upload jpg files (haven’t tried others), the file always uploads to the server, apparently correctly. However, if the file size is larger than a certain threshold, WP shows an HTTP error and will not show the file or a thumbnail in the media library. The threshold is somewhere between 528 kkb and 546 kb. Further, it will continue to show a thumbnail for a broken file.

    This appears to be an issue with WP and not with the server. In fact, I had a different WP (ver 3.x) site on this server in the past and never had this problem. Current version is latest, 4.9.1

    I’ve deleted all plugins, tried various edits to *.php files, switched themes (twenty seventeen and ascend) etc. but no progress.

    Any help would be appreciated. Being the good debugger that I am, please don’t assume anything has been done or has been done correctly.

    thanks,
    Cliff

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter cmb42

    (@cmb42)

    As I have said from the beginning, I am uploading still photos – jpg files. ” However, if the file size is larger than a certain threshold, WP shows an HTTP error and will not show the file or a thumbnail in the media library. The threshold is somewhere between 528 kkb and 546 kb. Further, it will continue to show a thumbnail for a broken file.”

    Thread Starter cmb42

    (@cmb42)

      SOLUTION FOUND:

    Create file called .user.ini (if it doesn’t already exist.)
    Add the following lines. The first cured my issue, the second may solve others(optional):

    memory_limit = 128M
    max_execution_time = 300

    You can adjust the number as needed.
    Place the file in the root dir for the website (same dir as wp_config.php).
    ————————————————

    Thanks to the help of tech support at my provider, we have found a solution. All of these issues and solutions apply to MY PARTICULAR INSTALLATION. They may or may not work for yours.

    In my situation, changing the memory in the wp_config.php file with the line define( 'WP_MEMORY_LIMIT', '256M' ); did not work. However, putting the similar line in the .user.ini file did fix my issues with loading files.

    The .user.ini file appears to have been installed with WordFence. It is possible that it is installed with other plugins as well, I don’t know. BUT, by adding it with the memory limit setting, the upload issue seems to be resolved for me.

    TO THE DEVELOPERS:
    Since this issue seems tied to plugins and so many other issues, can you investigate why putting the memory limit in .user.ini works when putting it in wp-config.php fails? I suspect that this is a big clue to the real underlying problem.

    Thanks to everyone that tried to help. I’ll leave it open for a while to see what others have to say.

    IF THIS HELPS YOUR SITUATION, PLEASE LEAVE A COMMENT!

    • This reply was modified 6 years, 11 months ago by cmb42.

    Hey,
    @alichani my video only have 125 mb

    Thread Starter cmb42

    (@cmb42)

    Can’t wait for edit of long answer to be approved. …..
    SOLUTION FOUND:

    Create file called .user.ini in root dir of wp installation (if it doesn’t already exist.)
    Add the following lines. The first cured my issue, the second may solve others(optional):

    memory_limit = 128M
    max_execution_time = 300

    @cmb42
    Glad you got this sorted. Thank you for posting the solution. So many people neglect to.

    @diogooliveirawp
    Can you open your own topic so this one can be closed? It doesn’t seem to be related anyway. Thank you

    This isn’t working for me. I have a GoDaddy website with multiple domains. I have one domain with WP installed and files smaller than 600k work fine, but larger ones fail. I get the generic HTTP Error, although the files are uploaded, and the 150×150 file is created. I get the broken file image, and you can’t really do much but delete it.

    I created a .user.ini in the root of the proper directory for the site, and looking at phpinfo, it shows 128M and 300 for the two variables as local, even though it doesn’t show that it’s read any ini files.

    Still at a loss. This is preventing me from updating my website. Uploading through FTP puts the file there, but it won’t show up in media. I have created the default-to-gd plugin and it doesn’t help either.

    At wits end at this point.

    Thread Starter cmb42

    (@cmb42)

    The issue usually seems to be about setting the memory size, but varies on where to set it. There’s wp-config.php, .user.ini, php.ini (if you are allowed access), etc. It may also be an issue of how large. You might try 256M instead of 128.

    Also, try contacting GoDaddy support for assistance. First, execute a failed upload, noting the time on the server, and ask them to look at the server’s php logs. Also, ask if they have any ideas or insight. They might ask for a wp admin account to test with, so set one up for them. (You can always delete it later.) They might find a solution, just as my provider was able to find the .user.ini file solution.

    I don’t know why the fixes vary so much from one environment to another, but keep trying until you find one that works.

    Beyond this, I’d suggest opening a new topic so that you get support specific to your problem.

    Thanks for the quick response… Should I see the setting in the “local” or “master” section of phpinfo? What I’m seeing is that I just made a change to the .user.ini, and immediately saw the change under “local” for phpinfo. I would think this should be the setting for my instance. The “master” hasn’t changed… I chose whacked out values for grins….

    max_execution_time 600 30
    max_file_uploads 20 20
    max_input_nesting_level 64 64
    max_input_time 60 60
    max_input_vars 1000 1000
    memory_limit 512M 64M

    Thread Starter cmb42

    (@cmb42)

    No idea. My knowledge level on this particular issue is limited. BUT, the 64 MB limit seems like it might be low. Try doubling that and see what happens.

    I had the same problem at site5.com
    I discovered that they had “php.ini” files in the web site’s root (public_html) directory that were being ignored – WordPress reported these file settings instead of what was happening.

    I removed “php.ini” and put in a “.user.ini” with:

    memory_limit = 256M
    max_execution_time = 300
    max_input_vars="2000";
    upload_max_filesize = 4M

    Site hasn’t run this well in ages.

    Hope it can help you too.

    • This reply was modified 6 years, 10 months ago by nohler.
Viewing 10 replies - 16 through 25 (of 25 total)
  • The topic ‘Upload HTTP error – File uploads, WP breaks’ is closed to new replies.