WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Can't login with late init (25 posts)

  1. Kalian
    Member
    Posted 2 years ago #

    Hello.

    WP is installed in directory /wordpress/.
    When $wp_super_cache_late_init is set to 1 I can't login dashboard. Use PHP mode and no rules in .htaccess. When I try to login, system redirect me to /wordpress/wp-login.php and show home page. I notice no errors on this page.
    I can login when legacy caching mode is on or when $wp_super_cache_late_init is set to 0.
    What should I do to use PHP mode withous login problems?

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

  2. Nic Windley
    Member
    Posted 2 years ago #

    I've just started seeing this also.
    Driving me nuts!!

    I'm actually using mod_rewrite and this is still happening.

    Donncha, what's the latest on this ?

  3. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    nisiwi - unfortunately I've never had time to debug this problem. I don't know why it's happening.

  4. Nic Windley
    Member
    Posted 2 years ago #

    yeah, just realised that its only happening on 1 site - very odd so its not a WP Super Cache issue

    must be a WP issues somewhere

  5. Nic Windley
    Member
    Posted 2 years ago #

    Think I may have found the problem.

    Late ini in mod_rewrite mode was problematic, causing the loop.

    However when switching to PHP mode I was expecting it to resolve the problem, which it didn't.

    On inspecting the htaccess file I noticed that all mod_rewrite rules were still in tact with PHP mode enabled.

    After stripping out the htaccess rules from mod_rewrite mode the problem was resolved. I can log in without the strange looping back to the front page.

  6. Nic Windley
    Member
    Posted 2 years ago #

    Odd, while this worked for one site I'm seeing the same problem and this fix doesn't resolve it.

    When WP Super Cache is disabled all is fine, when enabled even just by itself I get this problem ?

    Will try some more plugin configs to see if that's it.

  7. Nic Windley
    Member
    Posted 2 years ago #

    No matter what configuration of plugins I have, even with all plugins disabled as soon as late ini is enabled in WP Super Cache the site login jumps to front page with no dashboard or bar, failing to log in ?

  8. Nic Windley
    Member
    Posted 2 years ago #

    I was forced to switch to W3 Total Cache and the problem resolved.

  9. Nic Windley
    Member
    Posted 2 years ago #

    And I'm back to WP Super Cache - W3TC doesn't have the PHP options I need.

    Will have to work out what's causing this with some experimenting.

  10. Donncha O Caoimh
    Member
    Plugin Author

    Posted 2 years ago #

    I think you'll need to debug the WordPress login code. I don't know why this is happening to your site, sorry!

  11. floz
    Member
    Posted 1 year ago #

    Having exactly the same issue here! When I fill out and submit the login form, I just get redirected to mysite.com/login.php but nothing happens. If I set wp_super_cache_late_init to 0 all is good again. Using latest version of WPSuperCache in PHP mode.

    So any updates on this?

  12. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    floz - none, can you try debugging this? Use the plugin debugger and you might need to use error_log() in wp-login.php and the login code in wp-includes/

  13. floz
    Member
    Posted 1 year ago #

    @Donncha: Tried debugging, but everything looks fine, no error messages. Narrowed it down a tiny bit: If I manually rm -rf the wp-content/cache/supercache/www.mydomain.com folder, then it works all well, and I can log in correctly. But if I then log out, and try to log in again, I have that direct redirct to the home page problem (when trying to post a comment, I get shot directly to the home page, and the comment is not posted)...

  14. felixzhang
    Member
    Posted 1 year ago #

    it happed to me now, don't know how to fix it.

  15. Nic Windley
    Member
    Posted 1 year ago #

    happening again with another site

  16. maltech
    Member
    Posted 1 year ago #

    I don't know if this will help you or not, I was just having the same problem, I disabled Make known users anonymous so they’re served supercached static files. Now everything works as intended.

  17. floz
    Member
    Posted 1 year ago #

    Still having these issues, despite "maltech"'s sugestion (I had this set to 0 all along...).

  18. Nic Windley
    Member
    Posted 1 year ago #

    Its back to haunt me also as I'm looking at WP Super Cache once again in the hope that I can get it working.

  19. Nic Windley
    Member
    Posted 1 year ago #

    OK, this is very odd.

    When the redirect occurs you get taken to /wp-login.php, however the page being displayed is the front page of the WP site.

    If you then check the source code of the page its actually showing the source of /wp-login.php so I can see options to submit and resend password, yet I'm looking at the front page ???

    This has to be a cache bug somewhere.

  20. Nic Windley
    Member
    Posted 1 year ago #

    On first load of the page (when redirected after logging in) if you check the source code the document expires almost immediately.

    Document Expired

    This document is no longer available.

    The requested document is not available in Firefox's cache. As a security precaution, Firefox does not automatically re-request sensitive documents. Click Try Again to re-request the document from the website.

  21. Nic Windley
    Member
    Posted 1 year ago #

    Aha! So I removed ALL supercache generated files and then tried logging in and guess what.....I logged straight in. I think there are some WP files that are being cached incorrectly causing this login redirect.

  22. Nic Windley
    Member
    Posted 1 year ago #

    After stripping all cache lines out of wp-config.php and forcing super cache to rewrite them (or prompt for changes) it seems to be stable once again.

    Could be something legacy from previous versions or upgrades.

    Worth a try.

  23. Nic Windley
    Member
    Posted 1 year ago #

    Sorry its redirecting again. Only fix is clearing the supercache files or disabling plugin ?

  24. Nic Windley
    Member
    Posted 1 year ago #

    The culprit(s) is/are the index.html and index.html.gz file(s). Remove those and you can log back in.

    For some reason these are being served in place of the admin index page.

  25. floz
    Member
    Posted 1 year ago #

    Thanks Nic for your investigations! What do you mean by culprit, remove index.html from where? Does that need to be done once or again and again after login and logout?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic