• I installed Native PHHP Sessions for wordpress and verified the location in wp-content and that the table was created in MySQL.

    However, if I go to the sessions tool, it does not show any sessions for myself or when I attempt to utilize them. Also, the table in mySQL never populates anything.

    Any help would be appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Hi @jacobshaw,

    Just to confirm, you’ve activated the WP Native PHP Sessions plugin too?

    What code are you using that you’d expect to create new sessions?

    Thread Starter jswolf

    (@jacobshaw)

    Yes, I did activate it.
    This is the login page. attempting to place inputs from a form into the respective sessionn variables

    <?php
    session_start();
    
    if (isset($_POST["Submit"]) ) {
    	$user = $_POST["user"];
    	$pass = $_POST["pass"];
    	if (authenticate($user, $pass) ) {
    		$_SESSION['user']=$user;
                    $_SESSION['pass']=$pass;
                    echo("<h2>Login Successful</h2>");
    	}
    	else
    	{
    		loginform();
    	}
    }
    else
    {
    	loginform();
    }

    Then, I go to the following page, I test to see if they are empty and create new variables if they are set

    <?php
    session_start();
    if (isset($_SESSION['user'])) {
    $user=$_SESSION['user'];
    $pass=$_SESSION['pass'];
    }
    else
    {
    echo("<h1>No credentials found</h1>");
    exit();
    }
    • This reply was modified 3 years, 8 months ago by jswolf.
    • This reply was modified 3 years, 8 months ago by jswolf.
    • This reply was modified 3 years, 8 months ago by jswolf.
    • This reply was modified 3 years, 8 months ago by jswolf.
    Plugin Author Daniel Bachhuber

    (@danielbachhuber)

    Thanks for the update, @jacobshaw. Debugging custom code is outside the scope of support we offer for WP Native PHP Sessions, unfortunately.

    Thread Starter jswolf

    (@jacobshaw)

    Is there any way to help me figure out why no session populates in the table in mysql?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Nothing is happening’ is closed to new replies.