WordPress.org

Ready to get started?Download WordPress

Forums

Fatal Error when Uploading Pictures to Media Library in 2.5 (20 posts)

  1. rsutton1223
    Member
    Posted 6 years ago #

    I am trying to upload a series of 9 images to make a gallery in my post. This is the error I get on every image.

    Fatal error: Call to undefined function wp_constrain_dimensions() in /home/towingso/public_html/mtbtrailreview/blog/wp-admin/includes/image.php on line 173

    When I look in the file folder on the server...they are in there. When I go to the media library I see this...

    Fatal error: Call to undefined function wp_get_attachment_image() in /home/towingso/public_html/mtbtrailreview/blog/wp-includes/post-template.php on line 386

    Does anyone have any clue of what is happening?

  2. rsutton1223
    Member
    Posted 6 years ago #

    No one? I installed a gallery plug-in for a temporary fix...but I would like to get it resolved.

  3. Dion Hulse
    WordPress Dev
    Posted 6 years ago #

    wp_get_attachment_image() is defined in /wp-includes/media.php

    I'd suggest checking that all the files were uploaded correctly, so at least re-upload the file mentioned above.

  4. tsedgar
    Member
    Posted 6 years ago #

    I am getting the same error and can't upload images. I tried deleting and copying the file in the error and then tried deleting and copying the wp-includes again. I checked all plugins to make sure they were ok, did any upgrading where available but I am still getting the error. Would love to know if anyone found a fix other than copying files again.

  5. rsutton1223
    Member
    Posted 6 years ago #

    Any other suggestions?

  6. tsedgar
    Member
    Posted 6 years ago #

    I noticed that a file in wp-admin was mentioned in part of the error so I also deleted and re-copied wp-admin but I still get the same error. I have tried copying again a few times so that doesn't seem to be the fix in my case.

  7. leillo1975
    Member
    Posted 6 years ago #

    I have the same problem. When I upload an image, I'm select the file, but the form stops, and the image don't upload. It shows the message "Crunching" or the name of the file.

    This issue happens when I use Ubuntu with Mozilla 3 Beta 4 or Mozilla 2.0.0.13.

    If I'm use Windows with Mozilla 3 beta 4 this function works well, nothing wrong happens.....????

    Note: I'm from Spain...sorry, my English is very bad

  8. murk
    Member
    Posted 6 years ago #

    Same errors here. Can't get uploads to work with either Firefox or IE under WinXP. Started with WP 2.5. Earlier version worked fine. Is roll back an option?

    Cheers!

  9. barrydt
    Member
    Posted 6 years ago #

    Same here, same error. All four files that I've uploaded are in the uploads/2008/04 folder, but I can't reach them from the admin page, only from FTP. Any other ideas?

  10. barrydt
    Member
    Posted 6 years ago #

    I'm also getting the following error when I try and click on the 'Media Library' link (it shows I have 2 items in there):

    Fatal error: Call to undefined function: image_downsize() in /hsphere/local/home/XXXXXXXXXX/trowbridgefamily.net/WP/wp-includes/post.php on line 2326

    Any ideas?

  11. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Please try these suggestions:
    http://wordpress.org/support/topic/164999

  12. Mexxo
    Member
    Posted 6 years ago #

    I get the exact same errors and I have tried every suggestion in the sticky, the non flash uploader comes up with the same error but even faster.

  13. barrydt
    Member
    Posted 6 years ago #

    Same here as Mexxo - I tried the other fixes, but get the same errors as before.

  14. barrydt
    Member
    Posted 6 years ago #

    Is there an issue on the size of the file? I have 7 pictures in the directory now - 6 are around 650K each, and the other is only 82K. when I see the word 'downsize' in the function, it leads me to believe that maybe there is some sizing issue involved.

  15. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    barrydt: If you're getting "call to undefined function", then that has only one explanation: Your installation is missing files or has bad permissions on those files.

    See, you're getting this error: Call to undefined function: image_downsize(). The problem with that is that image_downsize() is not undefined. It exists. It's on line 55 of /wp-includes/media.php. So either your copy of that file on the server is missing, or it is non-readable for some reason.

    And the kicker is that there is no other explanation. There's no other way to get that error. So really, truly, look closer at that file. Better yet, reupload ALL the files from the original sources, like it says in step 1 of the sticky, because if you've got one bad file you may have more than one bad file.

    We're really, truly not just making this stuff up as we go along. When you say that you "tried the other fixes" and then say you have an error which we know that those fixes would have solved, then it gets us all a tad frustrated here.

  16. barrydt
    Member
    Posted 6 years ago #

    Thanks, Otto - I know you're not making things up as you go along, and I'm frustrated, too, as I had done all of the recommended fixes, including reinstalling everything, and it wasn't working.

    As a last resort, I wiped out the 2.5 zip file, then re-downloaded a new one, unzipped it, and did a new upgrade. Lo and behold, it worked this time! It looks like third time was the charm for me - I guess I just went one step further and started over from the VERY beginning, with a completely new zip file.

    Thanks for your help.

  17. Paulino Michelazzo
    Member
    Posted 6 years ago #

    Looking for this problem that I had the same here, I install a copy in my personal machine where the upload was working (but not in the hosting).

    I upload 3 times the wp-admin and wp-includes and nothing. Upgrade the flash and nothing, put the security .htaccess and nothing. A nightmare.

    But, looking the hosting I found an error.log file pointing some errors to wp-settings into root folder with a problem. Solution: I change this file with the new one and everything is ok now.

    I think that the 3 steps upgrade doc need to show cleary that you need to upgrade the wp-admin, wp-includes and the root folder also, excluding the configs files of course. Sometimes newbies users have problems to understand it.

    I hope to help.

    Thanks

  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    What wording would you suggest? It does say "Copy the new files to your server, overwriting old files in the root." Obviously, you need to copy over ALL the WordPress files. Including the root folder files. Seems pretty straightforward to me.

  19. tsedgar
    Member
    Posted 6 years ago #

    I agree that the instructions are straightforward. I just forgot to take care of the root files but once I did the problem was fixed. I had tried everything listed in the closed response but this did the trick. I hope this helps others. Just a stupid error on my part.

  20. lam.iffvn
    Member
    Posted 6 years ago #

    chmod 755 -R wordpress

Topic Closed

This topic has been closed to new replies.

About this Topic