{switch(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)){
Cake\Error\ErrorTrap->handleError() /home/w-bdash/www/public_html/src/Controller/AppController.php, line 67 App\Controller\AppController->initialize() /home/w-bdash/www/public_html/src/Controller/UserAuthController.php, line 15 App\Controller\UserAuthController->initialize() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Controller/Controller.php, line 237 Cake\Controller\Controller->__construct() [internal], line ?? ReflectionClass->newInstance() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 111 Cake\Controller\ControllerFactory->create() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 360 Cake\Http\BaseApplication->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 159 Cake\Http\Middleware\CsrfProtectionMiddleware->process() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Middleware\BodyParserMiddleware->process() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 118 Cake\Routing\Middleware\RoutingMiddleware->process() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 69 Cake\Routing\Middleware\AssetMiddleware->process() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 115 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 60 Cake\Http\Runner->run() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 104 Cake\Http\Server->run() /home/w-bdash/www/public_html/webroot/index.php, line 37 [main]
$message = "Unable to emit headers. Headers sent in file={$file} line={$line}";trigger_error($message, E_USER_WARNING);}
Cake\Error\ErrorTrap->handleError() [internal], line ?? /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65 Cake\Http\ResponseEmitter->emit() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /home/w-bdash/www/public_html/webroot/index.php, line 37 [main]
$reasonPhrase = $response->getReasonPhrase();header(sprintf('HTTP/%s %d%s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 159 Cake\Http\ResponseEmitter->emitStatusLine() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 68 Cake\Http\ResponseEmitter->emit() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /home/w-bdash/www/public_html/webroot/index.php, line 37 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
Cake\Error\ErrorTrap->handleError() [internal], line ?? /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192 Cake\Http\ResponseEmitter->emitHeaders() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 69 Cake\Http\ResponseEmitter->emit() /home/w-bdash/www/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 148 Cake\Http\Server->emit() /home/w-bdash/www/public_html/webroot/index.php, line 37 [main]
} |
|
|
|
if(!$this->session->check("locale")) |
|
{ |
|
switch(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) |
|
{ |
|
case "ja": |
|
I18n::setLocale('ja'); |
|
break; |
} |
|
|
|
if(!$this->session->check("locale")) |
|
{ |
|
switch(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) |
|
{ |
|
case "ja": |
|
I18n::setLocale('ja'); |
|
break; |
class UserAuthController extends AppController |
|
{ |
|
public function initialize(): void |
|
{ |
|
parent::initialize(); |
|
$this->loadComponent("SystemFunctions"); |
|
//$this->loadComponent("SendEmail"); |
|
//$this->data = $this->request->getParsedBody(); |
|
//public $data = $this->request->getParsedBody(); |
$tableAlias = ($plugin ? $plugin . '.' : '') . $this->name; |
|
$this->defaultTable = $tableAlias; |
|
} |
|
|
|
$this->initialize(); |
|
|
|
$this->getEventManager()->on($this); |
|
} |
|
|
break; |
|
} |
|
} |
|
if ($hasComponents) { |
|
$controller = $reflection->newInstance(request: $request, components: $components); |
|
} else { |
|
$controller = $reflection->newInstance($request); |
|
} |
|
} |
assert($request instanceof ServerRequest); |
|
Router::setRequest($request); |
|
} |
|
|
|
$controller = $this->controllerFactory->create($request); |
|
|
|
return $this->controllerFactory->invoke($controller); |
|
} |
|
} |
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
|
} |
|
|
|
return new Response([ |
|
'body' => 'Middleware queue was exhausted without returning a response ' |
|
|
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
$response = $handler->handle($request); |
|
|
|
return $this->_addTokenCookie($token, $request, $response); |
|
} |
|
|
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
if (!in_array($request->getMethod(), $this->methods, true)) { |
|
return $handler->handle($request); |
|
} |
|
[$type] = explode(';', $request->getHeaderLine('Content-Type')); |
|
$type = strtolower($type); |
|
if (!isset($this->parsers[$type])) { |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
); |
|
} |
|
$matching = Router::getRouteCollection()->getMiddleware($middleware); |
|
if (!$matching) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$container = $this->app instanceof ContainerApplicationInterface |
|
? $this->app->getContainer() |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
$url = $request->getUri()->getPath(); |
|
if (str_contains($url, '..') || !str_contains($url, '.')) { |
|
return $handler->handle($request); |
|
} |
|
|
|
if (str_contains($url, '/.')) { |
|
return $handler->handle($request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
*/ |
|
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
|
{ |
|
try { |
|
return $handler->handle($request); |
|
} catch (RedirectException $exception) { |
|
return $this->handleRedirect($exception); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, Router::getRequest() ?? $request); |
if ($this->queue->valid()) { |
|
$middleware = $this->queue->current(); |
|
$this->queue->next(); |
|
|
|
return $middleware->process($request, $this); |
|
} |
|
|
|
if ($this->fallbackHandler) { |
|
return $this->fallbackHandler->handle($request); |
$this->queue = $queue; |
|
$this->queue->rewind(); |
|
$this->fallbackHandler = $fallbackHandler; |
|
|
|
return $this->handle($request); |
|
} |
|
|
|
/** |
|
* Handle incoming server request and return a response. |
} |
|
|
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
|
|
$response = $this->runner->run($middleware, $request, $this->app); |
|
|
|
if ($request instanceof ServerRequest) { |
|
$request->getSession()->close(); |
|
} |
// Bind your application to the server. |
|
$server = new Server(new Application(dirname(__DIR__) . '/config')); |
|
|
|
// Run the request/response through the application and emit the response. |
|
$server->emit($server->run()); |
|
|
If you want to customize this error message, create templates/Error/error500.php