Answer the question
In order to leave comments, you need to log in
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,
but an error pops up in the browser.
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
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');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
The problem was solved by adding 'useFileTransport' => true
to 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 questionAsk a Question
731 491 924 answers to any question