0

I have moved my site to a new hosting where PHP is 5.3.23.

Now when I call a page with ajax, it do not have a session.

<?php
session_start();

var_dump($_SESSION);
?>

session returns nothing.

1
  • Show your ajax request code Commented Sep 28, 2013 at 14:30

1 Answer 1

1

You should specify some session parameters before you want to print them

Also, var_dump() function always displays null for $_SESSIONS. Use

 Print_r ($_SESSION);
Sign up to request clarification or add additional context in comments.

1 Comment

Session parameters have been already specified, but print_r($_SESSION); shows Array ( ).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.