在引导程序文件中使用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;
}
谢谢。
这不是因为会话,而是因为max_execution_time
。
max_execution_time
可以在php.ini中设置,因此您可以修改它:
max_execution_time = 60 ; Maximum execution time of each script, in seconds