pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    <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="ft5nftb" 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>

        “會話已經(jīng)開始……"Zend Framework 應用程序中

        quot;session has already been started....quot; exception in Zend Framework application(“會話已經(jīng)開始……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="rhxjrf5" 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. 本文介紹了“會話已經(jīng)開始……"Zend Framework 應用程序中的異常的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

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

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

                  致命錯誤:未捕獲的異常帶有消息的Zend_Session_Exception"'會話已經(jīng)由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 并在我的本地服務器上運行良好,但在生產(chǎn)服務器上我收到了前面的錯誤,但不是每次都如此.

                  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 函數(shù):

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

                  我已經(jīng)嘗試只在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() 還沒有被調(diào)用.

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

                  問題是必須在會話開始之前調(diào)用 Zend_Session::start().但是,由于 session.autostart 是 0(順便說一句,這是在 php.ini 中而不是 .htaccess 中),您可能已經(jīng)編寫了 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. 刪除所有出現(xiàn),但只有一個.要注意它是否已經(jīng)啟動,請設置 error_reporting(E_ALL|E_STRICT);
                  2. 在所有地方用 Zend_Session::start(); 替換它

                  如果你不能找到所有的出現(xiàn),找到一個 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)

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

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

                  相關文檔推薦

                  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 找不到驅(qū)動程序)
                    • <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="hvvdt7d" 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. 主站蜘蛛池模板: 户外-组合-幼儿园-不锈钢-儿童-滑滑梯-床-玩具-淘气堡-厂家-价格 | 成都热收缩包装机_袖口式膜包机_高速塑封机价格_全自动封切机器_大型套膜机厂家 | 国产液相色谱仪-超高效液相色谱仪厂家-上海伍丰科学仪器有限公司 | 美缝剂_美缝剂厂家_美缝剂加盟-地老板高端瓷砖美缝剂 | 空气净化器租赁,空气净化器出租,全国直租_奥司汀净化器租赁 | 胶原检测试剂盒,弹性蛋白检测试剂盒,类克ELISA试剂盒,阿达木单抗ELISA试剂盒-北京群晓科苑生物技术有限公司 | 无线讲解器-导游讲解器-自助讲解器-分区讲解系统 品牌生产厂家[鹰米讲解-合肥市徽马信息科技有限公司] | 不锈钢酒柜|恒温酒柜|酒柜定制|酒窖定制-上海啸瑞实业有限公司 | 澳门精准正版免费大全,2025新澳门全年免费,新澳天天开奖免费资料大全最新,新澳2025今晚开奖资料,新澳马今天最快最新图库 | 污水处理设备-海普欧环保集团有限公司| 恒温恒湿箱(药品/保健品/食品/半导体/细菌)-兰贝石(北京)科技有限公司 | 砂尘试验箱_淋雨试验房_冰水冲击试验箱_IPX9K淋雨试验箱_广州岳信试验设备有限公司 | 引领中高档酒店加盟_含舍·美素酒店品牌官网 | 耐磨焊丝,堆焊焊丝,耐磨药芯焊丝,碳化钨焊丝-北京耐默公司 | 山东锐智科电检测仪器有限公司_超声波测厚仪,涂层测厚仪,里氏硬度计,电火花检漏仪,地下管线探测仪 | 立式矫直机_卧式矫直机-无锡金矫机械制造有限公司 | 仿真茅草_人造茅草瓦价格_仿真茅草厂家_仿真茅草供应-深圳市科佰工贸有限公司 | 设定时间记录电子秤-自动累计储存电子秤-昆山巨天仪器设备有限公司 | 电池挤压试验机-自行车喷淋-车辆碾压试验装置-深圳德迈盛测控设备有限公司 | 根系分析仪,大米外观品质检测仪,考种仪,藻类鉴定计数仪,叶面积仪,菌落计数仪,抑菌圈测量仪,抗生素效价测定仪,植物表型仪,冠层分析仪-杭州万深检测仪器网 | 四川实木门_成都实木门 - 蓬溪聚成门业有限公司 | Q361F全焊接球阀,200X减压稳压阀,ZJHP气动单座调节阀-上海戎钛 | 全自动定氮仪-半自动凯氏定氮仪厂家-祎鸿仪器 | 福建成考网-福建成人高考网| 安规_综合测试仪,电器安全性能综合测试仪,低压母线槽安规综合测试仪-青岛合众电子有限公司 | 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 - 杭州标识标牌|文化墙|展厅|导视|户内外广告|发光字|灯箱|铭阳制作公司 | 不锈钢电动球阀_气动高压闸阀_旋塞疏水调节阀_全立阀门-来自温州工业阀门巨头企业 | 探伤仪,漆膜厚度测试仪,轮胎花纹深度尺厂家-淄博创宇电子 | 艾默生变频器,艾默生ct,变频器,ct驱动器,广州艾默生变频器,供水专用变频器,风机变频器,电梯变频器,艾默生变频器代理-广州市盟雄贸易有限公司官方网站-艾默生变频器应用解决方案服务商 | 空气净化器租赁,空气净化器出租,全国直租_奥司汀净化器租赁 | 艺术涂料_进口艺术涂料_艺术涂料加盟_艺术涂料十大品牌 -英国蒙太奇艺术涂料 | 地磅-电子地磅维修-电子吊秤-汽车衡-无人值守系统-公路治超-鹰牌衡器 | 周口风机|周风风机|河南省周口通用风机厂 | 玉米深加工机械,玉米加工设备,玉米加工机械等玉米深加工设备制造商-河南成立粮油机械有限公司 | 逗网红-抖音网红-快手网红-各大平台网红物品导航 | YJLV22铝芯铠装电缆-MYPTJ矿用高压橡套电缆-天津市电缆总厂 | sus630/303cu不锈钢棒,440C/430F/17-4ph不锈钢研磨棒-江苏德镍金属科技有限公司 | 南京展台搭建-南京展会设计-南京展览设计公司-南京展厅展示设计-南京汇雅展览工程有限公司 | 周易算网-八字测算网 - 周易算网-宝宝起名取名测名字周易八字测算网 | 液氮罐(生物液氮罐)百科-无锡爱思科 | 手术室净化厂家_成都实验室装修公司_无尘车间施工单位_洁净室工程建设团队-四川华锐16年行业经验 |