Welcome! Log In Create A New Profile

Advanced

why nginx always redirect back to index.php after I enter the demo password?

Posted by stuat3501 
why nginx always redirect back to index.php after I enter the demo password?
July 04, 2015 03:15PM
Dear all

We plan to change our project from apache to nginx+php-fpm.
However, After I enter the test account and password, it redirct back to index.php.
my college suppose that it probably because I did not setting correctly about php.session in php.fpm.

The following code is the first section of index.php of our project.

function IsLogin() {
if(!isset($_SESSION['sess_userid']))
{
$url="index.php";
echo "<script language='javascript'>";
echo "top.location='".$url."';";
echo "</script>";
}else{
echo "<script language='javascript'>";
echo "var account='".$_SESSION['sess_userid']."';";
echo "</script>";
}
}

Does anyone can give me a clue to debug this problem?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 300
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready