WordPress.org

Ready to get started?Download WordPress

Forums

"WordPress Requires Cookies", "Username Field Empty", "Password Field Empty" on (61 posts)

  1. WCityMike
    Member
    Posted 6 years ago #

    Well, I'm about at the end of my rope.

    My understanding was that WordPress v2.3.1 was supposed to solve this error that appeared with v2.3. It has not, for me.

    I get three errors when I log into my blog:

    * "ERROR: WordPress requires Cookies but your browser does not support them or they are blocked."
    * "ERROR: The username field is empty."
    * "ERROR: The password field is empty."

    They do not prevent me from logging in. I do not have any extra spaces following the ?> at the end of my config file. I am in v2.3.1. I turned off my plugins before upgrading, both with 2.3 and 2.3.1, and turned them on afterwards. I have deleted all cookies related to my WordPress install.

    I am using Mac OS X v10.5 and Firefox v2.0.0.8. I do not have a firewall active. My cookies are set to be kept until they expire.

    Any help would be sincerely appreciated.

  2. MichaelH
    Member
    Posted 6 years ago #

    Might also add information about hosting situation just in case:

    Web-server and version:
    PHP Version:
    MySQL version:

    Also, the last time you accessed your blog's admin, did you logout of the admin section before exiting your browser?

  3. WCityMike
    Member
    Posted 6 years ago #

    Well, I implemented a temporary "fix" in that I commented out the code that generates those error messages, but that's obviously not fixing whatever the problem really is.

    MySQL version: 4.1.22

    I'm not sure about the other two, but I'm on LivingDot; I'll inquire.

  4. MichaelH
    Member
    Posted 6 years ago #

    Also remember to answer this:

    "Also, the last time you accessed your blog's admin, did you logout of the admin section before exiting your browser?"

  5. WCityMike
    Member
    Posted 6 years ago #

    PHP Version: 4.4.6
    Web Software/Version: Apache 1.3.37

    And this problem has been going on for many, many weeks ... although there were times where I did not log out of the admin section before exiting my browser, there were also times in which I did log out of the admin section before exiting my browser. In all circumstances, the error messages have been showing up.

  6. MichaelH
    Member
    Posted 6 years ago #

    For now, reported this via Trac ticket 5365.

  7. WCityMike
    Member
    Posted 6 years ago #

    Thank you! I'll keep my eye on that.

  8. WCityMike
    Member
    Posted 6 years ago #

    Also, I had to reverse the commenting-out of the error messages; it snafu-ed the login.php form.

  9. WCityMike
    Member
    Posted 6 years ago #

    MichaelH (ironically enough, I'm a Mike H as well), one other thing: in the bug report, you state, "WordPress is in sub-folder so the WordPress address (URL) is different than Blog address (URL)."

    In my particular case, it's not. My WordPress address and blog address are the same.

  10. MichaelH
    Member
    Posted 6 years ago #

    Good to know. Thanks. If you are of the mind, please note that in trac on that ticket. Just use your Forum login/password there.

  11. Alex Concha
    Member
    Posted 6 years ago #

    WCityMike, I can not reproduce the bug but I modified a bit the wp-login.php file [1], can you test it on your site?

    If you prefer diff files, see [2].

    [1] http://wordpress.pastebin.com/m4da02e75
    [2] http://wordpress.pastebin.com/m1174dd0c

  12. WCityMike
    Member
    Posted 6 years ago #

    Wow, xknown, I think that did it!

  13. spotme10
    Member
    Posted 6 years ago #

    I tried this solution and it did not work for me. I'm just going to downgrade back to 2.2.

  14. Alex Concha
    Member
    Posted 6 years ago #

    spotme10, what is your blog's URL?

    Edit: Please, add information about your hosting environment too.

  15. spotme10
    Member
    Posted 6 years ago #

    http://www.jowtigers.com

    I'm on Lunarpages (www.lunarpages.com). Not sure what kinds of stats you need about their servers. I know they run MySQL 4+, PHP 4+.

    What else do you need to know?

    Thanks for helping me out, btw! ;)

  16. Alex Concha
    Member
    Posted 6 years ago #

    Hmm, I created a test user on your site and didn't see any error regarding cookies (tested on Firefox and IE7).

  17. spotme10
    Member
    Posted 6 years ago #

    I just tried to sign in (FF) and got the same "cookie" error. I also had my girlfriend sign in from her computer at work and she got the same error as well.

  18. museum
    Member
    Posted 6 years ago #

    resolved!
    same problem since my upgrading to 2.3.1
    thanks xknown for the wp-login.php
    http://wordpress.pastebin.com/m4da02e75

  19. spotme10
    Member
    Posted 6 years ago #

    Why does it not work for me then? Argh!

  20. DaveATFraud
    Member
    Posted 6 years ago #

    Ran into the subject problem with WP 2.3.1 and Firefox 1.5. I tried the suggested alternate wp-login.php and got a blank screen instead of the previous error message.

    Edit: Found the blank screen problem (don't ask). Back to getting the "Cookies required" error.

    Installation is a new install on CentOS 4.5. PHP version is PHP 4.3.9 and MySQl version is 4.1.20. I also had some problems with getting php working with MySQL. I eventually realized that the PHP-MySQL rpm was not installed and installed it. That got the configurator working but php now complains about a bunch of duplicate MySql functions that fail to register. Not sure if this is a separate problem or is causing the behavior I noted above.

    Cheers,
    Dave

  21. DaveATFraud
    Member
    Posted 6 years ago #

    Found what was causing the "duplicate MySQL functions" problem. I had manually added a reference to mysql.so in php.ini before I realized that the PHP-MySQL rpm wasn't even installed. No complaints from PHP now but I still can't login as admin.

    Cheers,
    Dave

  22. Alex Concha
    Member
    Posted 6 years ago #

    Dave, what is your blog's URL?

    If you want to keep it private, you can contact me to track down this bug.

    alex at buayacorp dot com

  23. DaveATFraud
    Member
    Posted 6 years ago #

    xknown, thanks but I found it. It was the previously known problem caused by a blank line in wp-config.php. In my case, it was at the beginning of the file. It's amazing how long I can stare at something like that and not see it. I'm up and running now so I *just* need to come up with some content.

    Really weird the way a blank line in a config file can cause a totally unexpected error (can't log in due to a cookies problem). I would have expected something more drastic (nothing works) or something related to the information in the file (e.g., the MySQL error).

    Cheers,
    Dave

  24. jrgd
    Member
    Posted 6 years ago #

    just to let you know:
    we ran in exactly the same problem this morning with our wp2.3 install. we then manually edited the wp-login - it worked out. we now have upgraded to 2.3.1 and everything seems to be perfect.

  25. jeffbaier
    Member
    Posted 6 years ago #

    I've been dealing with this same problem since I first updated to 2.3 about a month ago. 2.3.1 did not fix my problem either. I tried all the fixes in this thread and other and they weren't working.

    On my site, I have a few custom login forms (in the sidebar, etc). I noticed these had the problem, but the /wp-login.php login did not have the problem.

    I was able to fix my problem by adding the following code to the top of my header.php in my theme before any html --

    if ( !is_user_logged_in() ) {
    		//Set a cookie now to see if they are supported by the browser.
    		setcookie(TEST_COOKIE, 'WP Cookie check', 0, COOKIEPATH, COOKIE_DOMAIN);
    		if ( SITECOOKIEPATH != COOKIEPATH )
    			setcookie(TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN);
    	}

    This is pulled straight from line 23 of wp-login.php. Basically if a user is not logged in, it sets the test cookie that wp-login checks for, and if its not present it causes the "WordPress Requires Cookies" error.

    Hope this helps someone.

  26. stevemacc
    Member
    Posted 6 years ago #

    I have had the same problem stated here and have tried all the fixes that I see here.
    ("ERROR: WordPress requires Cookies but your browser does not support them or they are blocked.")

    I have an install of WP v2.3 that I upgraded several weeks ago and have not had a problem until now. There is a good chance that I did not log out of my admin section before I exited my browser. As with WcityMike above, I am using Mac OS X v10.4.11 and Firefox v2.0.0.11. I do not have a firewall active. My cookies were all cleared in hopes that it would clear up this problem.

    I am running MySQL 4 and so far, I am unable to determine which version of PHP, and what version of Apache.

    I'd love to downgrade or reinstall WP, but I can't even sign into my admin account (or any account) to turn off widgets.

    I am also getting the following warnings at the top of the page:
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/mcclella/www/www/blog/wp-includes/widgets.php on line 53

    Warning: Cannot modify header information - headers already sent by (output started at /home/mcclella/www/www/blog/wp-includes/widgets.php:53) in /home/mcclella/www/www/blog/wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/mcclella/www/www/blog/wp-includes/widgets.php:53) in /home/mcclella/www/www/blog/wp-login.php on line 24

    LIke I said I've tried every solution that I've seen here, and I'm pulling my hair out trying to get into my blog.

    Thanks for the efforts,

    Steve MacC

  27. computerfriend
    Member
    Posted 6 years ago #

    Ok, well I have a pretty good answer to this whole debacle:
    First, let's reason this out: You are getting messages like this:
    * "ERROR: WordPress requires Cookies but your browser does not support them or they are blocked."
    * "ERROR: The username field is empty."
    * "ERROR: The password field is empty."
    So, if you look at which file is causing this, it is the wp-login.php.
    All i did was search inside the wp-login.php file for these error messages and then take the text out. I replaced one of the error text items to "Welcome to ArtonDisk.com which is my login. VOILA! No more error messages and no more problem.
    Now if they could just let us select text inside widgets in WP 2.3.1 we would be done.
    Here is the sample code that I changed (your line numbers may vary):

    IN LINE 316 I see: $errors['test_cookie'] = __('<strong>ERROR</strong>: WordPress requires Cookies but your browser does not support them or they are blocked.');
    I changed it to read: $errors['test_cookie'] = __('');

    In lines 338-340 I see `$errors['user_login'] = __('ERROR: The username field is empty.');
    if ( $_POST && empty( $user_pass ) )
    $errors['user_pass'] = __('ERROR: The password field is empty.');`
    I changed the code to read:

    $errors['user_login'] = __('');
    	if ( $_POST && empty( $user_pass ) )
    		$errors['user_pass'] = __('');


    Problem solved. We can all go on with our lives and pray for the next version of WordPress to not screw this up.
    FOLKS, WHAT I AM TRYING TO TELL YOU IS THAT THESE ARE FALSE ERROR MESSAGES SO YOU HAVE TO GET RID OF THE ERROR MESSAGES OR JUST IGNORE THEM. NOTHING ELSE IS WRONG HERE.
    I hope this helps somebody out there.
    Computerfriend

  28. stevemacc
    Member
    Posted 6 years ago #

    Computerfriend, I guess I understand what you are trying to say. I can get rid of the error message or change it to whatever I want. But when it is all said and done, I still can not log into my WP blog as Admin or anyone else for that matter. By the way, I am not getting the "empty field" messages either as the first poster here was.

  29. computerfriend
    Member
    Posted 6 years ago #

    stevemacc, you have a different issue entirely from the rest of the posters here. What you have is most likely a permissions (CHMOD) problem where some of the files in WordPress that need to be accessed by the server are not available or cannot be read correctly in order to let you log in. I am not on a Mac, but I have two Macs. What is happening here doesn't look so much like a corrupt database issue-- it looks more like the server is trying to cooperate and cannot because it cannot make a "modification."
    If there is any way to get into your file manager on your server I would suggest that you somehow disable your widgets and see if that helps. Otherwise you are facing some trial and error in finding out which files don't have the correct permissions set.
    One of the biggest red flags that I see is that you have PHP4. That is a bit old. Also, if you want to find out what kind of programs are running on your server such as what version of MySql and PHP there is a program out there called servercheck.php which can help you. You upload it to your website or server and then type in the URL such as http://www.yourdomain.com/servercheck.php . . .
    If you need a copy of this and can't find it on the web, email me at computerfriend at hotmail.com
    Something tells me that when you upgraded your WordPress installation you might have overwritten one or more files that should have been left in place.

  30. spotme10
    Member
    Posted 6 years ago #

    jeffbaier, that worked perfectly for me! Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic