Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • After installation, a few options should be set at /wp-admin/?page=pw-settings . Sometimes, this page is not accessible via the menu. Without those settings the plugin won’t work, so visit the page by entering the URL manually.

    Hi,

    I posted a solution on http://ww.wp.xz.cn/support/topic/file-and-directory-tests-failed?replies=5#post-3995267 . In our case, the problem was the NFS mount on which the website is hosted. W3 Total Cache tries to do an flock and the NFS does not support it, in our case.

    We have had the same problem. The problem exists because we use an NFS share for some of our websites. The code of the W3 Total Cache plugin attempts to do an flock on the filesystem, but in our case, no lock daemon exists. This causes the code to hang and a non-responsive dashboard is the result.

    A fix is to remove the flock’s from the code. In wp-content/plugins/w3-total-cache/lib/W3/Setup.php, starting at line 455, change

    private function _test_create_file_fputs($test_file) {
            $fp = @fopen($test_file, 'w');
    
            if (!$fp)
                return false;
            if (@flock($fp, LOCK_EX)) {
                @fputs($fp, $test_file);
                @fclose($fp);
                @flock($fp, LOCK_UN);
                @unlink($test_file);
                return true;
            } else {
                return false;
            }
        }

    to

    private function _test_create_file_fputs($test_file) {
            $fp = @fopen($test_file, 'w');
    
            if (!$fp)
                return false;
                @fputs($fp, $test_file);
                @fclose($fp);
                @unlink($test_file);
                return true;
        }

    which essentially is the same as

    private function _test_create_file_fputs($test_file) {
            $fp = @fopen($test_file, 'w');
    
            if (!$fp)
                return false;
                return true;
        }

    This removes the flock and all is good again.

    Using WP 3.5.1 and W3 Total Cache 0.9.2.8.

    Thread Starter jaap

    (@beulbek)

    Hi Otto,

    thanks for your quick reply. I recognized the giveaway for mambo in the second request, by “mos”. The first request though, I don’t know about.

    I don’t have any experience with these kind of attacks and I’m not sure how to handle them. Is it normal to receive these kind of ‘attacks’?

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