Symfony Exception

ErrorException

HTTP 500 Internal Server Error

Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)

Exception

ErrorException

Show exception properties
ErrorException {#1621
  #severity: E_WARNING
}
  1. use Closure;
  2. class Cors
  3. {
  4.     public function handle($requestClosure $next)
  5.     {
  6.         header("Access-Control-Allow-Origin: *");
  7.         //ALLOW OPTIONS METHOD
  8.         $headers = [
  9.             'Access-Control-Allow-Methods' => 'POST,GET,OPTIONS,PUT,DELETE',
  10.             'Access-Control-Allow-Headers' => 'Content-Type, X-Auth-Token, Origin, Authorization',
  11.         ];
  1.      * @return callable
  2.      */
  3.     protected function forwardsTo($method)
  4.     {
  5.         return fn (...$arguments) => static::$app
  6.             $this->{$method}(...$arguments)
  7.             : false;
  8.     }
  9.     /**
  10.      * Determine if the error level is a deprecation.
HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)', '/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php', 9)
header('Access-Control-Allow-Origin: *') in /home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php (line 9)
  1. use Closure;
  2. class Cors
  3. {
  4.     public function handle($requestClosure $next)
  5.     {
  6.         header("Access-Control-Allow-Origin: *");
  7.         //ALLOW OPTIONS METHOD
  8.         $headers = [
  9.             'Access-Control-Allow-Methods' => 'POST,GET,OPTIONS,PUT,DELETE',
  10.             'Access-Control-Allow-Headers' => 'Content-Type, X-Auth-Token, Origin, Authorization',
  11.         ];
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.      */
  2.     public function handle($requestClosure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request$next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.      */
  2.     public function handle($requestClosure $next)
  3.     {
  4.         $this->clean($request);
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Clean the request's data.
  9.      *
  1.             if ($callback($request)) {
  2.                 return $next($request);
  3.             }
  4.         }
  5.         return parent::handle($request$next);
  6.     }
  7.     /**
  8.      * Transform the given value.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.         if ($max && $request->server('CONTENT_LENGTH') > $max) {
  2.             throw new PostTooLargeException;
  3.         }
  4.         return $next($request);
  5.     }
  6.     /**
  7.      * Determine the server 'post_max_size' as bytes.
  8.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.                 null,
  2.                 $this->getHeaders($data)
  3.             );
  4.         }
  5.         return $next($request);
  6.     }
  7.     /**
  8.      * Determine if the incoming request has a maintenance mode bypass cookie.
  9.      *
  1.                         // since the object we're given was already a fully instantiated object.
  2.                         $parameters = [$passable$stack];
  3.                     }
  4.                     $carry method_exists($pipe$this->method)
  5.                                     ? $pipe->{$this->method}(...$parameters)
  6.                                     : $pipe(...$parameters);
  7.                     return $this->handleCarry($carry);
  8.                 } catch (Throwable $e) {
  9.                     return $this->handleException($passable$e);
  1.     {
  2.         $pipeline array_reduce(
  3.             array_reverse($this->pipes()), $this->carry(), $this->prepareDestination($destination)
  4.         );
  5.         return $pipeline($this->passable);
  6.     }
  7.     /**
  8.      * Run the pipeline and return the result.
  9.      *
  1.         $this->bootstrap();
  2.         return (new Pipeline($this->app))
  3.                     ->send($request)
  4.                     ->through($this->app->shouldSkipMiddleware() ? [] : $this->middleware)
  5.                     ->then($this->dispatchToRouter());
  6.     }
  7.     /**
  8.      * Bootstrap the application for HTTP requests.
  9.      *
  1.         $this->requestStartedAt Carbon::now();
  2.         try {
  3.             $request->enableHttpMethodParameterOverride();
  4.             $response $this->sendRequestThroughRouter($request);
  5.         } catch (Throwable $e) {
  6.             $this->reportException($e);
  7.             $response $this->renderException($request$e);
  8.         }
Kernel->handle(object(Request)) in /home/rlvtecnologiacom/public_html/portal2/public/index.php (line 57)
  1. |
  2. */
  3. $kernel $app->make(Illuminate\Contracts\Http\Kernel::class);
  4. $response $kernel->handle(
  5.     $request Illuminate\Http\Request::capture()
  6. );
  7. $response->send();
require_once('/home/rlvtecnologiacom/public_html/portal2/public/index.php') in /home/rlvtecnologiacom/public_html/portal2/server.php (line 21)
  1. // application without having installed a "real" web server software here.
  2. if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) {
  3.     return false;
  4. }
  5. require_once __DIR__.'/public/index.php';

Stack Trace

ErrorException
ErrorException:
Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)

  at /home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php:9
  at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)', '/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php', 9)
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:255)
  at Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}(2, 'Cannot modify header information - headers already sent by (output started at /home/rlvtecnologiacom/public_html/portal2/routes/web.php:27)', '/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php', 9)
  at header('Access-Control-Allow-Origin: *')
     (/home/rlvtecnologiacom/public_html/portal2/app/Http/Middleware/Cors.php:9)
  at App\Http\Middleware\Cors->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php:31)
  at Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php:21)
  at Illuminate\Foundation\Http\Middleware\TransformsRequest->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php:40)
  at Illuminate\Foundation\Http\Middleware\TrimStrings->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php:27)
  at Illuminate\Foundation\Http\Middleware\ValidatePostSize->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php:99)
  at Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle(object(Request), object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:183)
  at Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php:119)
  at Illuminate\Pipeline\Pipeline->then(object(Closure))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:175)
  at Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php:144)
  at Illuminate\Foundation\Http\Kernel->handle(object(Request))
     (/home/rlvtecnologiacom/public_html/portal2/public/index.php:57)
  at require_once('/home/rlvtecnologiacom/public_html/portal2/public/index.php')
     (/home/rlvtecnologiacom/public_html/portal2/server.php:21)