WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] Cannot update .htaccess

[Plugin: WP Super Cache] Cannot update .htaccess

  • I resurface an old post by me without reply.

    The original post is here

    I copy/paste the end :

    Ever the same warning, today with WP 3.0.1 and WP SuperCache 0.9.9.6.

    Maybe there is a mistake in the code of wp-cache.php ?

    After the plugin is installed and works, when I display the advanced page in WPSC settings, I see ever the same warning : “Cannot update .htaccess”.

    (With .htaccess in 666, no warning. With .htaccess in 644, warning)

    In wp-cache.php, the code is (line 1058) :

    <a href="javascript:toggleLayer('rewriterules');" class="button">
    <?php _e( 'View Mod_Rewrite Rules', 'wp-super-cache' ); ?></a>
    <?php wpsc_update_htaccess_form(); ?>
    <div id='rewriterules' style='display: none;'>
    etc.

    So, in any case (before or after update of .htaccess), there is a call to the function wpsc_update_htaccess_form().

    In the body of this function (line 2290), there is in the beginning :

    if( !is_writeable_ACLSafe( $home_path . ".htaccess" ) )...

    And is_writeable_ACLSafe(/…/.htaccess) return ever false if I chmod
    .htaccess to 644. But, for safety reasons, this file cannot stay in 666 (it’s the .htacces on the root).

    To fix this issue, I replace (line 72 in wp-cache.php, after the plugin is updated and working) :

    if ($f===false)
         return false;

    with:

    if ($f===false)
         return true;

    But maybe it’s not a definitive solution.

    PG

Viewing 1 replies (of 1 total)
  • Plugin Author Donncha O Caoimh

    @donncha

    No, it’s not a solution, sorry. Can you debug the code that displays the warning? Find out why it thinks the rewrite rules weren’t written.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Super Cache] Cannot update .htaccess’ is closed to new replies.
Skip to toolbar