I was able to resolve the issue. The issue was with the PHP session save path. After running the below code saved as a php file, I discovered that there are several .htaccess, .user.ini, php.ini, files in the home directory that were created by cPanel and include incorrect session save path. I corrected the path and saved the files. WHMCS login works fine after that. Check all the .ini files in the home directory and public_html
<?php
if (file_exists('init.php')) {
require('init.php');
} elseif (file_exists('../init.php')) {
require('../init.php');
} else {
echo "Init File not Found";
}
session_start();
$_SESSION["count"]++;
print_r($_SESSION);
$session_save_path = ini_get('session.save_path');
if(is_writable($session_save_path)){
echo "<p>PHP session.save_path $session_save_path is writable</p>";
}
else {
echo "<p>PHP session.save_path $session_save_path is NOT writable</p>";
}