doulu1914 2014-08-29 11:59
浏览 48
已采纳

Symfony 1.4致命错误类'myUser'未找到

In error log I see:

Fatal error: Class 'myUser' not found in /usr/share/nginx/www/services/cache/frontend/dev/config/config_factories.yml.php on line 120

What can caouse this problem ?

Nginx config:

server {
        listen   80;

        root /usr/share/nginx/www/services/web;
        index index.php index.html index.htm;
        access_log /usr/share/nginx/www/log/access.log;
        error_log  /usr/share/nginx/www/log/error.log;
        server_name server.lap;


        error_page 404 /404.html;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
              root /usr/share/nginx/www;
        }

        # pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock
        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

        }

    location / {
        index index.php;
        try_files $uri /index.php?$args;
    }

}

            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;
                    include fastcgi_params;
            }

              location ~ ^/(index|frontend|frontend_dev|backend|backend_dev)\.php$ {
                    include fastcgi_params;
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    fastcgi_param PATH_INFO $fastcgi_path_info;
                    fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
                    fastcgi_param HTTPS off;
                    fastcgi_pass unix:/var/run/php5-fpm.sock;
      }

    }
  • 写回答

1条回答 默认 最新

  • dre93205 2014-08-29 16:16
    关注

    Look to see if there is a myUser.class.php file in the lib folder of your app. If there isn't create one and in it add:

    <?php
    
    class myUser extends sfBasicSecurityUser
    {
    }
    
    ?>
    

    Or if you are using sfGuardPlugin:

    <?php
    
    class myUser extends sfGuardSecurityUser
    {
    }
    
    ?>
    

    Then clear the cache.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等