0

I am using sessions to create temporary file download links. Every time a new request is made, the sessions reset. I found a thread talking about turning on session.cookie_secure. But whenever I try setting it to on or 1, it won't save.

Here is what I tried in the php file:

  • ini_set('session.cookie_secure', '1');
  • @ini_set('session.cookie_secure','1');
  • @ini_set('session.cookie_secure','On');

Here is what I tried in the php.ini file:

  • session.cookie_secure = 1
  • session.cookie_secure = on

Am I doing something wrong? What should I do to turn on session.cookie_secure? Is there something I could do instead of setting session.cookie_secure?

Parsa Yazdani
  • 164
  • 1
  • 11
  • If this configuration is enabled, you should only save the cookie to the client under https. Please confirm that you are using the https protocol? – Luna Jun 28 '19 at 09:14
  • Yes, https is enabled and enforced with http being redirected to https. – Parsa Yazdani Jun 28 '19 at 10:38

0 Answers0