WordPress.org

Ready to get started?Download WordPress

Forums

Can't login after switch to PHP 5 (6 posts)

  1. RichardJohn
    Member
    Posted 6 years ago #

    I've been using PHP 4 on the hosting my WordPress blog is on for ages. I switched to PHP 5 earlier to take advantage of the DOM functions on a plugin I wrote.
    I wrote the plugin, it all works etc., but now I can't login to the backend!
    If I switch back to PHP 4 (I can do it via my hosts cPanel), I can login fine (although the plugin breaks).
    When I try and login, I just get taken back to the login form, with no error. If I try and recover my password, I get an error that says to enter my username or email address (I did enter my username correctly).
    Does anyone know what's going on?
    Thanks!

  2. RichardJohn
    Member
    Posted 6 years ago #

    I just noticed, when I'm on PHP 5, comments don't work on the frontend either.
    If I switch back to PHP 4, the backend works, as do comments.
    There's nothing in the error log.

  3. Ivovic
    Member
    Posted 6 years ago #

    it's probably your theme that's broken. WordPress works fine on php5 (I'm using it myself)

    your theme's functions.php is loaded for the admin area as well... gonna guess the problem's in there, if you're sure its not your plugin(s).

  4. RichardJohn
    Member
    Posted 6 years ago #

    Doesn't seem like it, but thanks.
    This is the entirety of my theme's functions.php

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar();
    ?>
  5. Ivovic
    Member
    Posted 6 years ago #

    well, then its your plugins (or something else)... 'cos it ain't wordpress.

    like I said, wordpress works on php5 quite well.

  6. RichardJohn
    Member
    Posted 6 years ago #

    Oddly, the POST is completely empty.
    I just did added var_dump($_POST) to the top of wp-login.php, and it's an empty array.

Topic Closed

This topic has been closed to new replies.

About this Topic