0

I have set secure cookie in Apache based on this tutorial.

But php session resets on every page load.

for example this sample code:

<?php
session_start();
echo session_id();
?>

displays different session id on every refresh page.

php page is running on ssl page (https://)

Please advice how can fix it?

Metalik
  • 157
  • 1
  • 2
  • 10
  • 1
    How did you configure PHP's session storage? – Michael Hampton Mar 01 '15 at 13:22
  • @MichaelHampton /var/lib/php/session no problem on session create files. – Metalik Mar 02 '15 at 06:08
  • 1
    Check that your browser is actually sending the cookie that was set on the first request. – Gustavo Maia Mar 03 '15 at 13:24
  • @GustavoMaia This problem occurs on every computer, every browser, every where and not limited to my own browser. – Metalik Mar 04 '15 at 05:07
  • Oh yes, I'd expect that. I guess I didn't phrase my question clearly. What I mean is, the browser will store the cookie sent in a Set-Cookie header and will later send this cookie on subsequent requests. I'm asking you to check whether this is happening correctly, so that we can understand if the problem lies in the browser-side or in the server-side. – Gustavo Maia Mar 05 '15 at 12:42

0 Answers0