I have a PHP site in which am capturing some values from the POST parameters and few values from request headers and storing them in PHP session ($_SESSION). On clicking on Submit button, a captch validation happens and then the values are fetched from session and the required API is called. Everything works fine with Chrome browser, but with Firefox browser the session ID is getting changed when its trying to fetch the session values, hence not able to fetch the values.
This is my sample code how am initializing the session.
<?php
error_reporting(E_ERROR | E_PARSE);
$logging=true;
ini_set('session.save_path', '/var/www/html/sessionID/');
ini_set("log_errors", 1);
ini_set("error_log", "/var/www/html/whitelabel_logging/direct_act_logs.txt");
require_once('/var/www/html/user-register-temp-properties.php');
date_default_timezone_set('Asia/Myanmar');
$whl_header_msisdn="null";
$language="EN";
$headers = apache_request_headers();
$transaction_rand="";
if(!session_id()) {
if(isset($_POST['whlsd']) && !empty($_POST['whlsd'])){
session_start($_POST['whlsd']);
}else{
session_start();
}
}
?>