WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error: "No posts found matching your criteria" (3 posts)

  1. xsreality
    Member
    Posted 7 years ago #

    Hello friends!

    I have an installation of wordpress 2.1.2 with "Connections" theme installed. Due to a typical requirement of my site, not everybody can register at my blog site. Only special members who register separately (I have created a user authentication system in PHP using cookies.) have that access.

    Now when I log in and access the blog an error message is displayed:

    No posts found matching your criteria

    I found in the troublehsooting section that removing cookies and browser cache solves the problem. It did solve the problem but I need to have the cookies in place. Why does the wordpress blog interfere with the cookies? Plz help!:(

    The structure of my site:

    Root
       - blog/wordpress files
       - members/login.php

    The login.php sets the cookie in the following way:

    setcookie('xsreality_username', $username, 0, '/','',false);
    setcookie('xsreality_pass', md5($password), 0, '/','',false);

    I have tried hard but cant understand whats going wrong with it?

  2. Andrew Ozz
    WordPress Dev
    Posted 7 years ago #

    WP already uses cookies and has a pretty good login/logout functions. Perhaps you need to make your php authentication as a WP plugin, or search for a plugin that already does what you need.

  3. xsreality
    Member
    Posted 7 years ago #

    thanks azaozz for replying.

    I am not sure whether a plugin for my requirement would be there...
    But just now I have solved the problem. Actually I was thinking on a totally wrong line. Cookies has got nothing to do with the above problem. WP *does not* interfere with any cookies already present with the same domain.

    The reason for the above error was that I had included the session checking code in the wp-settings.php file. In my session checking code I was using SQL statements with a totally new connection of MySQL which was generating the above error. I changed the SQL statements and used the $wpdb object and the problem was solved.

    Thank You.

Topic Closed

This topic has been closed to new replies.

About this Topic