WordPress.org

Ready to get started?Download WordPress

Forums

Crop-Thumbnails
[resolved] 500 Internal Server Error when Cropping after domain change! (11 posts)

  1. vasco.eduardo
    Member
    Posted 5 months ago #

    Hey there I am using the Plugin for a while and everything worked very good till today. But now I have a problem.

    I did a Domain change and for that I copied the whole Instalation to a new folder and did a DB copy to. After setting everything up the Site(Copy) is up again and working (nearly)perfect. If I want to crop a Thumbnail the image isn't saved correctly. I activated "JS-Debug" and "Daten-Debug" to see what the problem might be and my JS Console gives me this error:

    Post http://www.mydomain.de/wp-admin/admin-ajax.php 500 Internal Server Error

    Antwort-Header
    Cache-Control	no-cache, must-revalidate, max-age=0
    Connection	close
    Content-Length	0
    Content-Type	text/html; charset=UTF-8
    Date	Tue, 12 Nov 2013 23:57:06 GMT
    Expires	Wed, 11 Jan 1984 05:00:00 GMT
    Pragma	no-cache
    Server	Apache/2.2.16 (Debian) PHP/5.2.17 mod_ssl/2.2.16 OpenSSL/0.9.8o
    X-Powered-By	PHP/5.2.17
    X-Robots-Tag	noindex
    x-content-type-options	nosniff
    x-frame-options	SAMEORIGIN
    
    Anfrage-Header
    Accept	*/*
    Accept-Encoding	gzip, deflate
    Accept-Language	de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
    Content-Length	921
    Content-Type	application/x-www-form-urlencoded; charset=UTF-8
    Cookie	wordpress_4ddc84a6d8ad2e446cb8f80be165a8a7=administrator%7C1384463400%7C1878c413f7025a84553deead699d0416; __atuvc=68%7C46; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_4ddc84a6d8ad2e446cb8f80be165a8a7=administrator%7C1384463400%7C1b7d36024292e5e70fca1eaebc36d45f; wp-settings-1=editor%3Dhtml%26ed_size%3D955%26hidetb%3D1%26libraryContent%3Dbrowse%26align%3Dleft%26imgsize%3Dfull%26urlbutton%3Dnone%26wplink%3D1; wp-settings-time-1=1384290601
    Host	www.mydomain.de
    Referer	http://www.mydomain.de/wp-admin/admin-ajax.php?action=croppostthumb_ajax&image_id=7698&parent_post_id=3711
    User-Agent	Mozilla/5.0 (Windows NT 6.2; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
    X-Requested-With	XMLHttpRequest

    hope somebody can give me a hint what the problem might be?!?

    Vasco

    http://wordpress.org/plugins/crop-thumbnails/

  2. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    A domain- or even directory-change is always problematic for wordpress. Cause the system and much plugins inserts server or url related variables into the db.

    For my personal use i write a small script to rename all locations where the old domain/directory name occurred. But there should be a few plugins that do the same job well. I transferred nearly every WP-Installation before going live at least once (sometimes twice) and didn't get a problem.

    As far as i know, i didn't use any url-specific-path-variables in the plugin (that may cause the error).

    You may try: upload a new image and crop it

    • if it works you had anywhere a problem with the path of your images
    • if it dosent work you may have a problem with file permissions or server requirements

    So, does it work?

  3. vasco.eduardo
    Member
    Posted 5 months ago #

    Hey,

    I copied the Folder via shell access with all the file permissions and ownerships:

    cp -R -a old-folder/ new-folder/

    so I think file permissions or server requirements(same server) should not be a Problem.

    After that I copied the Database and did this commands to update the URLs:

    UPDATE wp_options SET option_value = REPLACE(option_value, 'http://devdomain.local', 'http://livedomain.com') WHERE option_value NOT LIKE '%{%';
    UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'http://devdomain.local', 'http://livedomain.com') WHERE meta_value NOT LIKE '%{%';
    UPDATE wp_posts SET guid = REPLACE(guid, 'http://devdomain.local', 'http://livedomain.com');

    Today I installed a Plugin for Updating URLs (http://wordpress.org/plugins/velvet-blues-update-urls/)and used it. In fact it found some more entries with the old Path and changed them.

    But the Problem is still there. I uploaded a new Image and I still can not crop it?!? Any more ideas?

  4. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    where does the message appear? After you click "crop-image" or even on the when the lightbox is openend (no display of the croping area)?

    Is that the only log you get from the console?

  5. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    Also try: go to settings and "resave" the crop-thumbnail settings.

  6. vasco.eduardo
    Member
    Posted 5 months ago #

    Hey,

    in the moment I click "crop-image" the Error

    Post http://www.mydomain.de/wp-admin/admin-ajax.php 500 Internal Server Error

    appers in my JS Console
    I allready tried "resave" the crop-thumbnail settings. No change?!? :(

  7. vasco.eduardo
    Member
    Posted 5 months ago #

    Now I also used this tool:

    http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    And it changed some 112 more entries in the DB(all the resting serialized PHP strings I think)... Now no evidence of the Old Domain can be found in the DB and the Problem still exists!?!

  8. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    than there has to be a problem with the server functions. But i can not debug from here.

    It seems you are fit with programming, so if you want, we may debug the code that causes the problem.
    Go open plugins/crop-thumbnails/functions/save.php

    First: Insert the following code on line 32
    echo 'END';die();

    Second: Click on crop and check the console

    Third:

    • If there is still the Server-Response 500: clear the code you inserted and write it in a few lines earlier. Go To First Step.
    • If there is another error: clear the code you inserted and write it in a few lines later. Go To First Step.

    Post the Line-Number, that causes the Server Response 500.

    Thanks

  9. vasco.eduardo
    Member
    Posted 5 months ago #

    Hey,

    first of all Thanks for the great support!

    I did what you said and the Server Response 500 is caused in line 111
    the if codition:

    if(!@copy($result,$_filepath)) {

    seems to cause the problem!

    Vasco

  10. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    Hi vasco,
    i think we can accelerate this if we communicate directly.
    You find my email in the top comment of "crop-thumbnails.php" or on http://www.totalmedial.de

    See you.

  11. Volkmar Kantor
    Member
    Plugin Author

    Posted 5 months ago #

    So we found the problem.

    On the server the php was running in safe mode. After it turned of the problem disappear. I am not very familiar with this setting but i assume that it blocks some kind of file access reading or writing on the server.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.