×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Massimo Zappino
Added: Mar 23, 2012 10:39 AM
Modified: Mar 23, 2012 10:39 AM
Views: 138
The __PHP_Incomplete_Class error appear when PHP is not able to recognize the class of the serialized object.
The Zend Framework Bootstrap.php must call the _initAutoloader() function before Zend_Session::start().
  1. // Bootstrap.php
  2.  
  3.     protected function _initAutoloader()
  4.     {
  5.         /* Zend Autoloader */
  6.         require_once 'Zend/Loader/Autoloader.php';
  7.  
  8.         $loader = Zend_Loader_Autoloader::getInstance()
  9.                 ->setFallbackAutoloader(true);
  10.     }
  11.  
  12.     /**
  13.      * Start session
  14.      * Must be called after _initAutoloader()
  15.      */
  16.     protected function _initCoreSession()
  17.     {
  18.         $this->bootstrap('db');
  19.         $this->bootstrap('session');
  20.         Zend_Session::start();
  21.     }