self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
include /home/todos/public_html/vendor/composer/ClassLoader.php, line 576 Composer\Autoload\{closure} /home/todos/public_html/vendor/composer/ClassLoader.php, line 576 Composer\Autoload\ClassLoader::loadClass() /home/todos/public_html/vendor/composer/ClassLoader.php, line 427 class_exists [internal], line ?? Cake\Core\App::_classExistsInBase() /home/todos/public_html/vendor/cakephp/cakephp/src/Core/App.php, line 161 Cake\Core\App::className() /home/todos/public_html/vendor/cakephp/cakephp/src/Core/App.php, line 68 Cake\Controller\ControllerFactory::getControllerClass() /home/todos/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 337 Cake\Controller\ControllerFactory::create() /home/todos/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 72 Cake\Http\BaseApplication::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 318 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Authentication\Middleware\AuthenticationMiddleware::process() /home/todos/public_html/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 124 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Middleware\BodyParserMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Routing\Middleware\RoutingMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 186 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Routing\Middleware\AssetMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 68 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 131 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/todos/public_html/webroot/index.php, line 44
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
include /home/todos/public_html/vendor/composer/ClassLoader.php, line 576 Composer\Autoload\{closure} /home/todos/public_html/vendor/composer/ClassLoader.php, line 576 Composer\Autoload\ClassLoader::loadClass() /home/todos/public_html/vendor/composer/ClassLoader.php, line 427 class_exists [internal], line ?? Cake\Core\App::_classExistsInBase() /home/todos/public_html/vendor/cakephp/cakephp/src/Core/App.php, line 161 Cake\Core\App::className() /home/todos/public_html/vendor/cakephp/cakephp/src/Core/App.php, line 68 Cake\Controller\ControllerFactory::getControllerClass() /home/todos/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 337 Cake\Controller\ControllerFactory::create() /home/todos/public_html/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 72 Cake\Http\BaseApplication::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 318 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Authentication\Middleware\AuthenticationMiddleware::process() /home/todos/public_html/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 124 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Middleware\BodyParserMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Routing\Middleware\RoutingMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 186 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Routing\Middleware\AssetMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 68 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Error\Middleware\ErrorHandlerMiddleware::process() /home/todos/public_html/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 131 Cake\Http\Runner::handle() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner::run() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Server::run() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 90 [main] /home/todos/public_html/webroot/index.php, line 44
$message = "Unable to emit headers. Headers sent in file=$file line=$line";
trigger_error($message, E_USER_WARNING);
}
Cake\Http\ResponseEmitter::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\Server::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/todos/public_html/webroot/index.php, line 44
$response->getStatusCode(),
($reasonPhrase ? ' ' . $reasonPhrase : '')
));
header [internal], line ?? Cake\Http\ResponseEmitter::emitStatusLine() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 168 Cake\Http\ResponseEmitter::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\Server::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/todos/public_html/webroot/index.php, line 44
foreach ($values as $value) {
header(sprintf(
'%s: %s',
header [internal], line ?? Cake\Http\ResponseEmitter::emitHeaders() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\Server::emit() /home/todos/public_html/vendor/cakephp/cakephp/src/Http/Server.php, line 128 [main] /home/todos/public_html/webroot/index.php, line 44
Error WebController could not be found.
public function create(ServerRequestInterface $request): Controller
|
|
{
|
|
$className = $this->getControllerClass($request);
|
|
if ($className === null) {
|
|
throw $this->missingController($request);
|
|
}
|
|
|
|
$reflection = new ReflectionClass($className);
|
|
if ($reflection->isAbstract()) {
|
if (Router::getRequest() !== $request) {
|
|
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 '
|
$request = $request->withAttribute('authentication', $service);
|
|
$request = $request->withAttribute('authenticationResult', $result);
|
|
|
|
try {
|
|
$response = $handler->handle($request);
|
|
$authenticator = $service->getAuthenticationProvider();
|
|
|
|
if ($authenticator !== null && !$authenticator instanceof StatelessInterface) {
|
|
$return = $service->persistIdentity($request, $response, $result->getData());
|
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);
|
|
}
|
|
|
|
$middleware = new MiddlewareQueue($matching);
|
|
$runner = new Runner();
|
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 (strpos($url, '..') !== false || strpos($url, '.') === false) {
|
|
return $handler->handle($request);
|
|
}
|
|
|
|
if (strpos($url, '/.') !== false) {
|
|
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, $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);
|
) {
|
|
Router::setRequest($request);
|
|
}
|
|
|
|
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()); |
|
|
In the case you tried to access a plugin controller make sure you added it to your composer file or you use the autoload option for the plugin.
Suggestion Create the class WebController below in file: src/Controller/WebController.php
<?php
namespace App\Controller;
use App\Controller\AppController;
class WebController extends AppController
{
}
If you want to customize this error message, create templates/Error/missing_controller.php