闪存消息未显示在实时服务器上,而是在本地显示

发布于 2025-02-10 18:49:38 字数 1111 浏览 1 评论 0原文

我正在调试YII2应用程序,我只是将项目复制为调试,问题是本地闪存消息正在显示,但在Live Plesk Linux服务器上,闪存消息未显示同一YII2 App。

我在后端/config/main.php会话组件中注意到未定义,这可能是问题吗?我在哪里在Linux服务器中找到会话文件,以确保是否正在生成会话。

'components' => [
    'errorHandler' => [
        'errorAction' => 'site/error',
    ],
    'assetManager' => $assets,
    'authManager' => [
        'class' => 'yii\rbac\DbManager',
        // uncomment if you want to cache RBAC items hierarchy
        // 'cache' => 'cache',
    ],
    'urlManager' => [
        'rules' => [
            '<controller:\w+>/<action:[a-zA-ZöäüßÖÄÜ\-]+>/<id:\d+>' => '<controller>/<action>',
            '<controller:\w+>/<action:[a-zA-ZöäüßÖÄÜ\-]+>'          => '<controller>/<action>',
            '<controller:\w+>/<id:\d+>'                             => '<controller>/view',
        ],
    ],
],

在XAMP中,我可以看到在xamp/temp文件夹中创建了会话,在Linux Server var/lib/php5/sessions我可以看到会话正在创建,如temp 。但是在实时服务器会话中没有显示。

顺便说一句,我刚刚开始学习yii2,我的问题听起来很基本。

I am debugging a yii2 application, I simply copied project to debug, the problem is that locally flash messages are showing but on live plesk linux server, the flash messages are not showing for the same yii2 app.

I noticed in backend/config/main.php session component is not defined, could it be the issue? and where do I locate session file in linux server to make sure if session is being generated.

'components' => [
    'errorHandler' => [
        'errorAction' => 'site/error',
    ],
    'assetManager' => $assets,
    'authManager' => [
        'class' => 'yii\rbac\DbManager',
        // uncomment if you want to cache RBAC items hierarchy
        // 'cache' => 'cache',
    ],
    'urlManager' => [
        'rules' => [
            '<controller:\w+>/<action:[a-zA-ZöäüßÖÄÜ\-]+>/<id:\d+>' => '<controller>/<action>',
            '<controller:\w+>/<action:[a-zA-ZöäüßÖÄÜ\-]+>'          => '<controller>/<action>',
            '<controller:\w+>/<id:\d+>'                             => '<controller>/view',
        ],
    ],
],

In Xamp, I can see sessions are being created in Xamp/Temp folder, and on linux server var/lib/php5/sessions i can see session being created as in temp. But on live server session is not showing.

btw I just started learning yii2, incase my question sounds basic.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文