AlanQ
AlanQ

Edit: Accepted Issue on GitHub https://github.com/octobercms/october/issues/2830
See also http://stackoverflow.com/questions/43476933/php-artisan-down-throws-uncaught-503-and-yields-an-error-page
Related: https://github.com/GrahamCampbell/Laravel-Exceptions/issues/64


I need to run an artisan command. I've done very little with artisan so I decided to try something simple with a 'known' outcome to test my understanding.

I ran php artisan down which is supposed to "Put the application into maintenance mode"
But, after reloading the site (frontend AND backend), I get an error:

We're sorry, but an unhandled error occurred. Please see the details below.
.../vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php line 41
Type: Undefined
Exception: Symfony\Component\HttpKernel\Exception\HttpException

\*  
\* @throws \Symfony\Component\HttpKernel\Exception\HttpException  
*/  
public function handle($request, Closure $next)  
{  
if ($this->app->isDownForMaintenance()) {  
throw new HttpException(503);  
}  
return $next($request);  
}  
}  

I can put the site into maintenance mode via the backend and I get my configured maintenance page as expected.

From the error message it looks like October Laravel is doing what it's been coded to do. So, is this a fix-it-when-we-have-time 'bug', or am I misunderstanding?

There are times when it would be very handy to be able to put the site into maintenance mode via the command line.

Last updated

1-1 of 1