2

We moved my website (wietse.org) using Duplicator to a new host. The site is accessible and works perfectly, only when trying to access /wp-login.php it gives a 404.

Just enabled debugging mode, this is what error it gives:

Warning: Illegal string offset ‘remember’ in /www/wp-includes/user.php on line 41 Warning: Cannot assign an empty string to a string offset in /www/wp-includes/user.php on line 41 Warning: Illegal string offset ‘user_login’ in /www/wp-includes/user.php on line 56 Fatal error: Uncaught Error: Cannot create references to/from string offsets in /www/wp-includes/user.php:56 Stack trace: #0 /www/wp-login.php(806): wp_signon(”, ”) #1 {main} thrown in /www/wp-includes/user.php on line 56

Looked at many of the previous forum posts on similar issues but to no avail. Any help much appreciated!

3
  • Try to upload wp-includes folder to New hosting. Commented Dec 22, 2017 at 16:13
  • 1
    What are your old and new wp and php versions? Any differences between them? Commented Dec 22, 2017 at 16:45
  • are you using any new plugin?
    – inarilo
    Commented Dec 22, 2017 at 21:19

2 Answers 2

3

I know this thread is a little bit old, but as I spent 3 days installing, "up/down" VPS and searching Google, today I could find an answer to this error.

On your WordPress installation root folder, find and open wp-login.php file.

Search for the line $user = wp_signon('', $secure_cookie); and replace the empty string ' ', for array().

The line should now be $user = wp_signon(array(), $secure_cookie);

That's it!

Source: https://core.trac.wordpress.org/attachment/ticket/37071/fix-wp-login-error.patch

2
  • worked for me, on old WP 4.3.1
    – cucu8
    Commented Feb 4, 2022 at 9:09
  • This also worked for me on WP 4.2.33. Commented Sep 25, 2022 at 22:07
-1
   $user = wp_signon( '', $secure_cookie )

Fix the above line and rewrite it as: $user = wp_signon( array(), $secure_cookie ); I hope that works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.