Jump to content

php session starts but wont store session variable


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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...