Jump to content


Photo

Fatal Error: Class Not Found


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 Jeffer Menezes

Jeffer Menezes

    Turista

  • Usuários
  • 25 posts
  • Sexo:Não informado

Posted 13/04/2013, 11:37

Erro:

Fatal error: Class 'Model_Assinatura' not found in /home/transesp/zfprojetcs/membro/Bootstrap.php on line 28

Bootstrap.php:

<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
		function _initDisableMagicQuotes(){
		if (get_magic_quotes_gpc()) {
			$process = array(&$_GET, &$_POST, &$_COOKIE, &$_REQUEST);
			while (list($key, $val) = each($process)) {
				foreach ($val as $k => $v) {
					unset($process[$key][$k]);
					if (is_array($v)) {
						$process[$key][stripslashes($k)] = $v;
						$process[] = &$process[$key][stripslashes($k)];
					} else {
						$process[$key][stripslashes($k)] = stripslashes($v);
					}
				}
			}
			unset($process);
		}
	}
	
	function _initRegistry(){
		Zend_Loader_Autoloader::getInstance();
		$resource = $this->getPluginResource('db');
    	$db = $resource->getDbAdapter();
	    Zend_Registry::set("db", $db);
	    $modelAssinatura = new Model_Assinatura();
	    $modelAssinatura->desativaAssinaturas();
	}
	
	function _initSession(){
		 $siteSession = new Zend_Session_Namespace('site');
		 Zend_Registry::set("session", $siteSession);
	}
	
	function _initPagSeguroLibray(){
		require_once 'PagSeguroLibrary/PagSeguroLibrary.php';
		
	}
	
	function _initLog(){
		$stream = @fopen(APPLICATION_PATH.'/log/general.log', 'a', false);
		if (! $stream) {
			throw new Exception('Failed to open stream');
		}
		$writer = new Zend_Log_Writer_Stream($stream);
		$logger = new Zend_Log($writer);
		Zend_Registry::set("logger", $logger);
	}
	
	function _initSite(){
		if(!defined('IS_SITE')) return;
		$this->Bootstrap('registry');
		$this->Bootstrap('session');
		$this->Bootstrap('disableMagicQuotes');
	}
}

Application.ini:

[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
appnamespace = '';

resources.frontController.moduleDirectory = APPLICATION_PATH "/"

resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

resources.view.doctype = "HTML5"
resources.view.charset = "ISO-8859-1"

resources.locale.default = "pt_BR"
resources.locale.force = true

resources.db.adapter = "PDO_MYSQL"
resources.db.params.dbname = "nome_db_assinantes"
resources.db.params.host = "localhost"
resources.db.params.username = "nome_usuario"
resources.db.params.password = "senha"
resources.db.params.isDefaultTableAdapter  = true

resources.mail.transport.type = "smtp"
resources.mail.transport.host = "mail.boyclub.com.br"
resources.mail.transport.auth = "login"
resources.mail.transport.username = "nome_user"
resources.mail.transport.password = "senha"
resources.mail.transport.register = true; True by default
resources.mail.transport.port = 26

resources.mail.defaultFrom.email = "email@email.com.br"
resources.mail.defaultFrom.name = "nome"      

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
resources.frontController.params.displayExceptions = 1





1 user(s) are reading this topic

0 membro(s), 1 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq