$browserLanguage = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
App\Controller\AppController->browserLanguageRedirect() /var/www/vhosts/girasolepietre.it/httpdocs/src/Controller/AppController.php, line 138 App\Controller\AppController->beforeFilter() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Event/EventManager.php, line 309 Cake\Event\EventManager->_callListener() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Event/EventManager.php, line 286 Cake\Event\EventManager->dispatch() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 92 Cake\Controller\Controller->dispatchEvent() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Controller/Controller.php, line 657 Cake\Controller\Controller->startupProcess() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 130 Cake\Controller\ControllerFactory->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Controller/ControllerFactory.php, line 115 Cake\Controller\ControllerFactory->invoke() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 325 Cake\Http\BaseApplication->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 86 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/authentication/src/Middleware/AuthenticationMiddleware.php, line 124 Authentication\Middleware\AuthenticationMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Middleware/CsrfProtectionMiddleware.php, line 166 Cake\Http\Middleware\CsrfProtectionMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Middleware/BodyParserMiddleware.php, line 157 Cake\Http\Middleware\BodyParserMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Routing/Middleware/RoutingMiddleware.php, line 189 Cake\Routing\Middleware\RoutingMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Routing/Middleware/AssetMiddleware.php, line 68 Cake\Routing\Middleware\AssetMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/src/Middleware/CachedAssetMiddleware.php, line 50 App\Middleware\CachedAssetMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/markstory/asset_compress/src/Middleware/AssetCompressMiddleware.php, line 63 AssetCompress\Middleware\AssetCompressMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 149 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Runner.php, line 67 Cake\Http\Runner->run() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Server.php, line 99 Cake\Http\Server->run() /var/www/vhosts/girasolepietre.it/httpdocs/webroot/index.php, line 40 [main]
$message = "Unable to emit headers. Headers sent in file=$file line=$line";
trigger_error($message, E_USER_WARNING);
}
/var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 71 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/vhosts/girasolepietre.it/httpdocs/webroot/index.php, line 40 [main]
$reasonPhrase = $response->getReasonPhrase();
header(sprintf(
'HTTP/%s %d%s',
/var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 164 Cake\Http\ResponseEmitter->emitStatusLine() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 74 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/vhosts/girasolepietre.it/httpdocs/webroot/index.php, line 40 [main]
foreach ($values as $value) {
header(sprintf(
'%s: %s',
/var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 197 Cake\Http\ResponseEmitter->emitHeaders() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 75 Cake\Http\ResponseEmitter->emit() /var/www/vhosts/girasolepietre.it/httpdocs/vendor/cakephp/cakephp/src/Http/Server.php, line 137 Cake\Http\Server->emit() /var/www/vhosts/girasolepietre.it/httpdocs/webroot/index.php, line 40 [main]
Error The action newMaterials is not defined in NewsController
Error Create NewsController::newMaterials() in file: /var/www/vhosts/girasolepietre.it/httpdocs/plugins/News/src/Controller/NewsController.php.
<?php
namespace News\Controller;
use News\Controller\AppController;
class NewsController extends AppController
{
public function newMaterials()
{
}
}
$request = $this->request; |
|
$action = $request->getParam('action'); |
|
|
|
if (!$this->isAction($action)) { |
|
throw new MissingActionException([ |
|
'controller' => $this->name . 'Controller', |
|
'action' => $request->getParam('action'), |
|
'prefix' => $request->getParam('prefix') ?: '', |
|
'plugin' => $request->getParam('plugin'), |
if ($result instanceof ResponseInterface) { |
|
return $result; |
|
} |
|
|
|
$action = $controller->getAction(); |
|
$args = $this->getActionArgs( |
|
$action, |
|
array_values((array)$controller->getRequest()->getParam('pass')) |
|
); |
|
|
return $runner->run($middlewareQueue, $controller->getRequest(), $this); |
|
} |
|
|
|
return $this->handle($controller->getRequest()); |
|
} |
|
|
|
/** |
|
* Invoke the action. |
|
|
// This is needed for auto-wiring. Should be removed in 5.x |
|
$container->add(ComponentRegistry::class, $controller->components()); |
|
|
|
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); |
if ($method === 'GET' && $cookieData === null) { |
|
$token = $this->createToken(); |
|
$request = $request->withAttribute('csrfToken', $this->saltToken($token)); |
|
/** @var mixed $response */ |
|
$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 (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); |
} |
|
|
|
// Calling $handler->handle() delegates control to the *next* middleware |
|
// In your application's queue. |
|
$response = $handler->handle($request); |
|
|
|
return $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); |
|
|
// Make sure the request looks like an asset. |
|
$targetName = $this->getName($config, $request->getUri()->getPath()); |
|
if (!$targetName) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$queryParams = $request->getQueryParams(); |
|
if (isset($queryParams['theme'])) { |
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()); |
|
|
If you want to customize this error message, create templates/Error/missing_action.php