簡體   English   中英

由於 session 啟動而超過最大執行時間?

[英]Maximum execution time exceeds due to session start?

在我的引導文件中使用 Zend_Session::Start() 時出現以下錯誤。

Maximum execution time of 30 seconds exceeded in G:\wamp\library\Zend\Session.php on line 480

Zend\Session.php 代碼的第 480 行是

$startedCleanly = session_start();

由於它,瀏覽器會像永遠一樣永遠加載頁面,就像無限的while循環一樣。 語境

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

    protected $_config;
    protected $_acl;
    protected $_auth;

public function _initMyAutoloader()
{
    $autloader = Zend_Loader_Autoloader::getInstance();
    $autloader->pushAutoloader(new Zend_Application_Module_Autoloader(array('basePath'=>APPLICATION_PATH . '/','namespace'=>'')));
    return $autloader ;

}

public function _initMyConfig()
{
    Zend_Session::start();
    $this->_config = new Zend_Config($this->getOptions());
    Zend_Registry::set('config',$this->_config);
    return $this->_config;
}

謝謝。

Zend_Application_Resource_Session

http://framework.zend.com/manual/en/zend.application.available-resources.html

引導它是第一個

這不是因為 session,而是因為max_execution_time

max_execution_time可以在php.ini中設置,所以可以修改:

max_execution_time = 60     ; Maximum execution time of each script, in seconds

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM