Warning (2): file_get_contents(http://172.16.1.116/anexos/download/16948): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
[APP/Controller/AnexosController.php, line 40]Code Context
$file = file_get_contents($url);
$temp = sys_get_temp_dir().'/'.$name[count($name)-1];
$id = '16948'
$Anexos = object(App\Model\Table\AnexosTable) {
'registryAlias' => 'Anexos',
'table' => 'anexos',
'alias' => 'Anexos',
'entityClass' => 'App\Model\Entity\Anexo',
'associations' => [
(int) 0 => 'users',
(int) 1 => 'paginas',
(int) 2 => 'editais',
(int) 3 => 'legislacoes'
],
'behaviors' => [
(int) 0 => 'Timestamp'
],
'defaultConnection' => 'default',
'connectionName' => 'default'
}
$anexo = [
(int) 0 => object(App\Model\Entity\Anexo) {
'id' => (int) 16948,
'name' => 'anexos/paginas/uems_anexo_2024-03-22_16-04-25.pdf',
'titulo' => 'Ed. Nº 021/2024',
'nome_original' => 'EDITAL_021_2024_-_1ª_CHAMADA_Publica_sugestoes_dead_assinado_publicação.pdf',
'tipo_arquivo' => 'pdf',
'tamanho' => (int) 553499,
'user_created_id' => (int) 8871,
'created' => object(Cake\I18n\FrozenTime) {},
'user_modified_id' => null,
'modified' => object(Cake\I18n\FrozenTime) {},
'user_deleted_id' => (int) 8871,
'deleted' => object(Cake\I18n\FrozenTime) {},
'[new]' => false,
'[accessible]' => [
[maximum depth reached]
],
'[dirty]' => [[maximum depth reached]],
'[original]' => [[maximum depth reached]],
'[virtual]' => [[maximum depth reached]],
'[hasErrors]' => false,
'[errors]' => [[maximum depth reached]],
'[invalid]' => [[maximum depth reached]],
'[repository]' => 'Anexos'
}
]
$url = 'http://172.16.1.116/anexos/download/16948'
$name = [
(int) 0 => 'anexos',
(int) 1 => 'paginas',
(int) 2 => 'uems_anexo_2024-03-22_16-04-25.pdf'
]
$http_response_header = [
(int) 0 => 'HTTP/1.1 404 Not Found',
(int) 1 => 'Date: Wed, 04 Dec 2024 03:13:49 GMT',
(int) 2 => 'Server: Apache/2.4.38 (Debian)',
(int) 3 => 'Connection: close',
(int) 4 => 'Content-Type: text/html; charset=UTF-8'
]
file_get_contents - [internal], line ??
App\Controller\AnexosController::download() - APP/Controller/AnexosController.php, line 40
Cake\Controller\Controller::invokeAction() - CORE/src/Controller/Controller.php, line 524
Cake\Controller\ControllerFactory::invoke() - CORE/src/Controller/ControllerFactory.php, line 79
Cake\Http\BaseApplication::handle() - CORE/src/Http/BaseApplication.php, line 229
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 77
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 77
Cake\Http\Middleware\CsrfProtectionMiddleware::process() - CORE/src/Http/Middleware/CsrfProtectionMiddleware.php, line 122
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 73
Cake\Http\Runner::run() - CORE/src/Http/Runner.php, line 58
Cake\Routing\Middleware\RoutingMiddleware::process() - CORE/src/Routing/Middleware/RoutingMiddleware.php, line 162
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 73
Cake\Routing\Middleware\AssetMiddleware::process() - CORE/src/Routing/Middleware/AssetMiddleware.php, line 68
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 73
Cake\Error\Middleware\ErrorHandlerMiddleware::process() - CORE/src/Error/Middleware/ErrorHandlerMiddleware.php, line 118
Cake\Http\Runner::handle() - CORE/src/Http/Runner.php, line 73
Cake\Http\Runner::run() - CORE/src/Http/Runner.php, line 58
Warning (512): Unable to emit headers. Headers sent in file=/var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php line=831 [CORE/src/Http/ResponseEmitter.php, line 72]Code Context $message = "Unable to emit headers. Headers sent in file=$file line=$line";
trigger_error($message, E_USER_WARNING);
}
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$file = '/var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php'
$line = (int) 831
$message = 'Unable to emit headers. Headers sent in file=/var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php line=831'
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 72
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 169]Code Context $response->getStatusCode(),
($reasonPhrase ? ' ' . $reasonPhrase : '')
));
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$reasonPhrase = 'OK'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitStatusLine() - CORE/src/Http/ResponseEmitter.php, line 169
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 75
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 198]Code Context foreach ($values as $value) {
header(sprintf(
'%s: %s',
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$cookies = [
'csrfToken;;/' => object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
[maximum depth reached]
]
}
]
$values = [
(int) 0 => 'application/pdf'
]
$name = 'Content-Type'
$first = true
$value = 'application/pdf'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 198
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 198]Code Context foreach ($values as $value) {
header(sprintf(
'%s: %s',
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$cookies = [
'csrfToken;;/' => object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
[maximum depth reached]
]
}
]
$values = [
(int) 0 => 'attachment; filename="uems_anexo_2024-03-22_16-04-25.pdf"'
]
$name = 'Content-Disposition'
$first = true
$value = 'attachment; filename="uems_anexo_2024-03-22_16-04-25.pdf"'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 198
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 198]Code Context foreach ($values as $value) {
header(sprintf(
'%s: %s',
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$cookies = [
'csrfToken;;/' => object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
[maximum depth reached]
]
}
]
$values = [
(int) 0 => 'binary'
]
$name = 'Content-Transfer-Encoding'
$first = true
$value = 'binary'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 198
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 198]Code Context foreach ($values as $value) {
header(sprintf(
'%s: %s',
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$cookies = [
'csrfToken;;/' => object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
[maximum depth reached]
]
}
]
$values = [
(int) 0 => 'bytes'
]
$name = 'Accept-Ranges'
$first = true
$value = 'bytes'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 198
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 198]Code Context foreach ($values as $value) {
header(sprintf(
'%s: %s',
$response = object(Cake\Http\Response) {
'status' => (int) 200,
'contentType' => 'application/pdf',
'headers' => [
'Content-Type' => [
[maximum depth reached]
],
'Content-Disposition' => [
[maximum depth reached]
],
'Content-Transfer-Encoding' => [
[maximum depth reached]
],
'Accept-Ranges' => [
[maximum depth reached]
],
'Content-Length' => [
[maximum depth reached]
]
],
'file' => object(SplFileInfo) {},
'fileRange' => [],
'cookies' => object(Cake\Http\Cookie\CookieCollection) {},
'cacheDirectives' => [],
'body' => ''
}
$cookies = [
'csrfToken;;/' => object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
[maximum depth reached]
]
}
]
$values = [
(int) 0 => '0'
]
$name = 'Content-Length'
$first = true
$value = '0'
header - [internal], line ??
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 198
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40
Warning (2): Cannot modify header information - headers already sent by (output started at /var/www/html/portal-cake/vendor/cakephp/cakephp/src/Error/Debugger.php:831) [CORE/src/Http/ResponseEmitter.php, line 236]Code Context if (PHP_VERSION_ID >= 70300) {
return setcookie($cookie->getName(), $cookie->getScalarValue(), $cookie->getOptions());
}
$cookie = object(Cake\Http\Cookie\Cookie) {
[protected] name => 'csrfToken'
[protected] value => 'c791f6c385628fca667fc3b3d57f6f36746a9a5b7203927596c6890f09503515ca398fb4764a391c0999ef9684d1d16fcbc73e2ff8684051c51e6fa0e719eaf8'
[protected] isExpanded => false
[protected] expiresAt => null
[protected] path => '/'
[protected] domain => ''
[protected] secure => false
[protected] httpOnly => true
[protected] sameSite => null
[protected] defaults => [
'expires' => null,
'path' => '/',
'domain' => '',
'secure' => false,
'httponly' => false,
'samesite' => null
]
}
setcookie - [internal], line ??
Cake\Http\ResponseEmitter::setCookie() - CORE/src/Http/ResponseEmitter.php, line 236
Cake\Http\ResponseEmitter::emitCookies() - CORE/src/Http/ResponseEmitter.php, line 219
Cake\Http\ResponseEmitter::emitHeaders() - CORE/src/Http/ResponseEmitter.php, line 207
Cake\Http\ResponseEmitter::emit() - CORE/src/Http/ResponseEmitter.php, line 76
Cake\Http\Server::emit() - CORE/src/Http/Server.php, line 130
[main] - ROOT/webroot/index.php, line 40