Click to See Complete Forum and Search --> : Linux: sessions not working


Rory
09-23-2002, 07:02 AM
I am trying to get sessions working on Linux, Apache 1.3.26 and PHP 4.1.2 (Debian testing).

<?php
session_start();
session_register('hits');
++$hits;
echo $hits;
?>

simply produces the number 1 after reloading the page several times.
The session_id() function registers a valid session code (I can find the session file in my /tmp directory).

Any help hugely appreciated.
Thanks
Rory

hand
09-23-2002, 01:20 PM
php.ini: check all [Session] parameters

dotwebbie
09-23-2002, 01:27 PM
Do you have register_globals on or off? Which version of php by the way?

Rory
09-23-2002, 01:42 PM
Thanks for the replies - it appears that the version of php I was running (on powerpc) was broken.

All works fine now!

dotwebbie
09-23-2002, 01:51 PM
Good. :)