Sessions only work in SSL
| From: | Daniel Houle | Date: | Tue, 19 Oct 2010 00:46:46 +0000 |
| Subject: | Sessions only work in SSL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-308824@lists.php.net to get a copy of this message | ||
I have a strange issue here. I am running a CentOS machine, with
apache 2.2.3
php 5.1.6
kernel 2.6.18-194.8.1.el5xen
My sessions will work using https, but not using simple http. I've compared my configs with another identical machine which works with both, and I can't figure out why. Anyone got an idea?
Here's the simple script I run to test.
<?php
session_start();
echo 'session started';
if (isset($_SESSION['name'])) {
echo '<br />' . $_SESSION['name'];
session_destroy();
} else {
echo '<br />No session found';
$_SESSION['name'] = 'My session';
}
phpinfo();
?>