hello everyone....i need your help
i face session lost problem so many times and every times i just find out other logic to implement the code in different ways. but i don't get a perfect solution.Please help me to resolve this............why it was happened.....
i searched google for it.........this is the common problem but i dont get any proper solution..............
recently i write a code to fetch tweets from twitter..but when returning back from .i lost my session value.........
supp this is my page page.php
when user click on button........i just check the form submitted like this
session_start();
$_SESSION['id']=$id; //supp $id=10
if($_POST['submit'])
{
header("Location:tweet.php ");
}
i already included session_start() at the top of every page.
in tweet.php i just generate a token and send user to twitter for authorization.
in tweet.php i checked session started
i check it with
Print_r($_SESSION);
in this page i used session like this
session_start();
if($_SESSION['id'])
{
header("Location:$url") //$url will be authoritarian url generated by twitter oauth..
}else
{
header("Location:index.php")
}
after returning from twitter some times session variable are not lost.but sometimes i lost my session.this really irritates me....if logic is wrong then every time session destroyed...............
i check my php.ini file configuration..
session_save.path=/tmp; //by default
register global are off.................
any help is appreciated................



Reply With Quote



Bookmarks