• Hi Mike,

    Thanks for the awesome plugin – it’s been a life saver πŸ™‚

    I was hoping to move the cache directory, so that it resides with all my other caches / temporary site files (vs within the /plugins directory, amongst code). I can see that the path is hardcoded (si-captcha.php, line 1241).

    My hope was that “Enable PHP sessions” would prevent this cache directory from being used (i.e. temp data would be stored in sessions), but that appears not to be the case – it continues to be populated.

    Could I request a setting to change the cache directory – or at least, a filter so that I can override it in code (without needing to edit the plugin)?

    Thanks much in advance! πŸ™‚
    Justin

    https://ww.wp.xz.cn/plugins/si-captcha-for-wordpress/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hi Justin thank you for your request. The plugin developer will investigate further your suggestion.

    Regards

    Thread Starter JK

    (@justin_k)

    Great, thanks, I’ll be keeping my eye out for it.

    I agree, this is a very good plugin and my clients swear by it.

    My only issue is the location of the cache directory — it gives me all kinds of headaches because of strict permissions we use in our environment. An “si-captcha-cache” directory somewhere under “uploads” would work much better for me but the sorts of overrides that the OP suggested would also be awesome.

    Thanks!

    Thread Starter JK

    (@justin_k)

    Yeah, I was just gonna reach out to the author again too – since two updates have been posted & 3 months elapsed since I mentioned this. Would it help if I provided a patch? Should be an *extremely* quick 1-liner to just add a filter.

    Thanks again

    it is technically a challenge to do this since the php file that displays the image runs separate from the wordpress environment.

    I can look at this issue though

    My hope was that “Enable PHP sessions” would prevent this cache directory from being used (i.e. temp data would be stored in sessions), but that appears not to be the case – it continues to be populated.

    Thread Starter JK

    (@justin_k)

    Sure, that would be equivalently good πŸ™‚ As long as the plugin doesn’t write files to a hard-coded location.

    Thanks!

    Thread Starter JK

    (@justin_k)

    Does it look likely to happen at any point…? Is there maybe some temporary hack/modification I could do in my own copy? I really really love this plugin, but the constant appearance of those files in my plugins directory remains an issue essentially every time I push/pull my site…. :/

    About the setting “Enable PHP sessions”

    Enable this setting to use PHP sessions for the CAPTCHA. PHP Sessions must be supported by your web host or there may be session errors.

    When the setting is not enabled it writes temporary php files to this folder
    wp-content/plugins/si-captcha-for-wordpress/captcha/cache

    I did some testing and have determined that the setting “Enable PHP sessions” is working properly. When you have the check box enabled, it will not use the cache directory.

    Note: if you have a page cache plugin: after you change this setting, empty the page cache

    Thread Starter JK

    (@justin_k)

    With the PHP sessions option disabled, new files appear in the cache directory each time a captcha is ‘generated’ (i.e. by reading a post while not logged in, or by manually refreshing the existing captcha). This is as I’d expect.

    If I enable the PHP sessions option, I don’t see these files predictably appearing – i.e. I can refresh the captcha image numerous times without dir populating (as desired). However, the issue is that the dir *does* still seem to populate eventually – albeit much more slowly. For instance, if I leave that option enabled then check the cache dir 15 minutes later, one or two files have indeed appeared. I can’t make them appear explicitly by refreshing the image (as when the option is disabled) – but they do still appear from time to time.

    Thoughts? I don’t have any caching plugins on my site.

    Thread Starter JK

    (@justin_k)

    …Should I just assume this plugin isn’t being supported anymore? Been hoping to resolve this for a full 6 months, but it seems like trying to have a dialog isn’t really fruitful…

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Set Cache Directory’ is closed to new replies.