Hi I have a basic session code for testing which I have uploaded to two different servers.
File1 -
<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<?php
// Set session variables
$_SESSION["favcolor"] = "green";
$_SESSION["favanimal"] = "cat";
echo "Session variables are set.";
?>
</body>
</html>
File2 -
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<body>
<?php
// Echo session variables that were set on previous page
echo "Favorite color is " . $_SESSION["favcolor"] . ".<br>";
echo "Favorite animal is " . $_SESSION["favanimal"] . ".";
?>
</body>
</html>
we can access the session information we set on the first page.
Links for Server 1 :
http://thycart.in/adaptyapp/1.php
http://thycart.in/adaptyapp/2.php
Links for Server 2 :(not working)
http://103.231.209.162:60070/1.php
http://103.231.209.162:60070/2.php
PHP Info Server 1: http://thycart.in/adaptyapp/phpinfo.php
PHP Info Server 2: http://103.231.209.162:60070/phpinfo.php
For some reason the session is not working in one server.Please help to find the reason.Thanks