Hello -
I'm having a real problem with sessions... I can't seem to get them working.
Here's my code:
<?php
error_reporting(E_ALL);
session_start();
if (!isset($HTTP_SESSION_VARS["count"])) {
print "registering session...";
$count = 1;
session_register("count"
} else {
print "session registered!";
$HTTP_SESSION_VARS["count"]++;
print $HTTP_SESSION_VARS["count"];
}
?>
each time I hit refresh it prints out "registering session...", and no errors show up on screen.
here's what my php.ini looks like (the session stuff):
[Session]
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
and ls -l /tmp looks like
drwxrwxrwt 12 root root 1024 Dec 10 16:12 tmp/
Any suggestions???
TIA leo
------------
Leo Mendoza
lmendoza@students.depaul.edu
I'm having a real problem with sessions... I can't seem to get them working.
Here's my code:
<?php
error_reporting(E_ALL);
session_start();
if (!isset($HTTP_SESSION_VARS["count"])) {
print "registering session...";
$count = 1;
session_register("count"
} else {
print "session registered!";
$HTTP_SESSION_VARS["count"]++;
print $HTTP_SESSION_VARS["count"];
}
?>
each time I hit refresh it prints out "registering session...", and no errors show up on screen.
here's what my php.ini looks like (the session stuff):
[Session]
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
and ls -l /tmp looks like
drwxrwxrwt 12 root root 1024 Dec 10 16:12 tmp/
Any suggestions???
TIA leo
------------
Leo Mendoza
lmendoza@students.depaul.edu