Support » Plugin: Really Simple CAPTCHA » [Plugin: Really Simple CAPTCHA] Really Simple Captcha Images not shown when lock files by Usera Acce

  • Dear all,
    on my website I installed the Really Simple Captcha plugin
    to have a captcha for comments and contact forms.
    Everything was working fine,
    but the images stopped being displayed after I installed the
    “User Access Manager” plugin.
    I think the reason is because I’m asking this plugin to lock the uploaded files (in fact if I disable this option everything works fine).

    How can I fix the issue for the captcha, but keeping my upload folder
    protected?

    Thanks a lot in advance for the help,
    Luca

    http://wordpress.org/extend/plugins/really-simple-captcha/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You should ask that the developer of the User Access Manager plugin.

    Thanks Takayuki,
    I’ll write to them then!
    Cheers, -Luca

    Hi Takayuki,
    apparently it would be enough to change the tmp folder of Contact 7 captcha to one that is not under the control of User Access Manager.

    I’ve tried to change it using:
    define( ‘WPCF7_CAPTCHA_TMP_DIR’, ‘/wp-content/np_uploads/wp7_captcha’ );

    but it still doesn’t work (I’ve disabled the User Access Manager plugin
    to be sure that Contact 7 works as expected, but apparently
    when changing the directory (that has 777 permission) doesn’t work…)

    What am I doing wrong?
    Thanks for the help,
    Cheers, Luca

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    define( ‘WPCF7_CAPTCHA_TMP_DIR’, ‘/wp-content/np_uploads/wp7_captcha’ );

    There should be full file path. The /wp-content/np_uploads/wp7_captcha is not full path, is it?

    hi Takayuki,
    I’ve used the full path /httpdocs/wp-content/np_uploads/wp7_captcha
    that is the one I see in my directory tree when I access my host through
    ftp, but it doesn’t work…
    How can I find the full path?
    Thanks for your help,
    Luca

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    If you can access the host by using SSH, move to the directory and use pwd command. If not, ask the support of the host for what the full path of the directory is.

    Howdy,

    I’ve got the same issue as well.

    Its the htaccess file that is causing the issue:

    Order deny,allow
    Deny from all
    <Files ~ "^[0-9A-Za-z]+\.(jpeg|gif|png)$">
        Allow from all
    </Files>

    If you remove the contents, it works, if you add it back then the image is a 403 error, somethings not right with the regex

    Matt

    Ah ha, hacky but works

    In “/wp-content/uploads/wpcf7_captcha/” make a backup of the .htaccess file and replace it with this:

    <Files ^(.*\.jpeg|gif|png)">
        Allow from all
    </Files>
    <Files ^(.*\.txt)">
        Deny from all
    </Files>
    #Order allow,deny
    #Deny from all

    This allows access to the images, but blocks the text files (which is a good thing)

    Matt

    Thanks Matt!
    Since I’m not an expert in Apache, can you please tell me
    what this .htacess file?

    As far as I’ve understood initially you grant permission for all
    the images files and the you lock all the txt.

    But I can’t understand this syntax:
    <Files ^(.*\.txt)”> it is the standard apache one? can you link me to some documentation so that the next time I can try and solve similar issuers?

    Thanks a lot,
    Luca

    Howdy Luca,

    Short version, means you can modify the way Apache works. Ideal for controlling access to files in this example.

    A deeper version is here http://en.wikipedia.org/wiki/Htaccess

    I’m not great with regex, but “<Files ^(.*\.txt)”>” means that to only apply the below rules to files ending in “.txt”, which in this case are the unencrypted versions of the images I believe (but might be wrong).

    Hope that helps 🙂

    Matt

    Hi Matt, I’ll read the article thanks!
    What “bothers me” is the .* before \.txt
    I’m used to regulars expression to search for files in linux
    and ls .* would find all the files starting with . and any other character (i.e. the hidden files).. But I guess the syntax might be different 🙂 Thanks for your help!!!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Really Simple CAPTCHA] Really Simple Captcha Images not shown when lock files by Usera Acce’ is closed to new replies.