| Server IP : 172.67.178.83 / Your IP : 216.73.217.141 Web Server : Apache System : Linux hosting01.arsenalhost.com 4.18.0-425.13.1.lve.el8.x86_64 #1 SMP Mon Feb 27 15:23:24 EST 2023 x86_64 User : corbizre ( 1013) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/corbizre/gotofindhomes.com3/components/Site/Controllers/ |
Upload File : |
<?php
/**
* Documentation
* @author
* @category
* @package
* @subpackage
* @copyright Copyright (c) 2005-2009 ITCrimea Ukraine Inc. (http://www.itcrimea.com)
* @license
*/
class Site_ErrorController extends System_Controller_Base
{
/**
* Documentation
* @author
* @return mixed
*/
public function init()
{
$this->initView();
$this->view->User_ID = $this->getRequest()->getParam('User_ID');
}
/**
* Documentation
* @author
* @return mixed
*/
public function errorAction()
{
$errors = $this->_getParam('error_handler');
if ($errors->type == Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER){
$this->_forward('error404');
return;
}
if ($errors->type == Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION){
$this->_forward('error404');
return;
}
$exception = $errors->exception;
if ($exception->getCode() == 404){
$this->_forward('error404');
return;
}
$log = new Zend_Log(
new Zend_Log_Writer_Stream(
Zend_Registry::get('AppFolder') . '/logs/error.log'
)
);
$log->debug($exception->getMessage() . "\n" .
"REQUEST: " .print_r($_REQUEST, true) .
"URL: " . $_SERVER['REQUEST_URI'] . "\n" .
$exception->getTraceAsString() . "\n");
if ($exception->getCode() == 403){
$this->_forward('error403');
return;
}
$this->_forward('error501');
}
/**
* Documentation
* @author
* @return mixed
*/
public function error404Action()
{
$this->getResponse()->clearBody();
$this->getResponse()
->setRawHeader('HTTP/1.1 404 Not Found');
$errors = $this->_getParam('error_handler');
$this->view->Exception = $errors->exception;
}
/**
* Documentation
* @author
* @return mixed
*/
public function error403Action()
{
$this->getResponse()->clearBody();
$this->getResponse()
->setRawHeader('HTTP/1.1 403 Access Denied');
$this->addErrorMessage('Sorry, You are not authorized to view this page. Please register or login.');
$errors = $this->_getParam('error_handler');
$this->view->Exception = $errors->exception;
}
/**
* Documentation
* @author
* @return mixed
*/
public function error501Action()
{
$this->getResponse()->clearBody();
$this->getResponse()
->setRawHeader('HTTP/1.1 501 System Error');
$errors = $this->_getParam('error_handler');
$this->view->Exception = $errors->exception;
}
}