$success = $this->_File->ftruncate(0) &&$this->_File->fwrite($contents) &&$this->_File->fflush();
SplFileObject->fwrite() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 139 Cake\Cache\Engine\FileEngine->set() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php, line 209 Cake\I18n\TranslatorRegistry->get() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php, line 253 Cake\I18n\TranslatorRegistry->createInstance() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php, line 238 Cake\I18n\TranslatorRegistry->_getTranslator() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php, line 208 Cake\I18n\TranslatorRegistry->get() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/I18n.php, line 149 Cake\I18n\I18n::getTranslator() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions.php, line 84 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions_global.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions_global.php, line 73 /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/users.php /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/users.php, line 88 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php, line 84 Cake\Core\Configure\Engine\PhpConfig->read() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure.php, line 339 Cake\Core\Configure::load() /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/bootstrap.php, line 17 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/BasePlugin.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/BasePlugin.php, line 276 Cake\Core\BasePlugin->bootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 198 Cake\Http\BaseApplication->pluginBootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 124 Cake\Http\Server->bootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 84 Cake\Http\Server->run() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
$success = $this->_File->ftruncate(0) &&$this->_File->fwrite($contents) &&$this->_File->fflush();
SplFileObject->fwrite() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Cache/Engine/FileEngine.php, line 139 Cake\Cache\Engine\FileEngine->set() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/TranslatorRegistry.php, line 209 Cake\I18n\TranslatorRegistry->get() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/I18n.php, line 149 Cake\I18n\I18n::getTranslator() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions.php, line 84 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions_global.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/I18n/functions_global.php, line 73 /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/users.php /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/users.php, line 88 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure/Engine/PhpConfig.php, line 84 Cake\Core\Configure\Engine\PhpConfig->read() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/Configure.php, line 339 Cake\Core\Configure::load() /home/applet/cake5.applet.com.br/vendor/cakedc/users/config/bootstrap.php, line 17 /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/BasePlugin.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Core/BasePlugin.php, line 276 Cake\Core\BasePlugin->bootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/BaseApplication.php, line 198 Cake\Http\BaseApplication->pluginBootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 124 Cake\Http\Server->bootstrap() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 84 Cake\Http\Server->run() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
if (!$mask) {file_put_contents($pathname, $message . "\n", FILE_APPEND);
/home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php, line 137 Cake\Log\Engine\FileLog->log() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Log/Log.php, line 381 Cake\Log\Log::write() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Log/Log.php, line 450 Cake\Log\Log::error() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Error/ErrorLogger.php, line 90 Cake\Error\ErrorLogger->logException() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Error/ExceptionTrap.php, line 354 Cake\Error\ExceptionTrap->logException() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 135 Cake\Error\Middleware\ErrorHandlerMiddleware->handleException() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Error/Middleware/ErrorHandlerMiddleware.php, line 119 Cake\Error\Middleware\ErrorHandlerMiddleware->process() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Runner.php, line 82 Cake\Http\Runner->handle() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Runner.php, line 60 Cake\Http\Runner->run() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 103 Cake\Http\Server->run() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
$message = "Unable to emit headers. Headers sent in file=$file line=$line";trigger_error($message, E_USER_WARNING);}
/home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 65 Cake\Http\ResponseEmitter->emit() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 139 Cake\Http\Server->emit() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
$response->getStatusCode(),($reasonPhrase ? ' ' . $reasonPhrase : '')));
/home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 163 Cake\Http\ResponseEmitter->emitStatusLine() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 68 Cake\Http\ResponseEmitter->emit() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 139 Cake\Http\Server->emit() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
foreach ($values as $value) {header(sprintf('%s: %s',
/home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 192 Cake\Http\ResponseEmitter->emitHeaders() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/ResponseEmitter.php, line 69 Cake\Http\ResponseEmitter->emit() /home/applet/cake5.applet.com.br/vendor/cakephp/cakephp/src/Http/Server.php, line 139 Cake\Http\Server->emit() /home/applet/cake5.applet.com.br/webroot/index.php, line 37 [main]
`CORE/src/Log/Engine/FileLog.php` on line `137`
📋
$this->headerSentInfo['line'] |
|
); |
|
} |
|
|
|
throw new CakeException($message); |
|
} |
|
|
|
if (!is_array($name)) { |
|
$name = [$name => $value]; |
protected function addFlashMessage(Session $session, $options): void |
|
{ |
|
$messages = (array)$session->read('Flash.flash'); |
|
$messages[] = $this->createFlashMessage($options); |
|
$session->write('Flash.flash', $messages); |
|
} |
|
|
|
/** |
|
* Create a flash message data. |
$response = parent::handle($exception, $request, $options); |
|
$session = $request->getAttribute('session'); |
|
if ($session instanceof Session) { |
|
$options['request'] = $request; |
|
$this->addFlashMessage($session, $options); |
|
} |
|
|
|
return $response; |
|
} |
|
|
$unauthorizedHandler = HandlerFactory::create($handler['className']); |
|
|
|
return $unauthorizedHandler->handle( |
|
$exception, |
|
$request, |
|
$handler |
|
); |
|
} |
} catch (Exception $exception) { |
|
$response = $this->handleException( |
|
$exception, |
|
$request, |
|
$this->getConfig('unauthorizedHandler') |
|
); |
|
} |
|
|
|
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); |
$request = $request->withAttribute('authentication', $service); |
|
$request = $request->withAttribute('authenticationResult', $result); |
|
|
|
try { |
|
$response = $handler->handle($request); |
|
$authenticator = $service->getAuthenticationProvider(); |
|
|
|
if ($authenticator !== null && !$authenticator instanceof StatelessInterface) { |
|
/** |
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)); |
|
$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); |
} |
|
|
|
$assetFile = $this->_getAssetFile($url); |
|
if ($assetFile === null || !is_file($assetFile)) { |
|
return $handler->handle($request); |
|
} |
|
|
|
$file = new SplFileInfo($assetFile); |
|
$modifiedTime = $file->getMTime(); |
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