\ Whoops! There was an error.
39. ErrorException
…/­app/­Acme/­Composers/­FrontNavigationComposer.php246
38. Illuminate\View\Engines\CompilerEngine handleViewException
…/­bootstrap/­compiled.php7957
37. ErrorException
…/­app/­Acme/­Composers/­FrontNavigationComposer.php246
36. Illuminate\View\Engines\CompilerEngine handleViewException
…/­bootstrap/­compiled.php7957
35. ErrorException
…/­app/­Acme/­Composers/­FrontNavigationComposer.php246
34. Illuminate\Exception\Handler handleError
<#unknown>0
33. setcookie
…/­app/­Acme/­Composers/­FrontNavigationComposer.php246
32. Acme\Composers\FrontNavigationComposer ip_visitor_country
…/­app/­Acme/­Composers/­FrontNavigationComposer.php21
31. Acme\Composers\FrontNavigationComposer compose
<#unknown>0
30. call_user_func_array
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Factory.php440
29. Illuminate\View\Factory Illuminate\View\{closure}
<#unknown>0
28. call_user_func_array
…/­bootstrap/­compiled.php4231
27. Illuminate\Events\Dispatcher fire
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Factory.php471
26. Illuminate\View\Factory callComposer
…/­bootstrap/­compiled.php7819
25. Illuminate\View\View renderContents
…/­bootstrap/­compiled.php7807
24. Illuminate\View\View render
…/­app/­storage/­views/­f09d6da0373a171fdff54669ea1d52481094
23. include
…/­bootstrap/­compiled.php7955
22. Illuminate\View\Engines\PhpEngine evaluatePath
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­CompilerEngine.php57
21. Illuminate\View\Engines\CompilerEngine get
…/­bootstrap/­compiled.php7833
20. Illuminate\View\View getContents
…/­bootstrap/­compiled.php7820
19. Illuminate\View\View renderContents
…/­bootstrap/­compiled.php7807
18. Illuminate\View\View render
…/­app/­storage/­views/­da1d1511fa6483947552403b78d088a4163
17. include
…/­bootstrap/­compiled.php7955
16. Illuminate\View\Engines\PhpEngine evaluatePath
…/­vendor/­laravel/­framework/­src/­Illuminate/­View/­Engines/­CompilerEngine.php57
15. Illuminate\View\Engines\CompilerEngine get
…/­bootstrap/­compiled.php7833
14. Illuminate\View\View getContents
…/­bootstrap/­compiled.php7820
13. Illuminate\View\View renderContents
…/­bootstrap/­compiled.php7807
12. Illuminate\View\View render
…/­bootstrap/­compiled.php8003
11. Illuminate\Http\Response setContent
…/­vendor/­symfony/­http-foundation/­Response.php202
10. Symfony\Component\HttpFoundation\Response __construct
…/­bootstrap/­compiled.php3230
9. Illuminate\Routing\Router prepareResponse
…/­bootstrap/­compiled.php3039
8. Illuminate\Routing\Router dispatchToRoute
…/­bootstrap/­compiled.php3025
7. Illuminate\Routing\Router dispatch
…/­bootstrap/­compiled.php702
6. Illuminate\Foundation\Application dispatch
…/­bootstrap/­compiled.php678
5. Illuminate\Foundation\Application handle
…/­bootstrap/­compiled.php5797
4. Illuminate\Session\Middleware handle
…/­bootstrap/­compiled.php6404
3. Illuminate\Cookie\Queue handle
…/­bootstrap/­compiled.php6351
2. Illuminate\Cookie\Guard handle
…/­bootstrap/­compiled.php8367
1. Stack\StackedHttpKernel handle
…/­bootstrap/­compiled.php639
0. Illuminate\Foundation\Application run
…/­public_html/­index.php49

ErrorException (E_ERROR)

Callstack information; navigate with mouse or keyboard using Ctrl+↑ or Ctrl+↓
Copy-to-clipboard button
Exception message and its type
Code snippet where the error was thrown
Server state information
Application provided context information
ErrorException thrown with message "Cannot modify header information - headers already sent by (output started at /home/tourismconamibia/app/controllers/SignUpNewsletterController.php:1) (View: /home/tourismconamibia/app/views/front/main.blade.php) (View: /home/tourismconamibia/app/views/front/main.blade.php)" Stacktrace: #39 ErrorException in /home/tourismconamibia/app/Acme/Composers/FrontNavigationComposer.php:246 #38 Illuminate\View\Engines\CompilerEngine:handleViewException in /home/tourismconamibia/bootstrap/compiled.php:7957 #37 ErrorException in /home/tourismconamibia/app/Acme/Composers/FrontNavigationComposer.php:246 #36 Illuminate\View\Engines\CompilerEngine:handleViewException in /home/tourismconamibia/bootstrap/compiled.php:7957 #35 ErrorException in /home/tourismconamibia/app/Acme/Composers/FrontNavigationComposer.php:246 #34 Illuminate\Exception\Handler:handleError in <#unknown>:0 #33 setcookie in /home/tourismconamibia/app/Acme/Composers/FrontNavigationComposer.php:246 #32 Acme\Composers\FrontNavigationComposer:ip_visitor_country in /home/tourismconamibia/app/Acme/Composers/FrontNavigationComposer.php:21 #31 Acme\Composers\FrontNavigationComposer:compose in <#unknown>:0 #30 call_user_func_array in /home/tourismconamibia/vendor/laravel/framework/src/Illuminate/View/Factory.php:440 #29 Illuminate\View\Factory:Illuminate\View\{closure} in <#unknown>:0 #28 call_user_func_array in /home/tourismconamibia/bootstrap/compiled.php:4231 #27 Illuminate\Events\Dispatcher:fire in /home/tourismconamibia/vendor/laravel/framework/src/Illuminate/View/Factory.php:471 #26 Illuminate\View\Factory:callComposer in /home/tourismconamibia/bootstrap/compiled.php:7819 #25 Illuminate\View\View:renderContents in /home/tourismconamibia/bootstrap/compiled.php:7807 #24 Illuminate\View\View:render in /home/tourismconamibia/app/storage/views/f09d6da0373a171fdff54669ea1d5248:1094 #23 include in /home/tourismconamibia/bootstrap/compiled.php:7955 #22 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/tourismconamibia/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:57 #21 Illuminate\View\Engines\CompilerEngine:get in /home/tourismconamibia/bootstrap/compiled.php:7833 #20 Illuminate\View\View:getContents in /home/tourismconamibia/bootstrap/compiled.php:7820 #19 Illuminate\View\View:renderContents in /home/tourismconamibia/bootstrap/compiled.php:7807 #18 Illuminate\View\View:render in /home/tourismconamibia/app/storage/views/da1d1511fa6483947552403b78d088a4:163 #17 include in /home/tourismconamibia/bootstrap/compiled.php:7955 #16 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/tourismconamibia/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php:57 #15 Illuminate\View\Engines\CompilerEngine:get in /home/tourismconamibia/bootstrap/compiled.php:7833 #14 Illuminate\View\View:getContents in /home/tourismconamibia/bootstrap/compiled.php:7820 #13 Illuminate\View\View:renderContents in /home/tourismconamibia/bootstrap/compiled.php:7807 #12 Illuminate\View\View:render in /home/tourismconamibia/bootstrap/compiled.php:8003 #11 Illuminate\Http\Response:setContent in /home/tourismconamibia/vendor/symfony/http-foundation/Response.php:202 #10 Symfony\Component\HttpFoundation\Response:__construct in /home/tourismconamibia/bootstrap/compiled.php:3230 #9 Illuminate\Routing\Router:prepareResponse in /home/tourismconamibia/bootstrap/compiled.php:3039 #8 Illuminate\Routing\Router:dispatchToRoute in /home/tourismconamibia/bootstrap/compiled.php:3025 #7 Illuminate\Routing\Router:dispatch in /home/tourismconamibia/bootstrap/compiled.php:702 #6 Illuminate\Foundation\Application:dispatch in /home/tourismconamibia/bootstrap/compiled.php:678 #5 Illuminate\Foundation\Application:handle in /home/tourismconamibia/bootstrap/compiled.php:5797 #4 Illuminate\Session\Middleware:handle in /home/tourismconamibia/bootstrap/compiled.php:6404 #3 Illuminate\Cookie\Queue:handle in /home/tourismconamibia/bootstrap/compiled.php:6351 #2 Illuminate\Cookie\Guard:handle in /home/tourismconamibia/bootstrap/compiled.php:8367 #1 Stack\StackedHttpKernel:handle in /home/tourismconamibia/bootstrap/compiled.php:639 #0 Illuminate\Foundation\Application:run in /home/tourismconamibia/public_html/index.php:49

Cannot modify header information - headers already sent by (output started at /home/tourismconamibia/app/controllers/SignUpNewsletterController.php:1) (View: /home/tourismconamibia/app/views/front/main.blade.php) (View: /home/tourismconamibia/app/views/front/main.blade.php)

                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch); // string
 
                $ip_data = json_decode($response, true);
 
                if (isset($ip_data) && $ip_data['country'] != null) {
                    $country = $ip_data['country'];
                    setcookie('From_Country', $country, time() + (86400 * 30), "/"); // 86400 = 1 day
                }
            }else {
    {
        $obLevel = ob_get_level();
        ob_start();
        extract($__data);
        try {
            include $__path;
        } catch (\Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (\Throwable $e) {
            $this->handleViewException($e, $obLevel);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch); // string
 
                $ip_data = json_decode($response, true);
 
                if (isset($ip_data) && $ip_data['country'] != null) {
                    $country = $ip_data['country'];
                    setcookie('From_Country', $country, time() + (86400 * 30), "/"); // 86400 = 1 day
                }
            }else {
Exception message: Cannot modify header information - headers already sent by (output started at /home/tourismconamibia/app/controllers/SignUpNewsletterController.php:1) (View: /home/tourismconamibia/app/views/front/main.blade.php)
    {
        $obLevel = ob_get_level();
        ob_start();
        extract($__data);
        try {
            include $__path;
        } catch (\Exception $e) {
            $this->handleViewException($e, $obLevel);
        } catch (\Throwable $e) {
            $this->handleViewException($e, $obLevel);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch); // string
 
                $ip_data = json_decode($response, true);
 
                if (isset($ip_data) && $ip_data['country'] != null) {
                    $country = $ip_data['country'];
                    setcookie('From_Country', $country, time() + (86400 * 30), "/"); // 86400 = 1 day
                }
            }else {
Exception message: Cannot modify header information - headers already sent by (output started at /home/tourismconamibia/app/controllers/SignUpNewsletterController.php:1)
<#unknown>
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                $response = curl_exec($ch); // string
 
                $ip_data = json_decode($response, true);
 
                if (isset($ip_data) && $ip_data['country'] != null) {
                    $country = $ip_data['country'];
                    setcookie('From_Country', $country, time() + (86400 * 30), "/"); // 86400 = 1 day
                }
            }else {
	public function compose($view)
	{
		//$view->with('navigation', $this->navigation->getAll());
		
		$usersMenu = $this->navigation->getAll();
		
		//dd( $usersMenu );
        $country = $this->ip_visitor_country();
		
		$netibleUsersMenu = $this->createArrayOfNestible($usersMenu);
<#unknown>
		// Once we have the class and method name, we can build the Closure to resolve
		// the instance out of the IoC container and call the method on it with the
		// given arguments that are passed to the Closure as the composer's data.
		return function() use ($class, $method, $container)
		{
			$callable = array($container->make($class), $method);
 
			return call_user_func_array($callable, func_get_args());
		};
	}
<#unknown>
    {
        $responses = array();
        if (!is_array($payload)) {
            $payload = array($payload);
        }
        $this->firing[] = $event;
        foreach ($this->getListeners($event) as $listener) {
            $response = call_user_func_array($listener, $payload);
            if (!is_null($response) && $halt) {
                array_pop($this->firing);
	 * Call the composer for a given view.
	 *
	 * @param  \Illuminate\View\View  $view
	 * @return void
	 */
	public function callComposer(View $view)
	{
		$this->events->fire('composing: '.$view->getName(), array($view));
	}
 
            $this->factory->flushSections();
            throw $e;
        }
    }
    protected function renderContents()
    {
        $this->factory->incrementRender();
        $this->factory->callComposer($this);
        $contents = $this->getContents();
        $this->factory->decrementRender();
        $this->engine = $engine;
        $this->factory = $factory;
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
    public function render(Closure $callback = null)
    {
        try {
            $contents = $this->renderContents();
            $response = isset($callback) ? $callback($this, $contents) : null;
            $this->factory->flushSectionsIfDoneRendering();
    <div class="row">
      <div class="col-sm-12">
        <nav class="navbar navbar-default" role="navigation">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
           </div>
          <div id="navbar" class="navbar-collapse collapse">
          	<?php echo $__env->make('layouts.partials.frontnavigation', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?> 
          
          	<!--
    }
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
        ob_start();
        extract($__data);
        try {
            include $__path;
        } catch (\Exception $e) {
            $this->handleViewException($e, $obLevel);
		}
 
		$compiled = $this->compiler->getCompiledPath($path);
 
		// Once we have the path to the compiled file, we will evaluate the paths with
		// typical PHP just like any other templates. We also keep a stack of views
		// which have been rendered for right exception messages to be generated.
		$results = $this->evaluatePath($compiled, $data);
 
		array_pop($this->lastCompiled);
        $env = $this->factory;
        return $this->render(function ($view) use($env) {
            return $env->getSections();
        });
    }
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
    protected function gatherData()
            throw $e;
        }
    }
    protected function renderContents()
    {
        $this->factory->incrementRender();
        $this->factory->callComposer($this);
        $contents = $this->getContents();
        $this->factory->decrementRender();
        return $contents;
        $this->engine = $engine;
        $this->factory = $factory;
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
    public function render(Closure $callback = null)
    {
        try {
            $contents = $this->renderContents();
            $response = isset($callback) ? $callback($this, $contents) : null;
            $this->factory->flushSectionsIfDoneRendering();
              	</div>         
        	</div>
        	
		</div>
	</div>
</section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('front.main', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    }
    protected function evaluatePath($__path, $__data)
    {
        $obLevel = ob_get_level();
        ob_start();
        extract($__data);
        try {
            include $__path;
        } catch (\Exception $e) {
            $this->handleViewException($e, $obLevel);
		}
 
		$compiled = $this->compiler->getCompiledPath($path);
 
		// Once we have the path to the compiled file, we will evaluate the paths with
		// typical PHP just like any other templates. We also keep a stack of views
		// which have been rendered for right exception messages to be generated.
		$results = $this->evaluatePath($compiled, $data);
 
		array_pop($this->lastCompiled);
        $env = $this->factory;
        return $this->render(function ($view) use($env) {
            return $env->getSections();
        });
    }
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
    protected function gatherData()
            throw $e;
        }
    }
    protected function renderContents()
    {
        $this->factory->incrementRender();
        $this->factory->callComposer($this);
        $contents = $this->getContents();
        $this->factory->decrementRender();
        return $contents;
        $this->engine = $engine;
        $this->factory = $factory;
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
    public function render(Closure $callback = null)
    {
        try {
            $contents = $this->renderContents();
            $response = isset($callback) ? $callback($this, $contents) : null;
            $this->factory->flushSectionsIfDoneRendering();
    public function setContent($content)
    {
        $this->original = $content;
        if ($this->shouldBeJson($content)) {
            $this->headers->set('Content-Type', 'application/json');
            $content = $this->morphToJson($content);
        } elseif ($content instanceof RenderableInterface) {
            $content = $content->render();
        }
        return parent::setContent($content);
     * @param array $headers An array of response headers
     *
     * @throws \InvalidArgumentException When the HTTP status code is not valid
     */
    public function __construct($content = '', $status = 200, $headers = array())
    {
        $this->headers = new ResponseHeaderBag($headers);
        $this->setContent($content);
        $this->setStatusCode($status);
        $this->setProtocolVersion('1.0');
        return array_filter($parameters, function ($p) {
            return !is_null($p) && $p !== '';
        });
    }
    protected function prepareResponse($request, $response)
    {
        if (!$response instanceof SymfonyResponse) {
            $response = new Response($response);
        }
        return $response->prepare($request);
    {
        $route = $this->findRoute($request);
        $this->events->fire('router.matched', array($route, $request));
        $response = $this->callRouteBefore($route, $request);
        if (is_null($response)) {
            $response = $route->run($request);
        }
        $response = $this->prepareResponse($request, $response);
        $this->callRouteAfter($route, $request, $response);
        return $response;
        return isset($group['namespace']) ? $group['namespace'] . '\\' . $uses : $uses;
    }
    public function dispatch(Request $request)
    {
        $this->currentRequest = $request;
        $response = $this->callFilter('before', $request);
        if (is_null($response)) {
            $response = $this->dispatchToRoute($request);
        }
        $response = $this->prepareResponse($request, $response);
            if (!is_null($response)) {
                return $this->prepareResponse($response, $request);
            }
        }
        if ($this->runningUnitTests() && !$this['session']->isStarted()) {
            $this['session']->start();
        }
        return $this['router']->dispatch($this->prepareRequest($request));
    }
    public function terminate(SymfonyRequest $request, SymfonyResponse $response)
        });
    }
    public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        try {
            $this->refreshRequest($request = Request::createFromBase($request));
            $this->boot();
            return $this->dispatch($request);
        } catch (\Exception $e) {
            if (!$catch || $this->runningUnitTests()) {
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        $this->checkRequestForArraySessions($request);
        if ($this->sessionConfigured()) {
            $session = $this->startSession($request);
            $request->setSession($session);
        }
        $response = $this->app->handle($request, $type, $catch);
        if ($this->sessionConfigured()) {
            $this->closeSession($session);
    public function __construct(HttpKernelInterface $app, CookieJar $cookies)
    {
        $this->app = $app;
        $this->cookies = $cookies;
    }
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        $response = $this->app->handle($request, $type, $catch);
        foreach ($this->cookies->getQueuedCookies() as $cookie) {
            $response->headers->setCookie($cookie);
    public function __construct(HttpKernelInterface $app, Encrypter $encrypter)
    {
        $this->app = $app;
        $this->encrypter = $encrypter;
    }
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        return $this->encrypt($this->app->handle($this->decrypt($request), $type, $catch));
    }
    protected function decrypt(Request $request)
    public function __construct(HttpKernelInterface $app, array $middlewares)
    {
        $this->app = $app;
        $this->middlewares = $middlewares;
    }
    public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
    {
        return $this->app->handle($request, $type, $catch);
    }
    public function terminate(Request $request, Response $response)
        if ($this->isBooted()) {
            $this->fireAppCallbacks(array($callback));
        }
    }
    public function run(SymfonyRequest $request = null)
    {
        $request = $request ?: $this['request'];
        $response = with($stack = $this->getStackedClient())->handle($request);
        $response->send();
        $stack->terminate($request, $response);
| Once we have the application, we can simply call the run method,
| which will execute the request and send the response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have whipped up for them.
|
*/
 
$app->run();
 
empty
empty
empty
empty
empty
Key Value
USER tourismconamibia
HOME /home/tourismconamibia
SCRIPT_NAME /index.php
REQUEST_URI /signupnewsletter
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /signupnewsletter
REMOTE_PORT 21112
SCRIPT_FILENAME /home/tourismconamibia/public_html/index.php
SERVER_ADMIN webmaster@namibiatourism.com.na
CONTEXT_DOCUMENT_ROOT /home/tourismconamibia/public_html
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /home/tourismconamibia/public_html
REMOTE_ADDR 172.69.63.200
SERVER_PORT 80
SERVER_ADDR 172.31.13.98
SERVER_NAME namibiatourism.com.na
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_CDN_LOOP cloudflare
HTTP_CF_CONNECTING_IP 3.235.22.210
HTTP_CF_REQUEST_ID 03d59144f3000073b96294a200000001
HTTP_IF_MODIFIED_SINCE Sun, 05 Apr 2020 13:05:18 UTC
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_CF_VISITOR {"scheme":"https"}
HTTP_X_FORWARDED_PROTO https
HTTP_CF_RAY 5b02b7e7e87c73b9-IAD
HTTP_X_FORWARDED_FOR 3.235.22.210
HTTP_CF_IPCOUNTRY US
HTTP_ACCEPT_ENCODING gzip
HTTP_CONNECTION Keep-Alive
HTTP_HOST namibiatourism.com.na
proxy-nokeepalive 1
SCRIPT_URI http://namibiatourism.com.na/signupnewsletter
SCRIPT_URL /signupnewsletter
isproxyrequest 1
UNIQUE_ID XwcpARQLoybmTdZc8dRyLQAAAIk
REDIRECT_STATUS 200
REDIRECT_SCRIPT_URI http://namibiatourism.com.na/signupnewsletter
REDIRECT_SCRIPT_URL /signupnewsletter
REDIRECT_isproxyrequest 1
REDIRECT_UNIQUE_ID XwcpARQLoybmTdZc8dRyLQAAAIk
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1594304769.4224
REQUEST_TIME 1594304769
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler