RedisException
read error on connection RedisException thrown with message "read error on connection" Stacktrace: #8 RedisException in /home/deploy/EHungry-2-boyan/Web/classes/Cache.class.php:140 #7 Redis:get in /home/deploy/EHungry-2-boyan/Web/classes/Cache.class.php:140 #6 Cache:Get in /home/deploy/EHungry-2-boyan/Web/classes/Cache.class.php:120 #5 Cache:GetType in /home/deploy/EHungry-2-boyan/Web/classes/Cache.class.php:106 #4 Cache:GetArray in /home/deploy/EHungry-2-boyan/Web/classes/Restaurant.class.php:1859 #3 Restaurant:getAllMenus in /home/deploy/EHungry-2-boyan/Web/classes/Restaurant.class.php:1899 #2 Restaurant:getActiveMenus in /home/deploy/EHungry-2-boyan/Web/model3.0/customer/ordering3.php:136 #1 include_once in /home/deploy/EHungry-2-boyan/Web/controllers/customer.php:840 #0 require in /home/deploy/EHungry-2-boyan/Web/index.php:49
Stack frames (9)
8
RedisException
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
140
7
Redis
get
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
140
6
Cache
Get
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
120
5
Cache
GetType
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
106
4
Cache
GetArray
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Restaurant.class.php
1859
3
Restaurant
getAllMenus
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Restaurant.class.php
1899
2
Restaurant
getActiveMenus
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
model3.0
/
customer
/
ordering3.php
136
1
include_once
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
controllers
/
customer.php
840
0
require
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
index.php
49
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
        if ($r) {
            $uco = unserialize($r);
            $typeFunc = 'is_'.$type;
            if ($typeFunc($uco) || ($allowNull && is_null($uco))) {
                return $uco;
            }
        }
        return $notFoundResult;
    }
 
    public static function Get($key) {
        if (array_key_exists($key, static::$requestCache)) {
            $r = static::$requestCache[$key];
            $r = static::afterGet($r);
            App::cacheHit($key);
            return $r;
        }
 
        if ($i = static::getInstance()) {
            if ($r = $i->get($key)) {
                //if a key has been used more than 3 times, store it in the in-memory request cache.
                //We don't store every cache load in-memory, otherwise we might run out of memory on some pages (eg if they load every account)
                if (!array_key_exists($key, static::$requestCount)) {
                    static::$requestCount[$key] = 0;
                }
                static::$requestCount[$key]++;
                if (static::$requestCount[$key] > 3) {
                    static::$requestCache[$key] = $r;
                }
                $r = static::afterGet($r);
                App::cacheHit($key);
            } else {
                App::cacheMiss($key);
            }
            return $r;
        }
        return false;
    }
 
    /**
Arguments
  1. "read error on connection"
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
        if ($r) {
            $uco = unserialize($r);
            $typeFunc = 'is_'.$type;
            if ($typeFunc($uco) || ($allowNull && is_null($uco))) {
                return $uco;
            }
        }
        return $notFoundResult;
    }
 
    public static function Get($key) {
        if (array_key_exists($key, static::$requestCache)) {
            $r = static::$requestCache[$key];
            $r = static::afterGet($r);
            App::cacheHit($key);
            return $r;
        }
 
        if ($i = static::getInstance()) {
            if ($r = $i->get($key)) {
                //if a key has been used more than 3 times, store it in the in-memory request cache.
                //We don't store every cache load in-memory, otherwise we might run out of memory on some pages (eg if they load every account)
                if (!array_key_exists($key, static::$requestCount)) {
                    static::$requestCount[$key] = 0;
                }
                static::$requestCount[$key]++;
                if (static::$requestCount[$key] > 3) {
                    static::$requestCache[$key] = $r;
                }
                $r = static::afterGet($r);
                App::cacheHit($key);
            } else {
                App::cacheMiss($key);
            }
            return $r;
        }
        return false;
    }
 
    /**
Arguments
  1. "rmenus_7654_0"
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
     * @param  string $key
     * @param bool    $allowNull
     * @return bool|array|null
     */
    public static function GetArray($key, $allowNull = false) {
        return static::GetType('array', $key, $allowNull);
    }
 
    /**
     * This one can either return a boolean when key is found, or a null if key isn't found. So you need to check the
     * result with with is_bool() or is_null().
     * @param string $key The key to lookup
     * @return bool|null
     */
    public static function GetBoolean($key) {
        return static::GetType('bool', $key, false, null);
    }
 
    private static function GetType($type, $key, $allowNull, $notFoundResult = false) {
        $r = static::Get($key);
        if ($r) {
            $uco = unserialize($r);
            $typeFunc = 'is_'.$type;
            if ($typeFunc($uco) || ($allowNull && is_null($uco))) {
                return $uco;
            }
        }
        return $notFoundResult;
    }
 
    public static function Get($key) {
        if (array_key_exists($key, static::$requestCache)) {
            $r = static::$requestCache[$key];
            $r = static::afterGet($r);
            App::cacheHit($key);
            return $r;
        }
 
        if ($i = static::getInstance()) {
            if ($r = $i->get($key)) {
Arguments
  1. "rmenus_7654_0"
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Cache.class.php
    }
 
    /**
     * Returns object if found in cache, otherwise false. Can also return null if found in cache and null allowed
     * @param  string $key
     * @param bool    $allowNull
     * @return bool|object|null
     */
    public static function GetObject($key, $allowNull = false) {
        return static::GetType('object', $key, $allowNull);
    }
 
    /**
     * Returns array if found in cache, otherwise false. Can also return null if found in cache and null allowed
     * @param  string $key
     * @param bool    $allowNull
     * @return bool|array|null
     */
    public static function GetArray($key, $allowNull = false) {
        return static::GetType('array', $key, $allowNull);
    }
 
    /**
     * This one can either return a boolean when key is found, or a null if key isn't found. So you need to check the
     * result with with is_bool() or is_null().
     * @param string $key The key to lookup
     * @return bool|null
     */
    public static function GetBoolean($key) {
        return static::GetType('bool', $key, false, null);
    }
 
    private static function GetType($type, $key, $allowNull, $notFoundResult = false) {
        $r = static::Get($key);
        if ($r) {
            $uco = unserialize($r);
            $typeFunc = 'is_'.$type;
            if ($typeFunc($uco) || ($allowNull && is_null($uco))) {
                return $uco;
            }
Arguments
  1. "array"
    
  2. "rmenus_7654_0"
    
  3. false
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Restaurant.class.php
        }
    }
 
    public function sortMenus($a, $b) {
        if ($a->getPriority() == $b->getPriority()) {
            return 0;
        } elseif ($a->getPriority() > $b->getPriority()) {
            return 1;
        } else {
            return -1;
        }
    }
 
    /**
     * @param false $withHidden
     * @return Menu[]
     */
    public function getAllMenus($withHidden = false) {
        $cacheKey = 'rmenus_'.$this->getId().'_'.($withHidden? '1' : '0');
        $co = Cache::GetArray($cacheKey);
        if (!$co) {
            $db_conn = DB::conn();
            $co = [];
            $sql = "SELECT menu_id FROM ".MenuRestaurant::getTableName()." WHERE restaurant_id = ?";
            $db_conn->bindParameter($sql, 1, $this->getId(), "integer");
            $result = $db_conn->query($sql);
            if ($result && $result->rowCount() > 0) {
                while ($row = $result->fetch()) {
                    $m = new Menu($row["menu_id"]);
                    if ($withHidden || !$m->getIsHidden()) {
                        $co[] = $m;
                    }
                }
            }
            usort($co, ["Restaurant", "sortMenus"]);
            Cache::SetArray($cacheKey, $co);
        }
        if (!empty($_REQUEST['hidden_menu']) && is_object($_REQUEST['hidden_menu'])) {
            $found = false;
            foreach ($co as $m) {
Arguments
  1. "rmenus_7654_0"
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
classes
/
Restaurant.class.php
                if ($m->id == $_REQUEST['hidden_menu']->id) {
                    $found = true;
                    break;
                }
            }
            if (!$found) {
                $co[] = $_REQUEST['hidden_menu'];
                usort($co, ["Restaurant", "sortMenus"]);
            }
        }
        return $co;
    }
 
    /**
     * Gets menus that are currently active (does not check day-of-the-week or time of day availability)
     * @return Menu[]
     */
    public function getActiveMenus($withHidden = false): array {
        return array_values(array_filter(
            $this->getAllMenus($withHidden),
            function ($menu) {
                return $this->isMenuActive($menu);
            }
        ));
    }
 
    public function isMenuActive(Menu $menu): bool {
        return $menu->isCurrentlyActive($this);
    }
 
    public function getDefaultMenu(): ?Menu {
        $menus = $this->getAllMenus();
        $menu = null;
 
        if ($this->getSelectMenuFromCurrentTime()) {
            $menu = $this->getMenuByCurrentTime($menus);
        }
 
        // try to return a menu that is active and not hidden
        for ($i = 0, $count = count($menus); $i < $count && is_null($menu); $i++) {
Arguments
  1. false
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
model3.0
/
customer
/
ordering3.php
            $unavail = [];
            $unavailable_menu_ids = [];
            foreach ($unavailableMenuItemsInfo as $info) {
                if ($info['category_id'] == $category->id || $category->id == -1) {
                    $unavail[] = 'div.menuItem_'.$info['menu_item_id'];
                    $unavail[] = 'li.menuItem_'.$info['menu_item_id'];
                    $unavailable_menu_ids[] = $info['menu_item_id'];
                }
            }
            if (count($unavail) > 0) {
                $unavail = '<style type="text/css">'.join(', ', $unavail).' {display:none !important;}</style>';
            } else {
                unset($unavail);
            }
 
            // Page description and title
            $pageDescription = 'Order '.mb_strtolower($category->getDisplayName()).' online from '.$account->getDisplayName().' '.($orderTypeText?'for '.$orderTypeText:'').'. The best '.$restaurant->getCuisineType().' in '.$restaurant->getCity().', '.$restaurant->getState().'.';
            $_REQUEST['_PAGETITLE'] = $category->getDisplayName();
 
            $menus = $restaurant->getActiveMenus();
            if (count($menus) > 1) {
                $_REQUEST['_PAGETITLE'] .= ' | ' . $menu->getDisplayName();
            }
 
            $restaurants = $account->getActiveRestaurants();
            if (count($restaurants) > 1 && $restaurant->getDisplayName() != $account->getDisplayName()) {
                $_REQUEST['_PAGETITLE'] .= ' | ' . $restaurant->getDisplayName();
            }
 
            $_REQUEST['_PAGETITLE_FULL'] = true;
 
            // We check whether the SEO description is enabled to determine whether to show the SEO message or not
            if ($account->getSeoDescriptionDisabled()) {
                // SEO description is disabled
                $_REQUEST['_PAGEH2'] = "";
            } else {
                // SEO description is enabled
                $_REQUEST['_PAGEH2'] = $pageDescription;
            }
            $_REQUEST['_PAGEDESCRIPTION'] = $pageDescription;
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
controllers
/
customer.php
 
        $cart->setDefaultOrderType($account, $restaurant);
 
        $cart->setDefaultFees($account, $restaurant);
    }
 
    $restaurantRequiredPages = [
        'login',
        'customerorders'
    ];
    if (is_null($restaurant) && in_array($_REQUEST['form'], $restaurantRequiredPages)) {
        redirectTo('home');
    }
 
    $modelPath = CORE_PATH . 'model4.0/customer/'.$_REQUEST['form'].'.php';
} else {
    $_REQUEST['mobiledetect'] = new Mobile_Detect;
}
if (is_readable($modelPath)) {
    include_once($modelPath);
}
App::debugbarTime("model '{$_REQUEST['form']}'");
 
$custom_nav = CustomNavigationTab::getAllForAccount($account->getId());
 
$view2HideRightColumns = ['checkout', 'dashboard', 'customerdetails', 'customerorders',
                                'mydeliveryaddresses', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword',
                                'customerorderdetails', 'editcustomer', 'adddeliveryaddress',
                                'editlocation', 'orderconfirmation','viewcart', 'map', 'validatecallback'];
if (in_array($_REQUEST['form'], $view2HideRightColumns)) {
    $hideRightColumn = true;
}
 
$myAccountPages = ['accountsettings', 'dashboard', 'customerdetails', 'customerorders', 'editaddress', 'editcustomer', 'mydeliveryaddresses', 'editlocation', 'emailpreferences', 'mycoupons', 'mycreditcards', 'mypassword', 'adddeliveryaddress', 'map', 'myloyalty'];
if (in_array($_REQUEST['form'], $myAccountPages)) {
    $isMyAccountPage = true;
}
 
if (!isset($cart) || !is_object($cart)) {
    $GLOBALS['cart'] = \Cart::getCurrent();
Arguments
  1. "/home/deploy/EHungry-2-boyan/Web/model3.0/customer/ordering3.php"
    
/
home
/
deploy
/
EHungry-2-boyan
/
Web
/
index.php
    echo 'OK';
    exit;
}
 
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
 
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
 
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
    require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");
 
Arguments
  1. "/home/deploy/EHungry-2-boyan/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
empty
empty
Key Value
PHPSESSID
"fjfv1tm7dfq3vaf2q04ruor78v"
Key Value
loc
"en_US"
customer_account_id
74259
cart
Cart {}
restaurant_id
7654
app_banner_shown
true
menu_id
9759
status
array:2 [
  1 => []
  2 => array:1 [
    0 => "The system encountered an error! Check logs for details."
  ]
]
Key Value
UNIQUE_ID
"as4eqHPR_7OkP02VIH_3EQAAAAQ"
SCRIPT_URL
"/restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
SCRIPT_URI
"http://www.springroll.com.2.boyan.ehungry.net/restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
SPRINGROLL_LISTING_GLOBAL_CONCURRENCY
"35"
HTTP_HOST
"www.springroll.com.2.boyan.ehungry.net"
HTTP_X_REAL_IP
"216.73.217.146"
HTTP_X_FORWARDED_FOR
"216.73.217.146"
HTTP_SCHEME
"https"
HTTP_EHENV
"TODO"
HTTP_ACCEPT
"*/*"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_ACCEPT_ENCODING
"gzip, br, zstd, deflate"
HTTP_COOKIE
"PHPSESSID=fjfv1tm7dfq3vaf2q04ruor78v"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
SERVER_SIGNATURE
""
SERVER_SOFTWARE
"Apache/2.4.69 () mod_wsgi/4.6.5 Python/3.7 PHP/7.2.34"
SERVER_NAME
"www.springroll.com.2.boyan.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-2-boyan/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-2-boyan/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-2-boyan/Web/index.php"
REMOTE_PORT
"43034"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.1"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
REQUEST_URI
"/restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
SCRIPT_NAME
"/restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
PHP_SELF
"/restaurant/tastegrillboone/order/main-menu/lunch-combination/l5-hunan-chicken"
REQUEST_TIME_FLOAT
1791893160.423
REQUEST_TIME
1791893160
empty
0. Whoops\Handler\PrettyPageHandler

Fatal error: Uncaught RedisException: Connection lost in [no active file]:0 Stack trace: #0 {main} thrown in [no active file] on line 0