Hi,
first time it is happening this to me;
so I installed apache and php 4.1.2 , I put the path to session files and
when I put something in $_SESSION the file is created but is empty.
If I try to put with session_register() or with $HTTP_SESSION_VARS
it works. Why? This is a problem because it is and because I have to
change a site which of course is using $_SESSION, as it should.
Thanks,
whiteadi
[SOLVED] $_SESSION doesn't work
Moderator: General Moderators
upgrade
unless you have a specific reason to use version 4.1.2 you should upgrade your version to the latest 4.x.x version or even to the latest 5.x.x version.
I'm not sure about the version you are using but usually you have to start the session
ex. form manual http://uk2.php.net/session
to use the sessions.
try it and see what happens.
I'm not sure about the version you are using but usually you have to start the session
Code: Select all
<?php
session_start();
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
} else {
$_SESSION['count']++;
}
?>to use the sessions.
try it and see what happens.
found it
4.1.2 has a bug related to $_SESSION,
I put other version and works now.
I put other version and works now.