1

Just recently, my logon program failed. The reason is because the SESSION variable return array was empty. This part of my code has been stable for over a year. I asked support on this hosting service, and essentially he said that I was a hack.

I wrote the following short html code to test this (below). I loaded the same code on two additional hosting servers. I was only allowed to link one. All three servers have the session.save_path set to '/tmp'

This server site works: server 1

This server does not: server 2

My test codes:

html:

<?php
session_start();

$_SESSION['x']='KOPAY';
echo '<pre>';
var_dump($_SESSION);
echo '</pre>';
?>

<!DOCTYPE html>
<html>
<head>
    <title>TEST SESSION</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
  <div>
        <a href='view_session.php'>Show Session Variables</a>
    </div>
</body>
</html>

with its corresponding PHP

<?php
session_start();
echo('in php');
echo '<pre>';
var_dump($_SESSION);
echo '</pre>';
?>
cmk
  • 11
  • 1

0 Answers0