hi all!
I can't get sessinos to work properly and hope someone can help.
This is a test I did, with a simple file, page.php.
page.php
<?php
session_register(visits);
// just to get a zero instead of a empty string
if(!$visits)
$visits = 0;
$visits++;
echo "<html><body bgcolor=\"green\">You have been here ".$visits." times.</body></html>";
?>
and the output I get is always 1 (one visits even though I refresh the webpage). There is also a additional warning, here is the output I get:
<html><head></head><body bgcolor="green">You have been here 1 times.<br>
<b>Warning</b>: Unknown(): Your script possibly relies on a session side-effect
which existed until PHP 4.2.3. Please be advised that the session extension
does not consider global variables as a source of data, unless register_globals
is enabled. You can disable this functionality and this warning by setting
session.bug_compat_42 or session.bug_compat_warn to off, respectively. in
<b>Unknown</b> on line <b>0</b><br></body></html>
My register_globals is set to off, I'm uing PHP 4.3.0 and it's compiled for Linux/GNU Debian, probably quite much a standard installation.
I also have a few more problems that can be related, for example I never get any output from $PHP_SELF.
Any help and suggestions are appreciated!
/Rick