-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error displayed at production env, yii\web\DbSession, line 184 #11726
Comments
It's not possible to move any further with the data provided. How to reproduce it? |
please also provide the stack trace of the error |
Is your application using on one server or are multiple servers using the same database? |
I have the same issue. I just want to disable any errors display on production, but can't do it. I set YII_DEBUG to false, YII_ENV to prod, created light layout for errors. But can't avoid that message after template is rendered. |
@pastuhov do you have master/slave for sessions? |
Example to reproduce issue:
\Yii::$app->session->get('azaza');
return;
You will get the error Disabling any errors is useful on production server. User shouldn't be able to see such detailed information for security reasons. |
Ah, indeed it's in the page source. |
Fixed. Thanks for helping with reproducing it. |
What steps will reproduce the problem?
vendor/yiisoft/yii2/web/DbSession.php
What is the expected result?
Error logged to error log (
error_log()
) and NO output to browser (noecho()
)What do you get instead?
Error displayed
Additional info
Go deeper
vendor/yiisoft/yii2/web/DbSession.php
echo $exception;
The text was updated successfully, but these errors were encountered: