user2632980
user2632980

Reputation: 551

PHP session is empty jquery ajax

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.

Upvotes: 0

Views: 129

Answers (1)

Sasanka Panguluri
Sasanka Panguluri

Reputation: 3128

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);

Upvotes: 1

Related Questions