WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
1.1 does not resolve backslahses in advanced-cache.php (5 posts)

  1. wildmice
    Member
    Posted 2 years ago #

    This was broken in 1.0 and did not get fixed with 1.1.

    When the file wp-contents/advanced-cache.php is written backslashes are not escaped and the file has to be manually fixed to work on Windows. In our case it is also a network file path that starts with a double backslash.

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. admintiger
    Member
    Posted 2 years ago #

    I had to modify 1.0 to make it Windows backslash compatible, but 1.1 runs fine here without modification on several Windows servers. Maybe our servers are configured differently in some way that causes that operational difference.

  3. wildmice
    Member
    Posted 2 years ago #

    Here's the code - it's on IIS with a network file path (double backslash at the start) - this is the edited version that works - all i did was escape every backslash with another backslash.

    <?php
    # WP SUPER CACHE 0.8.9.1
    function wpcache_broken_message() {
    if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    echo "<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->";
    }

    if ( !include_once( '\\\\CLUSTER12\\ARRAY3\\J45V2B\\wwwroot\\wp-content\\plugins\\wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    if ( !@is_file( '\\\\CLUSTER12\\ARRAY3\\J45V2B\\wwwroot\\wp-content\\plugins\\wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    define( 'ADVANCEDCACHEPROBLEM', 1 );
    register_shutdown_function( 'wpcache_broken_message' );
    }
    }
    ?>

  4. admintiger
    Member
    Posted 2 years ago #

    The difference is that I use Apache, instead of IIS, on my Windows servers. I gave up on IIS years ago because of endless problems. WP Super Cache 1.1 runs fine under Windows with Apache. Apache is free, easy to install, more configurable, more reliable, faster, and runs most website code developed under Linux without problems.

    If there is some compelling need for IIS, both web servers will run compatibly under the same Windows installation if they are configured to use different IP Addresses or Port Numbers and a router is used to route incoming traffic.

  5. wildmice
    Member
    Posted 2 years ago #

    Hi admintiger ~

    Yeh, i know that. It works just fine with Apache on Windows. The problem is a combinatino of IIS (backslashes) and the network file path (double backslash at start).

    The "compelling reason" for using IIS is that all of our clients use shared hosting, and some of them are on this IIS cloud hosting. So every time we update the plugin on every site we have to fix this again.

    It's not a show stopper, but would be nice to have. I would think that it ought to be a simple matter to escape backslashes in this file - if only to appease IIS users.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.