at coding php...
PLEASE, someone tell what I have wrong...
I know you are tired of me posting about this session crap and TRUST me, I am tired of writing about it.
My session variable is not able to be accessed once it is written to the session file.
Example:
<?php
session_start();
function insertstats() {
if (!isset($ses_visitorid)) {
session_register('ses_visitorid');
global $ses_visitorid;
$ses_visitorid = $newvisitorid;
echo "insert id:" . $ses_visitorid;
}
}
fuction trackvisitor() {
echo "track id:" . $ses_visitorid;
}
The code will display the id in insertstats()
BUT WILL not display the id in trackvisitor()!!!!!
I don't know why it does not, DO YOU?
version of php 4.0.6
Here is my php.ini setting for sessions:
[Session]
session.save_handler = files
;session.save_path = c:\temp
session.save_path = /home/oldpraguemarket/www/ses
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
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"
ANY HELP WOULD BE MUCH APPRECIATED