Artisan serve command works but laragon is not


  • | 334 points

    Hi.
    I am facing this error with a new Laravel application I'm working: The page has expired due to inactivity. Please refresh and try again." It is on POST request, I have 419 http status as output.

    The POST request works correctly when using "php artisan serve" to launch a built-in server.

    As I use laragon, I use virtual host auto-created by it (Auto virtual host: ON). The crsf token system seems not to work with virtual host address???

    All clearing commands were already executed but haven't solved it:
    php artisan clear-compiled
    composer dump-autoload
    php artisan optimize
    php artisan cache:clear
    php artisan config:clear
    php artisan route:clear
    php artisan view:clear


  • administrators
    | 110340 points

    @reexan2 : Are you using Nginx?
    If yes, please check this link:
    https://forum.laragon.org/topic/529/guzzle-request-crashes-nginx/4


  • | 334 points

    No, I use Apache


  • administrators
    | 110340 points

    @reexan2 : There is an error.log in Menu > Apache > error.log which provide you more details about the error.


  • | 334 points

    There is nothing reported in all logs but in the debugbar, there is one:
    Illuminate\Session\TokenMismatchException
    in vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php#71
    But it doesn't help me to understand the problem just for Laragon, "Auto virtual host: ON" is the only difference to other environment!


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.