Michael Meckelein wrote:
> From: "victor"
>
>>Hi
>>
>>I'm having trouble getting sessions to work on my server.
>>
>>It's working on my univeristy account so I assume that there is
>
> nothing
>
>>wrong with the code.
>>
>>This is what my phpinfo(); is on my server
>> http://victor.is-a-geek.com/about/
>>
>>This is what the phpinfo(); is on the university server
>> http://pages.cpsc.ucalgary.ca/~louiev/index.php
>>
>>Any help would be good. I'm running PHP 4.3.4, Apache 1.3 and
>
> Redhat
>
>>9.0 on my server.
>
>
> Dear victor,
>
> what kind of error get you (use: error_reporting(E_ALL))?
>
> Maybe not the session handling itself is the problem. I have noticed
> that
> you have on your server register_globals Off. On your uni server,
> register_globals is On! Maybe this affect your script.
>
> Keep in mind that register_globals off is recommend, and you should
> not turn
> it on!
>
> Michael
>
Hi
It's not really an error...its just that sessions don't seem to be
working.
I figure it wasn't the code. This is the counter code up on the top:
<?php
session_start();
session_register('hits');
++$hits;
?>
<html>
<head><title>this is stupid</title></head>
<body>
<p> This page has been viewed <?= $hits; ?> times. </p>
</body>
</html>
Victor