久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <bdo id='9G0fC'></bdo><ul id='9G0fC'></ul>

  • <i id='9G0fC'><tr id='9G0fC'><dt id='9G0fC'><q id='9G0fC'><span id='9G0fC'><b id='9G0fC'><form id='9G0fC'><ins id='9G0fC'></ins><ul id='9G0fC'></ul><sub id='9G0fC'></sub></form><legend id='9G0fC'></legend><bdo id='9G0fC'><pre id='9G0fC'><center id='9G0fC'></center></pre></bdo></b><th id='9G0fC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9G0fC'><tfoot id='9G0fC'></tfoot><dl id='9G0fC'><fieldset id='9G0fC'></fieldset></dl></div>
    <legend id='9G0fC'><style id='9G0fC'><dir id='9G0fC'><q id='9G0fC'></q></dir></style></legend>

    1. <small id='9G0fC'></small><noframes id='9G0fC'>

        <tfoot id='9G0fC'></tfoot>

        “會話已經開始……"Zend Framework 應用程序中

        quot;session has already been started....quot; exception in Zend Framework application(“會話已經開始……Zend Framework 應用程序中的異常)

        • <bdo id='gBgNJ'></bdo><ul id='gBgNJ'></ul>
        • <legend id='gBgNJ'><style id='gBgNJ'><dir id='gBgNJ'><q id='gBgNJ'></q></dir></style></legend>
            <tbody id='gBgNJ'></tbody>

              <i id='gBgNJ'><tr id='gBgNJ'><dt id='gBgNJ'><q id='gBgNJ'><span id='gBgNJ'><b id='gBgNJ'><form id='gBgNJ'><ins id='gBgNJ'></ins><ul id='gBgNJ'></ul><sub id='gBgNJ'></sub></form><legend id='gBgNJ'></legend><bdo id='gBgNJ'><pre id='gBgNJ'><center id='gBgNJ'></center></pre></bdo></b><th id='gBgNJ'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gBgNJ'><tfoot id='gBgNJ'></tfoot><dl id='gBgNJ'><fieldset id='gBgNJ'></fieldset></dl></div>

              <tfoot id='gBgNJ'></tfoot>

              1. <small id='gBgNJ'></small><noframes id='gBgNJ'>

                1. 本文介紹了“會話已經開始……"Zend Framework 應用程序中的異常的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在嘗試加載 Zend Framework 應用程序時收到此錯誤:

                  I get this error when trying to load a Zend Framework application:

                  致命錯誤:未捕獲的異常帶有消息的Zend_Session_Exception"'會話已經由session.auto-start 或 session_start()'在/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php:462

                  Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()' in /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php:462

                  堆棧跟蹤:

                  #0/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session/Namespace.php(143):Zend_Session::start(true)

                  #0 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session/Namespace.php(143): Zend_Session::start(true)

                  #1/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth/Storage/Session.php(87):Zend_Session_Namespace->__construct('Zend_Auth')

                  #1 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth/Storage/Session.php(87): Zend_Session_Namespace->__construct('Zend_Auth')

                  #2/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(91):Zend_Auth_Storage_Session->__construct()

                  #2 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(91): Zend_Auth_Storage_Session->__construct()

                  #3/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(141):Zend_Auth->getStorage()

                  #3 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Auth.php(141): Zend_Auth->getStorage()

                  #4/www/htdocs/w00a1ed7/autospin/redaktion/application/layouts/scripts/layout.phtml(31):Zend_Auth->hasIdentity()

                  #4 /www/htdocs/w00a1ed7/autospin/redaktion/application/layouts/scripts/layout.phtml(31): Zend_Auth->hasIdentity()

                  #5/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View.php(108):包括('/www/htdocs/w00...')

                  #5 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View.php(108): include('/www/htdocs/w00...')

                  #6/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View/Abstract.php(831):Zend_View->_run('/www/htdocs/w00...')

                  #6 /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/View/Abstract.php(831): Zend_View->_run('/www/htdocs/w00...')

                  #7/www/htdocs/w00a1ed 在/www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php在線 462

                  #7 /www/htdocs/w00a1ed in /www/htdocs/w00a1ed7/autospin/redaktion/library/Zend/Session.php on line 462

                  我使用 Zend_Auth 并在我的本地服務器上運行良好,但在生產服務器上我收到了前面的錯誤,但不是每次都如此.

                  I Use Zend_Auth and on my local server and it works well, but on a production server I get the preceding error, but not every time.

                  我已檢查 .htaccess 文件中的 session.autostart 是否設置為 0.

                  I have checked that session.autostart is set to 0 in the .htaccess file.

                  我該如何解決這個錯誤?

                  How do I fix this error?

                  感謝您的回答,但我不會在任何地方使用 session_start().僅與采埃孚合作.

                  Thank you for your Answer, but I do not user session_start() anywhere. Work only with ZF.

                  我只在共享服務器上遇到這個問題,在我的本地服務器腳本上運行完美.

                  I Have this Problem only on shared server, on my local server script works perfectly.

                  我在此代碼中使用 INIT 函數:

                  I Use INIT Function with this code:

                  受保護的 $user;

                  protected $user;

                  public function init()
                  {   
                      if(!Zend_Auth::getInstance()->hasIdentity())
                      {
                          $this->_redirect('auth/login');
                      }else
                      {
                          $this->user = Zend_Auth::getInstance()->getIdentity();
                      }
                  }
                  

                  我已經嘗試只在indexAction中設置tis代碼,這樣其他action就不用去破解Auth了...但是還是有問題.

                  I allready try to set tis code only in indexAction, so that other actions do not have to chack the Auth... but still have problems.

                  有沒有辦法在 Action 中設置不檢查會話或類似這樣的想法?

                  Ist there a way to set in an Action to do not check about session or somethink like this?

                  最好的問候

                  推薦答案

                  事情就是這樣.Zend_Auth 嘗試開始一個新的會話,因為 Zend_Session::start() 還沒有被調用.

                  It's what it says it is. Zend_Auth tries to start a new session, since Zend_Session::start() has not yet been called.

                  問題是必須在會話開始之前調用 Zend_Session::start().但是,由于 session.autostart 是 0(順便說一句,這是在 php.ini 中而不是 .htaccess 中),您可能已經編寫了 session_start();某處.您不能這樣做,因為 ZF 希望完全控制會話,即您不應直接訪問全局會話變量.

                  The problem is that Zend_Session::start() has to be called before a session is started. But, since session.autostart is 0 (btw this is in php.ini not .htaccess), you have probably written session_start(); somewhere. You're not allowed to do that, since ZF wishes to have full control over sessions, i.e. you shouldn't access the global session variable directly.

                  要解決它,請在您的代碼文件中搜索 session_start() 和其中之一

                  To solve it, search your code files for session_start() and either

                  1. 刪除所有出現,但只有一個.要注意它是否已經啟動,請設置 error_reporting(E_ALL|E_STRICT);
                  2. 在所有地方用 Zend_Session::start(); 替換它

                  如果你不能找到所有的出現,找到一個 session_start();這會困擾您的 Zend_Auth::getInstance()->hasIdentity() 并使用以下代碼段快速解決問題

                  If you can't find all occurrences, find the one session_start(); that bothers your Zend_Auth::getInstance()->hasIdentity() and solve the problem quick n' dirty with the following snippet

                  try {
                      Zend_Session::start();
                  } catch(Zend_Session_Exception $e) {
                      session_start();
                  }
                  

                  如果您在整個應用程序中使用 ZF,我會選擇 2)

                  If you're using ZF in your whole application, I would go with 2)

                  這篇關于“會話已經開始……"Zend Framework 應用程序中的異常的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                    • <bdo id='m3AtG'></bdo><ul id='m3AtG'></ul>
                            <i id='m3AtG'><tr id='m3AtG'><dt id='m3AtG'><q id='m3AtG'><span id='m3AtG'><b id='m3AtG'><form id='m3AtG'><ins id='m3AtG'></ins><ul id='m3AtG'></ul><sub id='m3AtG'></sub></form><legend id='m3AtG'></legend><bdo id='m3AtG'><pre id='m3AtG'><center id='m3AtG'></center></pre></bdo></b><th id='m3AtG'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='m3AtG'><tfoot id='m3AtG'></tfoot><dl id='m3AtG'><fieldset id='m3AtG'></fieldset></dl></div>
                              <tbody id='m3AtG'></tbody>
                            <tfoot id='m3AtG'></tfoot>

                            <small id='m3AtG'></small><noframes id='m3AtG'>

                            <legend id='m3AtG'><style id='m3AtG'><dir id='m3AtG'><q id='m3AtG'></q></dir></style></legend>

                          1. 主站蜘蛛池模板: 亚洲欧美中文字幕 | 亚洲一区二区av在线 | 高清人人天天夜夜曰狠狠狠狠 | 91精品国产综合久久婷婷香蕉 | 日本涩涩网 | 日韩在线欧美 | 久久精品国产一区二区三区不卡 | 亚洲逼院 | 91大神在线看 | 久久精品久久久久久 | 久草青青| 免费在线观看av | 精品欧美乱码久久久久久 | 日韩视频免费看 | 国产午夜精品久久久 | 国产成人精品一区二区三区 | 国产1区2区3区 | 欧美区日韩区 | 日本精品视频一区二区 | 夜夜艹 | 夜夜夜夜夜夜曰天天天 | 黄视频网站免费观看 | 91免费小视频 | 特黄毛片视频 | 精品国产色 | 国产亚洲黄色片 | 成人免费视频观看视频 | 午夜爱爱网 | 干干干操操操 | 久久与欧美 | 二区三区在线观看 | 91在线观看免费 | 欧美精品首页 | 在线中文字幕av | 69电影网 | 嫩草视频免费 | 久久精品色欧美aⅴ一区二区 | 狠狠躁躁夜夜躁波多野结依 | 亚洲精品在线免费看 | 日本不卡一区二区三区在线观看 | 大陆一级毛片免费视频观看 |