• Resolved WhitG

    (@whitg)


    My apologies for adding yet another support request of this type, but I’m an extremely seasoned web designer/developer and I’ve already tried everything I could find on this issue. As with many others, my problem is that I can’t upload any images, I keep getting this:
    “An error occurred in the upload. Please try again later.”

    It should be noted that it is actually uploading the images in question – I see them in FTP every time – it just doesn’t seem to be able to register them in the Media Library. Here’s what I’ve tried/looked at:

    – Reverted to the Twenty Sixteen theme.

    – Disabled all plugins.

    – Reinstalled WP both via the Dashboard button and by re-uploading through FTP.

    – Re-exported the images (note that they’re not large – again, I’m a professional designer) from Photoshop and used new, unique names.

    – Futzed with folder permissions, making ‘2016’ and ‘5’ (this month) set to 775 (World can’t write, but everything else allowed).

    – Tried two different “add from server” type plugins, both claimed to be adding the uploaded images, but neither actually did so.

    Note that this site is running on my VPS, on which MANY other WP sites are installed and working just fine. However, one possible issue is the fact that this site doesn’t yet have its real domain name – it’s using an IP address + username:
    https://96.127.170.113/~greycourt

    The site was installed with that in mind, the above is reflected in the General Settings and everything else is functioning correctly, so I’m a bit skeptical that’s the problem, but I don’t have any other ideas right now. Anybody have any idea what I could look at next?

    Thanks!

Viewing 15 replies - 1 through 15 (of 31 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    when you check the uploads directory and you see main-image.jpg, do you also see main-img-something-something.jpg for the other image sizes? The thing could be failing when WP uses gd or imagemagick to create the thumbnails.

    Thread Starter WhitG

    (@whitg)

    Nope. It doesn’t generate the extras. But even if you’re right, why would that be failing? Like I said, it’s a fresh install. Could it be a PHP version problem? I’m having trouble finding the current PHP version in cPanel.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It could be that or a problem with gd and/or imagemagick or just some issue where memory is right on the edge

    Clear any cache that’s on the server, too, especially if you’re using varnish or memcached.

    Thread Starter WhitG

    (@whitg)

    Looks like the default and only version of PHP that I can use according to the WHM options is 5.

    The memory used was 1.87 MB (of 2 MB max), so I rebooted and now it’s hovering around 1.4 MB. But unfortunately, the result is the same. :/

    Thread Starter WhitG

    (@whitg)

    Oh, and I’m not seeing any cache that I can clear, I’m not familiar with either of those tools. There are definitely no WP caching plugins active.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    sorry, the “http error” is the hardest to debug. I don’t run servers with control panels so I can’t really tell you how to do much sysadminning through it.

    You might peruse /var/log/messages and/or /var/log/syslog to see if anything jumps out at you.

    Thread Starter WhitG

    (@whitg)

    Damn, no dice. /var doesn’t have log files in it, and the Gzipped log files in /logs don’t say anything from today. :[

    Borge

    (@joeborge0914)

    Try using 5.4 or higher PHP and check as well Settings> media
    upload path is wp-content/uploads. please omit any path prior to that if any like “home/user/pulic_html”

    Thread Starter WhitG

    (@whitg)

    Just got a response back from hosting support, my PHP version is 5.4.45.

    Settings:Media doesn’t offer me an ability to dictate the media path, although that does sound familiar. Maybe WP elected to remove that option?

    You can create a info.php in the blog’s directory with the following:

    <?php
    phpinfo();
    ?>

    Then execute that. It will tell you what PHP version it is and if GD and Imagick are enabled – they will be their own sections. Look for GD Support or imagick You can also find the values for log_errors (make sure it is on) and error_log to see where PHP errors are logged.

    If this were an Apache error, then that would be logged in cPanel’s error log.

    I haven’t seen the issue myself so I’ve never had to troubleshoot it.

    I have seen this on several web sites and was able to fix this issue by disabling one specific plugin that was causing errors in the admin panel. I would like to note that the plugin itself has nothing to do with media, uploading or ajax.

    I believe that this might be an ajax error. It is likely caused by any plugin that is not loading properly. Look for potential error messages from other plugins.

    You may find a clue by going into developer tools, clicking on the network panel, selecting XHR reloading the upload.php page and uploading. Click on the last call to async-upload.php. The result should say something that starts like this: {“success”:true,”data”:

    This can also be used to determine the source of the modal media window upload.php not displaying any images. An obscure bug in a plugin that doesn’t throw errors can break the ajax media library.

    Thread Starter WhitG

    (@whitg)

    Wow, I feel stupid – I totally forgot about the error log for WP itself, which contains lots of these:

    [25-May-2016 15:49:04 America/New_York] PHP Fatal error: require(): Failed opening required ‘/home/greycourt/public_html/wp-includes/load.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/greycourt/public_html/wp-settings.php on line 21

    That said, I’m still not sure this is a clue. For one thing, this latest error was hours ago, and for another, I can’t get it to add any further errors here when I try/fail to upload images to the WML.

    Adrian, I appreciate the feedback, but as I said, I’ve tried this with a fresh install, 2016 theme, no active plugins and it still happens. I did see someone in another thread claim that plugins can still cause this problem if they’re inactive, but I’m skeptical of that. In any case, once I have more time I’ll try your dev tools trick to see if that helps.

    Lastly, I got this from the server admins…
    “Your VPS is running PHP 5.4.45, gd is installed by default but Imagemagick is not, I’d be happy to install this for you if you’d like.”

    Is Imagemagick critical? I can’t imagine why a critical component wouldn’t be running – again, there are dozens of WP installs on this server.

    Sure, good luck!

    It’s possible that the fatal error is the problem if it’s happening in the admin functions.

    I believe that inactive plugins can cause problems. It can’t hurt to disable everything and ftp in and copy them to another directory just to find out. Like I said, I just resolved this same issue an hour ago and the issue with the blank modal media page last week. Both were caused by weird little errors.

    I don’t understand the imagemagick issue at all.

    Thread Starter WhitG

    (@whitg)

    Okay, getting back to this…

    – Installing Imagemagick didn’t help.

    – Disabling the plugins folder didn’t help.

    – The Inspector’s Network panel isn’t my usual territory, but when I get details for the async-upload.php line item, I’m not seeing a ‘result’ parameter anywhere, either in Safari or Firefox. ?

    Not sure where to go from here. Support continues to try to help, but they’re not finding anything in the logs. :/

    Oh, I’m so sorry…My bad. It’s Response, not “result”. While the XHR tab is open, you should upload a file. On the tab, you should see a list of files as the process takes place. Once you get the error, you can click on the last file, async-upload.php. Another window should open up next to the file name with several tabs, one of which is “Response”. Click on that. If it doesn’t say success, you may find a clue somewhere there.

    Otherwise, you should see several instances of admin-ajax.php which executes every 60 seconds or so. You might find a clue there too, since it appears to load everything admin related and might indicate where a problem is.

Viewing 15 replies - 1 through 15 (of 31 total)
  • The topic ‘The king of all "error occurred in the upload" glitches…’ is closed to new replies.