<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"; "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> 
<?php
$errorMessage = $this->exception->getMessage();
$displayThrow = true;
if(strstr($errorMessage, 'session has already been started') != null)
{
	$errorMessage = $this->translate("<br>Atmail requires <strong>session.auto_start</strong> to be set to false in your php.ini.<br>Please correct this by ensuring the following line in php configuration and restarting webserver:<br><br>session.auto_start = 0<br>");
	$displayThrow = false;
}
else
{
	echo $errorMessage; 
}
?>
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>  
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

	<link rel="stylesheet" href="<?php echo $this->siteBaseUrl; ?>css/ui.css?<?php echo Zend_registry::get('config')->global['version'] ?>" type="text/css" media="screen, print" />
	<link rel="stylesheet" href="<?php echo $this->siteBaseUrl ?>css/webmail.css?<?php echo Zend_registry::get('config')->global['version'] ?>" type="text/css" media="screen, print" />
	
  <title><?php print $this->translate('An error occurred')?></title> 
</head> 
<body> 
  <h1><?php print $this->translate('An error occurred')?></h1>
<?php if($this->exception->getMessage() == 'Access denied'): 
		echo $this->exception->getMessage();
	  else : 
?> 
  <h2><?php echo $this->message ?></h2> 
 
  <?php if ('development' == $this->env || true): ?> 
  <h3><?php print $this->translate('Exception information:')?></h3> 
  <p> 
      <b>Message:</b> <?php echo $this->exception->getMessage() ?> 
  </p> 
 
  <strong>Thrown in:</strong> <?php echo $this->exception->getFile() . ', Line #:' . $this->exception->getLine() . ', Code #: ' . $this->exception->getCode() ?>
  <h3><?php print $this->translate('Stack trace:')?></h3> 
  <pre><?php echo $this->exception->getTraceAsString() ?></pre> 
 
  <h3><?php print $this->translate('Request Parameters:')?></h3> 
  <pre><?php echo $this->request->getParams() ?></pre> 
  <?php endif ?>
<?php
//echo '<pre><h1>request</h1>' . htmlentities(print_r($this->request, true), ENT_QUOTES) . '</pre>';
//echo '<pre><h1>response</h1>' . htmlentities(print_r($this->response, true), ENT_QUOTES) . '</pre>';
//echo '<pre><h1>_REQUEST</h1>' . htmlentities(print_r($_REQUEST, true), ENT_QUOTES) . '</pre>';
//echo '<pre><h1>_SESSION</h1>' . htmlentities(print_r($_SESSION, true), ENT_QUOTES) . '</pre>';
//echo '<pre><h1>this</h1>' . htmlentities(print_r($this, true), ENT_QUOTES) . '</pre>';
//echo '<pre><h1>this</h1>' . htmlentities(print_r($this->exception, true), ENT_QUOTES) . '</pre>';


?>
<?php endif ?> 
</body> 
</html>
