magento 无法登录管理面板

magento not able to login in admin panel

我是 magento 的新手。当我尝试登录管理面板时,出现以下错误。当我关闭会话时它会自动启动。但是这样做我的其他应用程序不能在服务器上运行。我正在使用 magento 1.9 版本。要添加我正在运行 nginx 而不是 apache

致命错误:Mage_Admin_Model_Observer::actionPreDispatchAdmin():脚本试图执行方法或访问不完整对象的属性。请确保您尝试操作的对象的 class 定义“Mage_Admin_Model_User”在 unserialize() 被调用之前加载 或提供 __autoload() 函数在第 62

行的 /var/www/html/magento/magento/app/code/core/Mage/Admin/Model/Observer.php 中加载 class 定义

Magento 将无法在启用 session.auto_start 的情况下工作,因为某些操作会在会话开始之前发生。

如果您真的不想为您的其他应用禁用它,一个解决方法是编辑您的 Magento 的 .hatccess 并在其中添加 php_flag session.auto_start 0

请您清除缓存,然后重新启动 mysqld 并清除浏览器缓存。 你能分享你的网站 link,

好的,请注意,ngnix 根本不解析 htaccess,而 Magento 严重依赖 htaccess 来确保安全。

在考虑你的问题之前,请知道,如果你的服务器除了本地访问之外还有其他任何东西,你就有风险,因为,正如你在 app/etc/local.xml 中看到的文件,每个人都可以访问,您正在向全世界提供您的数据库访问权限。

请完整阅读此文档:http://info.magento.com/rs/magentocommerce/images/MagentoECG-PoweringMagentowithNgnixandPHP-FPM.pdf 您可以在其中找到 Magento 的基本 ngnix 配置:

server {
    listen 80 default;
    server_name magento.lan www.magento.lan; # like ServerName in Apache
    root /var/www/magento; # document root, path to directory with files
    index index.html index.php;
    autoindex off; # we don’t want users to see files in directories
   location ~ (^/(app/\|includes/\|lib/\|/pkginfo/\|var/\|report/config.
xml)\|/\.svn/\|/\.git/\|/.hta.+) {
    deny all; #ensure sensitive files are not accessible
 }
location / {
    try_files $uri $uri/ /index.php?$args; # make index.php handle requests for
/
    access_log off; # do not log access to static files
    expires max; # cache static files aggressively
 }
location \~\* \.(jpeg\|jpg\|gif\|png\|css\|js\|ico\|swf)$ {
    try_files $uri $uri/ @proxy; # look for static files in root directory and
   ask backend if not successful
    expires max;
    access_log off;
 }
location @proxy {
    fastcgi_pass fpm_backend; # proxy everything from this location to backend
 }
location \~\.php$ {
    try_files $uri =404; # if reference to php executable is invalid return 404
    expires off; # no need to cache php executable files
    fastcgi_read_timeout 600;
    fastcgi_pass fpm_backend; # proxy all requests for dynamic content to
    # backend configured in upstream.conf
    fastcgi_keep_conn on; # use persistent connects to backend
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root${fastcgi_script_name};
    fastcgi_param MAGE_RUN_CODE default; # Store code is defined in
   #administration > Configuration > Manage Stores
    fastcgi_param MAGE_RUN_TYPE store;
   } 
}

然后,当且仅当您对文件 app/etc/local.xml 的访问被拒绝时,请考虑在您的问题中添加 ngnix 标签,然后具有更多 ngnix 知识的用户可能会有所帮助你比我更进一步(因为它更像是一个系统管理员的工作,而不是像我这样的 "coder" 的工作)。

我只能说:如果您在

部分下添加 fastcgi_param PHP_VALUE "session.auto_start=0";
location \~\.php$ {
    fastcgi_param PHP_VALUE "session.auto_start=0"; 
    #... more come here but I'm shortening just for the specific problem
}

这应该可以解决问题。