Example #1
0
 public static function publish($errno, $message, $file, $line)
 {
     $err_names = array(E_USER_ERROR => array('name' => 'ERROR', 'level' => 1), E_ERROR => array('name' => 'ERROR', 'level' => 1), E_USER_WARNING => array('name' => 'WARNING', 'level' => 2), E_WARNING => array('name' => 'WARNING', 'level' => 2), E_USER_NOTICE => array('name' => 'INFO', 'level' => 3), E_NOTICE => array('name' => 'INFO', 'level' => 3), E_STRICT => array('name' => 'DEBUG', 'level' => 4));
     if (isset($err_names[$errno])) {
         $err_name = $err_names[$errno]['name'];
         $log_Lv = $err_names[$errno]['level'];
     } else {
         $err_name = 'unknown error';
         $log_Lv = 4;
     }
     @AttoFilebaseLogger::logging($log_Lv, $err_name, array('errno' => $errno, 'message' => $message, 'file' => $file, 'line' => $line));
     switch ($errno) {
         case E_ERROR:
         case E_USER_ERROR:
         case E_CORE_ERROR:
         case E_COMPILE_ERROR:
             exit('ERROR : ' . $message);
     }
 }
Example #2
0
 public static function publish($e, $tag = 'Uncaught Exception')
 {
     @AttoFilebaseLogger::logging(4, $tag, array('message' => $e->getMessage(), 'Exception' => get_class($e), 'trace' => $e->getTraceAsString()));
 }
Example #3
0
 /**
  * isDisapproveFingerprint
  * 
  * @method isDisapproveFingerprint
  * @param string $salt 
  * @return boolean
  */
 public static function isDisapproveFingerprint($salt)
 {
     if (self::isNotExistsForFingerprint()) {
         return true;
     }
     $session_id = session_id();
     $fingerprint = self::_generateFingerprint($salt, $session_id);
     if ($fingerprint !== $_SESSION[self::FINGER_PRINT_KEY]) {
         AttoFilebaseLogger::logging(3, 'session hijack !?', array('host' => AttoHttpHelper::getRemoteHost(), '$_SERVER' => $_SERVER, '$_REQUEST' => $_REQUEST, '$_SESSION' => $_SESSION));
         unset($_SESSION[self::FINGER_PRINT_KEY]);
         return true;
     }
     return false;
 }