index.php error: Call to a member function send() on null
Hello, I've been developing a laravel website on my local development environment and it's ready now to launch it to a production server. It's not my first time launching laravel websites to production servers, but it is my first time launching to a shared hosting server. It's being launched to a 1&1 shared server, which is running PHP 7.0.7 which is what my homestead environment is running, but on the shared host I'm getting a fatal error when I load up the website that I can't figure out:
ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to a member function send() on null' in /path-to-laravel-install/public/index.php:55
Stack trace:
#0 {main}
So, obviously the $response object isn't instantiating correctly... but that's as much as I've able to determine.
Well, it turns out that it wasn't a server issue at all. I had modified the App\Exceptions\Handler file and it was preforming correctly when the website's .env file's debug mode was set to true, but not when it was set to false (the parent::render() method wasn't getting called when debug mode was turned off). When I first uploaded the website, i put it in maintenance mode while I was getting the database and things in order, and so it was hitting the exceptions handler right away.