1

I am getting following error when I use Zend_Session::Start() in my bootstrap file.

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

On line 480 of Zend\Session.php code is

$startedCleanly = session_start();

The browser keeps loading the page like forever due to it , its like infinite while loop . Context

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

Thanks.

Mr Coder
  • 8,169
  • 5
  • 45
  • 74
  • Can you add some context for that line? (what comes before it?) – Matt Ellen Jun 14 '11 at 08:26
  • HM I had the same error once. It was because I was using Zend-Session with storing the information in a database. But I hadn't setup the database yet, to the point, where I started the session. Do you use the db-adapter for your session? – Fidi Jun 14 '11 at 08:28
  • @Matt Ellen I added the context – Mr Coder Jun 14 '11 at 08:49
  • @faileN no I am not using db adapter for session just the default adapter . – Mr Coder Jun 14 '11 at 08:50
  • i never use `Zend_Session::start();` why do you need it? however obviously the problem is somewhere in your rest code, it throws the error somewhere in a random place it happens to be in this line, but it is not what caused it – venimus Jun 14 '11 at 13:36

1 Answers1

-2

It's not because of session, but max_execution_time.

max_execution_time can be set in php.ini, so you can modify it:

max_execution_time = 60     ; Maximum execution time of each script, in seconds
flykobe
  • 135
  • 1
  • 5