Session 与memcache一起使用重定向后,不会显示会话变量包

Session 与memcache一起使用重定向后,不会显示会话变量包,session,memcached,php,Session,Memcached,Php,我有一个页面session_config.php,在该页面中我有以下代码 session_name(“session_sw”); 会话_start(); $session_ID=session_ID(); 我有另一个页面index.php,其中包括session_config.php,代码如下 $email=$\u请求['email']; $pass=$_请求['pass']; $error=0; 如果(!empty($email)&&!empty($pass)){ $url=“$SERVER

我有一个页面session_config.php,在该页面中我有以下代码

session_name(“session_sw”);
会话_start();
$session_ID=session_ID();
我有另一个页面index.php,其中包括session_config.php,代码如下

$email=$\u请求['email'];
$pass=$_请求['pass'];
$error=0;
如果(!empty($email)&&!empty($pass)){
$url=“$SERVER/sw/api/3rdpartylogin.php?广告客户登录=1&pass=$pass&email=$email”;
$resp=file_get_contents($url);//它发送json编码的字符串。
$resp=json_解码($resp);
如果($resp->status=='success'){
如果(!isset($resp->mesg->profile)| |$resp->mesg->profile==0){
$error='1';
}否则{
包括“session_config.php”;
$\会话['user\u id']=$resp->mesg->user\u id;
$\会话['customer\u id']=$resp->mesg->customer\u id;
$\会话['customer\u name']=$resp->mesg->customer\u name;
$会话['logged_in_user_email']=$请求['email'];
$\会话['agency\ u name']=$resp->mesg->agency\ u name;
$\会话['profile']=$resp->mesg->profile;
$\会话['metadata']=$resp->mesg->metadata;
$\u会话['show\u archive']=$resp->mesg->show\u archive;
$\u会话['show\u live']=$resp->mesg->show\u live;
$\会话['show\u sov']=$resp->mesg->show\u sov;
$\u SESSION[$SESSION\u ID]['SESSION\u name']='surewaves\u agency\u view';
标题(“Location:reach.php”);退出;
}
}否则{
$error='1';
}
}
?>
//在这里,我可以在“$resp”变量中获取正确的数据,并且它正在重定向到reach.php 在reach.php中,我有以下代码


尝试从session.save\u路径中删除
http://
部分,并将
localhost
替换为
127.0.0.1

请看第二个示例

session.save_path = "127.0.0.1:11211"