By default PHP comes with session support enabled. But if PHP session is not accepting cookies then session cookie support can be turned on automatically at the site level, or manually in each PHP page script: Turning on session support automatically at the site level we have to modify some setting in php.ini file. you can get php.ini file in the folder you install PHP. To your sessions, you have to set or reset the following parameter in your php.ini file
There are some more setting which may be used to modify your Sessions. For more Details refer php.ini
Browser Blocking Cookies?
Check your browser default settings and see if it accepting cookies. By default all browser allow accept cookies. But sometimes third party internet security or browser extensions can prevent accepting cookies. Permission of those app has to be changed to allow cookies in browser so script works normally.
Invalid Session Token?