以下代码从我的控制器运行,并在一台服务器上导致502错误坏网关。我无法在我的服务器上重现。 502 Bad Gateway的原因是什么?
function index()
{
$this->_reload();
}
function _reload($data=array())
{
$person_info = $this->Employee->get_logged_in_employee_info();
$data['cart']=$this->sale_lib->get_cart();
$data['modes']=array('sale'=>$this->lang->line('sales_sale'),'return'=>$this->lang->line('sales_return'));
$data['mode']=$this->sale_lib->get_mode();
$data['items_in_cart'] = $this->sale_lib->get_items_in_cart();
$data['subtotal']=$this->sale_lib->get_subtotal();
$data['taxes']=$this->sale_lib->get_taxes();
$data['total']=$this->sale_lib->get_total();
$data['items_module_allowed'] = $this->Employee->has_permission('items', $person_info->person_id);
$data['comment'] = $this->sale_lib->get_comment();
$data['email_receipt'] = $this->sale_lib->get_email_receipt();
$data['payments_total']=$this->sale_lib->get_payments_total();
$data['amount_due']=$this->sale_lib->get_amount_due();
$data['payments']=$this->sale_lib->get_payments();
$data['payment_options']=array(
$this->lang->line('sales_cash') => $this->lang->line('sales_cash'),
$this->lang->line('sales_check') => $this->lang->line('sales_check'),
$this->lang->line('sales_giftcard') => $this->lang->line('sales_giftcard'),
$this->lang->line('sales_debit') => $this->lang->line('sales_debit'),
$this->lang->line('sales_credit') => $this->lang->line('sales_credit')
);
$customer_id=$this->sale_lib->get_customer();
if($customer_id!=-1)
{
$info=$this->Customer->get_info($customer_id);
$data['customer']=$info->first_name.' '.$info->last_name;
$data['customer_email']=$info->email;
}
$data['payments_cover_total'] = $this->_payments_cover_total();
$this->load->view("sales/register",$data);
}
答案 0 :(得分:4)
答案 1 :(得分:2)
这是一个NGINX / CI问题,如果您无法更改设置,那么将会话更改为为我工作的数据库
$config['sess_use_database'] = TRUE;
答案 2 :(得分:0)
它可能是一个有缺陷的加密库。尝试设置:
$config[‘sess_encrypt_cookie’] = FALSE;