Jump to content

php session starts but wont store session variable


lhigger

Recommended Posts

a.phpb.phpi am at wits end. start a session can see the id on page 1 and two.. can see the session file at /var/lib/php5 but it will not store a session variable.

i can echo the variable on page one. but not on page 2.

setup is ubuntu 14.04 and php 5.5.9

 

i made two very simple scripts and tried two different servers. there must be some config i have missed.

 

tried changing permissions that didn't help.

only thing i can think of is some php ini or apache config..

 

 

Link to comment
Share on other sites

Place session start above doc type. SESSION in capsThen do a var_dump on the session array and let us know

Edited by niche
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...