V
V
valeriy_good2020-10-27 23:34:24
Yii
valeriy_good, 2020-10-27 23:34:24

Why can't register when creating a new yii2 project?

I have this problem: I
installed yii2, I open it in the browser, after filling out the registration form, the data goes to the database,

5f9884295aca1458979140.png

but an error pops up in the browser.

5f9883f6e44d6959811226.png

Apparently, the server complains, but what exactly is wrong with it in my case, how to understand?
I use openserver, the settings are php 7.1-x64, apache-php-7-x64, mysql-5.6

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
monday_suicide, 2020-10-28
@valeriy_good

for starters, it would be worth deploying the application in the dev environment, not prod.
But if so, then in index.php you need to change

defined('YII_DEBUG') or define('YII_DEBUG', false);
defined('YII_ENV') or define('YII_ENV', 'prod');

on the
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

And then see what exactly is wrong.

V
valeriy_good, 2020-10-27
@valeriy_good

The problem was solved by adding 'useFileTransport' => trueto the file common/config/main-local.php
After that, mailer will add letters toruntime/mail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question