Search images broken

This topic contains 6 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 7 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2966
    Rhys
    Rhys
    Participant

    Hi, I am having a problem with search images loading. I have made sure that the cache folder is set to 777. I have also tried with caching and without, the same with Timthumb. Is there anything else I should check. This has become a critical UAT fix as the site is due to go live on Tuesday.

    Any help would be great.

    Thanks
    Rhys

    #2970
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I just checked on your site.

    I think there is either a htaccess or an apache rule set incorrectly, because when I tried to access the timthumb url I get the following error:
    https://wordpress.philiplee.ie/~philiple/wp-content/plugins/ajax-search-pro/includes/timthumb.php?ct=0&cc=FFFFFF&q=95&w=200&h=300&a=c&src=http%3A%2F%2Fwordpress.philiplee.ie%2F~philiple%2Fwp-content%2Fuploads%2F2014%2F11%2FUrsula.jpg

    I’m not sure if this is a permission problem or something else, but you should definitely contact the server administrator. The timthumb library is never executed, because the server does not allow reaching it from the outside.

    One thing you should probably try though is to set the permissions on the /wp-content/plugins/ajax-search-pro/includes/timthumb.php file to 777. If it’s not blocked via SSH, then it might help.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #2971
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Just noticed, the link in the previous post is with https://… it was meant to be http://.. but it’s automatically converted, sorry about that.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #2979
    Rhys
    Rhys
    Participant

    Hi Ernest,

    Thanks for you reply. I have tried it without caching and without Timthiumb, but I still get the broken images. If I turn on cache and preload the images. The url image name retrieved from a search is different to the one in the cache.

    Search URL=
    http://wordpress.philiplee.ie/~philiple/wp-content/plugins/ajax-search-pro/cache/5735133b410a63190f61ef4bd322839b.jpg

    Image actual name in cache=
    b76fcfa22ce6c19a936e0da2cf133421.jpg

    Any idea why this would be?

    It was working on my local copy with MAMP. I could try to clear all the settings on the plugin but how would be best to do this and can I save the styles I have created as it took ages to set up.

    Thanks
    Rhys

    #2980
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Then it’s a simple permission problem. I just tried to clear the cache and the files were cleared nicely. Then I tried searching again, and the files were not re-created, which means that the plugin cannot access the cache folder. It was working on your local MAMP server, because the permissions were ok.

    If the permissions are set to 777 via ftp on the cache folder then it means that the server administrator has locked the permission changes via SSH. In other words, you might see 777 on the cache folder, but it’s actually something different in an SSH terminal.

    I think you will need to ask the server admin to unblock the access to the timthumb.php file (unless it’s denied in htaccess) or to change the permissions on the cache folder.

    You can try different permissions as well, some server hosts do not allow 777. These permissions should also work: 666, 655, 755, 766
    755 is a standard for almost every host, you should try that first. You can try that on the timthumb.php as well, it might work.

    As for the file name differences: You copied the cached files from your local MAMP server to the live version. That’s not going to solve the issue, because the images are re-generated from time to time with a different name in case they are changed. The file names are generated based on the search instance id, image name, timestamp etc.. so that’s the reason why the file names are different.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #2981
    Rhys
    Rhys
    Participant

    I Just checked the logs for the domain and can see this error.

    [Wed Nov 19 12:27:32 2014] [crit] [client 176.61.54.140] (13)Permission denied: /home/philiple/public_html/wp-content/plugins/ajax-search-pro/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://wordpress.philiplee.ie/~philiple/people/

    There is no .htaccess file in the plugin folder. Should there be? And if so what would I need to put into it. The main site .htaccess just has the usual wordpress stuff…

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /~philiple/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /~philiple/index.php [L]
    </IfModule>

    # END WordPress

    Any help appreciated.
    Thanks
    Rhys

    #2982
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    That looks all right to me, that’s the standart wordpress htaccess indeed.

    No, there should not be any .htaccess file in the plugin directory, so it’s ok as well.

    Well, it means that the server is restricting the access to php files outside the root directory I guess.

    Take fore example this file: http://wordpress.philiplee.ie/~philiple/wp-content/plugins/ajax-search-pro/filters.txt
    It’s accessible because it’s a txt file.
    Now try this one: http://wordpress.philiplee.ie/~philiple/wp-content/plugins/ajax-search-pro/functions.php
    That’s a php file it should be executed, but it’s not, the server returns with an error 500, which is very unusual and it should not happen. It must be restricted somewhere, either on CPanel, or in the apache vconfig files, or the permissions are below 755.

    Other solution would be to bypass the thumbnail generating script and just show the raw image found. That’s not a very convenient option, because it would show the unresized, unscaled images.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.