Closed alphanso-dev closed 5 years ago
Please show me your source code.
Hi, did you find a solution for this problem? that happens to me too. Returns a 500.
You must Change the code the header Status Strings with this
const HEADER_STATUS_STRINGS = [
'405' => 'HTTP/1.1 405 Method Not Allowed',
'400' => 'BAD REQUEST',
'408' => 'Request Timeout',
'404' => 'NOT FOUND',
'402' => 'BAD PARAM',
'422' => 'BAD PARAM',
'401' => 'UNAUTHORIZED',
'200' => 'OK',
];
const HEADER_STATUS_STRINGS = [
'405' => 'HTTP/1.1 405 Method Not Allowed',
'400' => 'HTTP/1.1 400 Bad Request',
'408' => 'HTTP/1.1 408 Request Timeout',
'404' => 'HTTP/1.1 404 Not Found',
'402' => 'HTTP/1.1 402 Payment Required',
'422' => 'HTTP/1.1 422 Unprocessable Entity',
'401' => 'HTTP/1.1 401 Unauthorized',
'200' => 'HTTP/1.1 200 OK',
];
hi,
CodeIgniter-API-Controller is working on my local system is properly but on my live server, it's getting 500 erro on response function, i comment "header(self::HEADER_STATUS_STRINGS[$http_code], true, $http_code);" this on live it's working but auth can't set.