• skipc

    (@skipc)


    in write post > add image > browse to image on local disk > upload > returns error message:

    Fatal error: Call to undefined function: wp_constrain_dimensions() in /home/username/public_html/wp-admin/includes/image.php

    error is allegedly in line 173 WP_constrain_dimensions, to wit:

    function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) { return wp_constrain_dimensions( $width, $height, $wmax, $hmax );

    my typical image is 600px x 429px. TIA best…skip

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter skipc

    (@skipc)

    could this be a mac os x flash uploader, apache server problem?

    gurumosh

    (@gurumosh)

    I got exactly the same problem!

    mannj24

    (@mannj24)

    I have the same issue here- on a PC- using latest version of FF
    the only thing unusual is this blog is on an addon-domain – but everything else seems to work ok


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

    mannj24

    (@mannj24)

    I think I (maybe we) upgraded wrong ?
    I copied the wp-admin and the wp-includes over and it didn’t work-

    I just ran a new install and it did- so some file NOT in the wp-admin and the wp-includes might need to be added ?

    (I backed up… and I saved my wp-config of course) The fresh install works for me–

    natoriousfat

    (@natoriousfat)

    I am having a similar problem…

    http://wordpress.org/support/topic/164875

    mchwen

    (@mchwen)

    I’ve the same problem.

    But when I checked using my FTP, the file is actually uploaded into the correct destination folder.

    jonathanmurray

    (@jonathanmurray)

    Same error, after deactivating flash uploads via the plugin offered on Trac. The Flash uploader was failing with http error.

    As with mchwen, the file was uploaded, in spite of the error.

    I can find no evidence of a function called “wp_constrain_dimensions” in the 2.5 release code, although it looks like it should have been moved from image.php to media.php in the r7030 patch (according to Trac)

    http://trac.wordpress.org/attachment/ticket/6005/image-resize-r7030.patch

    I think I’ll poke it back in and see what happens.

    Thread Starter skipc

    (@skipc)

    i have kept up with all the post on the forums, including the sticky on the troubleshooting forum. none of the suggestions have worked. after creating the suggested .htacces file the upload error message has changed to:

    Unable to create directory /home/mysite/public_html/wp-content/uploads/2008/04. Is its parent directory writable by the server?

    i’m on an Apache Server 1.3.41 (Unix) This was a clean install of WP 2.5 with a new DB.

    hairudy

    (@hairudy)

    i got that the same problem…

    An error occurred in the upload. Please try again later.

    Samsara

    (@samsara)

    happening with me too trying to post w/ image. πŸ™
    i did the upgrade to 2.5 as suggested.
    when i go to *media* i get a similar error as well.

    Samsara

    (@samsara)

    Here are three related errors [I think] regarding uploading images in WP 2.5.

    Click “Media Library”…
    Fatal error: Call to undefined function image_downsize() in /home/me/domains/mydomain.com/public_html/wp-includes/post.php on line 2326

    Trying to upload an image…
    Fatal error: Call to undefined function wp_constrain_dimensions() in /home/me/domains/mydomain.com/public_html/wp-admin/includes/image.php on line 173

    When I choose *Gallery*…
    Fatal error: Call to undefined function image_downsize() in /home/me/domains/mydomain.com/public_html/wp-includes/post.php on line 2326

    I repeated the update and followed the instructions again explicitly. I tried using Firefox. Nothing has been successful.

    Samsara

    (@samsara)

    After a refreshing nap and coming back at it…I remembered that I’d used *Installatron* to initially install WordPress. [Not so with updating to 2.5]

    So…I went into my DirectAdmin and found my Installatron and went to *Scripts installed* and sure enough, there was my WordPress with an emboldened 2.5 under the Update heading. So I clicked it.

    All is now well.

    Hope this is truns out to be a fix for someone else as well.

    thomasw1

    (@thomasw1)

    Fatal error on image upload attempt.
    I also get a fatal error when I try to access the media library.

    My web host – bluehost.com – suggested a work around and it works.
    I access my Legacy File Manager and create an ‘images’ folder. Then upload my images into that folder. I can the use the URL field in the wp image upload window. The URL field is cAsE sensitive but putting in the exact URL (http://yourdomain/images/exact name of image) of the image gets the job done.
    I’m set until someone who knows a lot more than I do provides a fix.

    Best Wishes
    thomasw1

    raiteria

    (@raiteria)

    Its definately from a corrupted upgrade.
    Check the files in the root level, this will fix it. Not sure which “include” or “require” fixed the problem, but it goes away if you copy over everything at the top level, just be sure not to overwrite the config file.

    its quite simple really.. just replace all the files in your root with the new ones except for for the wp-config.php sorts it out straight away. I think they just left this out of the instructions.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘2.5 fatal error: on image upload’ is closed to new replies.