0

My website was working fine till I rebooted my server. PHP is not saving sessions... well kinda. I can see the sessions in the session dir and new ones are made when people try to login but when I var dump $_SESSION I get array(0) { } I have tried chmoding the session folder, re installing php.

This is a dedicated server and not shared.

Any suggestions?

Thanks

  • If your make var_dump() of the `$_SESSION` variable it gives 0 when nothing is saved in there! But this doesn't mean that the session is not set – Rizier123 Oct 27 '14 at 22:09

1 Answers1

0

I think this is what you mean:

Also if your wondering how long the default session lifetime (24 mins) is here is some more information: PHP : What is the default lifetime of a session

<?php

    session_start();

    var_dump($_SESSION);

    $_SESSION['information'] = "Test information";

    var_dump($_SESSION);

?>

Output

array(0) { }
array(1) { ["information"]=> string(16) "Test information" } 
Community
  • 1
  • 1
Rizier123
  • 58,877
  • 16
  • 101
  • 156