Laravel页面在localhost运行时已过期419

时间:2020-08-22 12:45:30

标签: mysql laravel

我正在尝试将我的网站托管在在线托管上,我已经做过很多次了。 但是这次,我收到一个419页的过期错误,并且我不知道它的真正含义,我正在使用数据库会话驱动程序,并且每次在此表单上都使用csrf字段。请注意,ajax表单正常运行,但是发布表单不起作用。 (我还多次清除了缓存)

这是我的.env文件:

`APP_NAME = Laravel

APP_ENV =本地

APP_KEY = base64:UQ / XKTRaoI8xxvSMbyiPtQRftArL8CyXzNW0Lu4 + 6RI =

APP_DEBUG = true

APP_URL = XXXXX

LOG_CHANNEL =堆栈

DB_CONNECTION = mysql

DB_HOST = 127.0.0.1

DB_PORT = 3306

DB_DATABASE = XXXXX

DB_USERNAME = XXXXX

DB_PASSWORD = XXXXX

BROADCAST_DRIVER =日志

CACHE_DRIVER =文件

QUEUE_CONNECTION =同步

SESSION_DRIVER =数据库

SESSION_LIFETIME = 120

REDIS_HOST = http://promocups.eu/new

REDIS_PASSWORD =空

REDIS_PORT = 6379

MAIL_MAILER = smtp

MAIL_HOST = smtp.gmail.com

MAIL_PORT = 587

MAIL_USERNAME = XXXXXX

MAIL_PASSWORD =“ XXXXX”

MAIL_ENCRYPTION = tls

MAIL_FROM_ADDRESS =空

MAIL_FROM_NAME =“ $ {APP_NAME}”

AWS_ACCESS_KEY_ID =

AWS_SECRET_ACCESS_KEY =

AWS_DEFAULT_REGION =我们东部-1

AWS_BUCKET =

PUSHER_APP_ID =

PUSHER_APP_KEY =

PUSHER_APP_SECRET =

PUSHER_APP_CLUSTER = mt1

MIX_PUSHER_APP_KEY =“ $ {PUSHER_APP_KEY}”

MIX_PUSHER_APP_CLUSTER =“ $ {PUSHER_APP_CLUSTER}”

MOLLIE_KEY = XXXXXXXX`

以下是表单的示例:

<form method="POST" action="{{ route('register') }}">
                      @csrf
                        <input class="form-control @error('name') is-invalid @enderror" id="name" type="text" name="name" placeholder="Full Name" required>
                        @error('name')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror

                        <input class="form-control @error('email') is-invalid @enderror" type="email" name="email" placeholder="E-mail Address" required>
                        @error('email')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror

                        <input id="password" class="form-control @error('password') is-invalid @enderror" type="password" name="password" placeholder="Password" required>
                        @error('password')
                            <span class="invalid-feedback" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                        @enderror

                        <input id="password-confirm" class="form-control @error('password') is-invalid @enderror" type="password" name="password_confirmation" placeholder="Re-enter Password" required>


                        <div class="form-button">
                            <button id="submit" type="submit" class="ibtn">Register</button>
                        </div>
                    </form>

 

这是否也可能是mariaDB问题,因为主机上的数据库是mariadb,而我正在本地主机上使用mysql进行操作,而我对配置没有任何更改。

提前谢谢!

0 个答案:

没有答案