• 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.

Viewing 15 replies - 16 through 30 (of 60 total)
  • 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.

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

    Why does it not work for me then? Argh!

    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

    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

    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

    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

    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.

    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.

    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

    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

    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.

    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 https://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.

    jeffbaier, that worked perfectly for me! Thanks!

    Spoke too soon.

    jeffbaier, this leaves a huge error message at the top of the page if no one is logged in.

    Oh well… starting from scratch again…

Viewing 15 replies - 16 through 30 (of 60 total)
  • The topic ‘“WordPress Requires Cookies”, “Username Field Empty”, “Password Field Empty” on’ is closed to new replies.