• Resolved Surbma

    (@surbma)


    Hi,

    my hosting has a lot of security features, one of them is that they do not allow to write the wp-config.php file. Your plugin is checking, if wp-config.php is writable to define this: define('WP_CACHE', true); Hence the admin error notification, that says wp-config.php file is not writable.

    But it should also check if the necessary setting is already defined, so there is no need for the admin error notification.

    Please fix your code to check if WP_CACHE is defined and if it is set to true and if so, don’t show the error notification!

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    thanks for the info , I will forward this to our devs

    ——

    so I just looked at the code , it’s weird, because it does have the check arelady

    		if ($enable) {
    			if (defined('WP_CACHE') && WP_CACHE) {
    				return false;
    			}

    ref: https://github.com/litespeedtech/lscache_wp/blob/f40c3d33fde17546467f0e68e206855a1521480e/src/activation.cls.php#L400

    could you please check WP_CACHE ?

    • This reply was modified 9 months, 3 weeks ago by qtwrk.
    Thread Starter Surbma

    (@surbma)

    Your code is checking, if $enable is set to true. If it is not true, then the condition in the 403. line returns false, because the WP_CACHE is defined and it is set to true. Therefore the first two conditions are ignored and the process is running till it finds out, that the file is not writable.

    You need to change the condition logic in this function so it will return false, when WP_CACHE is defined and it is set to true. ??

    • This reply was modified 9 months, 3 weeks ago by Surbma.

    The error is still present in my setup with LS Cache 6.1 on my setup. The suggestion by @surbma would solve this. A fixed and updated version would be appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp-config.php operation failed when changing `WP_CACHE` const’ is closed to new replies.