2016-06-23 18:32
浏览 45

Drupal 7:无法注销:user / logout是404

I have a drupal 7 site that I just moved to a new server. I'm logged in as admin, but when I click the logout button on the admin bar (I have admin module installed) or on the /user page, I get the following:

Page not found The requested page "/user/logout" could not be found.

Looking in the apache logs reveals a 404 for /user/logout. So, what's going on here? Flushing caches both locally and through the admin menu in drupal does nothing--I remain logged in, and the admin bar is still there, so I don't think it's a cache problem.

I'm fairly new to drupal, so please include extra detail in any responses. I won't necessarily know where to put php code if you just give me a block of it without context.

图片转代码服务由CSDN问答提供 功能建议

我有一个drupal 7网站,我刚刚移动到新服务器。 我以管理员身份登录,但是当我单击管理栏上的注销按钮(我安装了管理模块)或在/ user页面上时,我得到以下内容:

页面 找不到 找不到请求的页面“/ user / logout”。

在apache日志中显示404 for /user/logout. So,这里发生了什么? 在本地刷新缓存并通过drupal中的管理菜单什么都不做 - 我仍然登录,管理栏仍然存在,所以我认为这不是缓存问题。

我对drupal很新,所以请在任何回复中包含额外的细节。 如果你只是给我一个没有上下文的块,我不一定知道在哪里放PHP代码。

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douzhi1924 2016-06-23 19:57

    This turned out to be something fairly specific to my case. I had an module installed which used the CAS module. It allowed authentication through a particular ldap server. (This module was built for all users of that particular ldap server, and isn't home-made or available on the drupal site) We'll call it foo_cas for expedience. When I moved to the new server, foo_cas was no longer required--besides that, foo_cas broke and no longer allowed me to login to the ldap server. My new server did not have the php ldap plugin installed, and I suspect that that's why.

    Anyway, after the move, I couldn't log in again to disable foo_cas (because of the above ldap problem), so I just deleted the folder sites/all/modules/foo_cas on the backend. This is what broke the logout url. I'm not sure what did it on the code level in foo_cas. My solution in the end was to put the foo_cas folder back in the sites/all/modules directory, which made the module available again, but disabled. I then used the uninstall tab under modules in the UI to uninstall foo_cas. I suspect foo_cas made a database change when it was installed that needed to be undone properly by uninstalling it. Now, /user/logout works again.

    解决 无用
    打赏 举报

相关推荐 更多相似问题