Error:
Cart.phpController could not be found.
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/ControllerFactory.php
toggle arguments
|
strpos($controller, '/') !== false || |
|
strpos($controller, '.') !== false || |
|
$firstChar === strtolower($firstChar) |
|
) { |
|
$this->missingController($request); |
|
} |
|
|
|
return App::className($pluginPath . $controller, $namespace, 'Controller') ?: null; |
|
} |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/ControllerFactory.php
toggle arguments
|
* @throws \ReflectionException |
|
*/ |
|
public function create(ServerRequest $request, Response $response) |
|
{ |
|
$className = $this->getControllerClass($request); |
|
if (!$className) { |
|
$this->missingController($request); |
|
} |
|
$reflection = new ReflectionClass($className); |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/ActionDispatcher.php
toggle arguments
|
// event handler if there is one. |
|
if ($beforeEvent->getData('controller') instanceof Controller) { |
|
$controller = $beforeEvent->getData('controller'); |
|
} else { |
|
$controller = $this->factory->create($request, $response); |
|
} |
|
|
|
$response = $this->_invoke($controller); |
|
if ($request->getParam('return')) { |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/BaseApplication.php
toggle arguments
|
* @return \Psr\Http\Message\ResponseInterface |
|
*/ |
|
public function __invoke(ServerRequestInterface $request, ResponseInterface $response, $next) |
|
{ |
|
return $this->getDispatcher()->dispatch($request, $response); |
|
} |
|
|
|
/** |
|
* Get the ActionDispatcher. |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php
toggle arguments
|
$token = $this->_createToken(); |
|
$request = $this->_addTokenToRequest($token, $request); |
|
$response = $this->_addTokenCookie($token, $request, $response); |
|
|
|
return $next($request, $response); |
|
} |
|
$request = $this->_validateAndUnsetTokenField($request); |
|
|
|
return $next($request, $response); |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
{ |
|
$this->middleware = $middleware; |
|
$this->index = 0; |
|
|
|
return $this->__invoke($request, $response); |
|
} |
|
|
|
/** |
|
* @param \Psr\Http\Message\ServerRequestInterface $request The server request |
/var/www/pickuta/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php
toggle arguments
|
$matching[] = $next; |
|
$middleware = new MiddlewareQueue($matching); |
|
$runner = new Runner(); |
|
|
|
return $runner->run($middleware, $request, $response); |
|
} |
|
} |
|
|
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php
toggle arguments
|
} |
|
|
|
$assetFile = $this->_getAssetFile($url); |
|
if ($assetFile === null || !file_exists($assetFile)) { |
|
return $next($request, $response); |
|
} |
|
|
|
$file = new File($assetFile); |
|
$modifiedTime = $file->lastChange(); |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php
toggle arguments
|
*/ |
|
public function __invoke($request, $response, $next) |
|
{ |
|
try { |
|
return $next($request, $response); |
|
} catch (Throwable $exception) { |
|
return $this->handleException($exception, $request, $response); |
|
} catch (Exception $exception) { |
|
return $this->handleException($exception, $request, $response); |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
$next = $this->middleware->get($this->index); |
|
if ($next) { |
|
$this->index++; |
|
|
|
return $next($request, $response, $this); |
|
} |
|
|
|
// End of the queue |
|
return $response; |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Runner.php
toggle arguments
|
{ |
|
$this->middleware = $middleware; |
|
$this->index = 0; |
|
|
|
return $this->__invoke($request, $response); |
|
} |
|
|
|
/** |
|
* @param \Psr\Http\Message\ServerRequestInterface $request The server request |
/var/www/pickuta/vendor/cakephp/cakephp/src/Http/Server.php
toggle arguments
|
} |
|
$this->dispatchEvent('Server.buildMiddleware', ['middleware' => $middleware]); |
|
$middleware->add($this->app); |
|
|
|
$response = $this->runner->run($middleware, $request, $response); |
|
|
|
if (!($response instanceof ResponseInterface)) { |
|
throw new RuntimeException(sprintf( |
|
'Application did not create a response. Got "%s" instead.', |
/var/www/pickuta/webroot/index.php
toggle arguments
|
// 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.
Error:
Create the class Cart.phpController below in file: src/Controller/Cart.phpController.php
<?php
namespace App\Controller;
use App\Controller\AppController;
class Cart.phpController extends AppController
{
}
If you want to customize this error message, create
src/Template/Error/missing_controller.ctp