doulu8847 2014-05-30 13:12
浏览 72

无法启动会话:已经为PHP PHP SDK启动了PHP($ _SESSION已设置)

I'm implementing facebook app in symfony. I used facebook php SDK

When I call

$me=$facebook->api("/me");

    if(isset($me['id']))
        $response=$facebook->api("/".$me['id']."/notifications",
                "POST",
                array (
                        'access_token'=>$accesstoken,
                        'href' => 'notification',
                        'template' => $message,
                ));

In Symfony action I'm getting:

Failed to start the session: already started by PHP ($_SESSION is set) 

How can I solve this issue?

  • 写回答

2条回答 默认 最新

  • duanmi1900 2014-06-02 17:26
    关注

    You add a @ sign in from of session_start() to suppress the error. This way, you can keep the line of code incase the session wasn't previously started, but the error will be hidden in case it was already started:

    @session_start();
    
    评论

报告相同问题?

悬赏问题

  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源