Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/267.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何解决sfGuard blm的问题?_Php_Symfony1_Doctrine_Sfguard - Fatal编程技术网

Php 如何解决sfGuard blm的问题?

Php 如何解决sfGuard blm的问题?,php,symfony1,doctrine,sfguard,Php,Symfony1,Doctrine,Sfguard,我正在使用Symfony框架。 安装并配置sfGuard身份验证程序后。我发现了这个问题: 500 | Internal Server Error | Doctrine_Table_Exception Unknown method SfGuardUserTable::retrieveByUsernameOrEmailAddress stack trace * at () in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoct

我正在使用Symfony框架。 安装并配置sfGuard身份验证程序后。我发现了这个问题:

500 | Internal Server Error | Doctrine_Table_Exception
Unknown method SfGuardUserTable::retrieveByUsernameOrEmailAddress
stack trace

    * at ()
      in SF_ROOT_DIR\lib\vendor\symfony\lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Table.php line 2856 ...
            2853.             return call_user_func_array(array($this->getRecordInstance(), $method . 'TableProxy'), $arguments);
            2854.         } catch (Doctrine_Record_UnknownPropertyException $e) {}
            2855.
            2856.         throw new Doctrine_Table_Exception(sprintf('Unknown method %s::%s', get_class($this), $method));
            2857.     }
            2858. }
2859.
    * at Doctrine_Table->__call('retrieveByUsernameOrEmailAddress', array('admin'))
      in n/a line n/a ...
    * at SfGuardUserTable->retrieveByUsernameOrEmailAddress('admin')
      in SF_ROOT_DIR\plugins\sfDoctrineGuardPlugin\lib\validator\sfGuardValidatorUser.class.php line 44 ...
              41.        {
              42.            $user = call_user_func_array($callable, array($username));
              43.        } else {
              44.            $user = $this->getTable()->$method($username);
              45.        }
              46.         // user exists?
              47.        if($user)
    * at sfGuardValidatorUser->doClean(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9', 'remember' => ))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorBase.class.php line 327 ...
             324.       return $this->getEmptyValue();
             325.     }
             326.
             327.     return $this->doClean($clean);
             328.   }
             329.
             330.   /**
    * at sfValidatorBase->clean(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9', 'remember' => ))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorSchema.class.php line 246 ...
             243.       return $values;
             244.     }
             245.
             246.     return $validator->clean($values);
             247.   }
             248.
             249.   /**
    * at sfValidatorSchema->postClean(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9', 'remember' => ))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorSchema.class.php line 186 ...
             183.     // post validator
             184.     try
             185.     {
             186.       $clean = $this->postClean($clean);
             187.     }
             188.     catch (sfValidatorErrorSchema $e)
             189.     {
    * at sfValidatorSchema->doClean(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\validator\sfValidatorSchema.class.php line 90 ...
              87.    */
              88.   public function clean($values)
              89.   {
              90.     return $this->doClean($values);
              91.   }
              92.
              93.   /**
    * at sfValidatorSchema->clean(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\form\sfForm.class.php line 247 ...
             244.    */
             245.   protected function doBind(array $values)
             246.   {
             247.     $this->values = $this->validatorSchema->clean($values);
             248.   }
             249.
             250.   /**
    * at sfForm->doBind(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\form\addon\sfFormSymfony.class.php line 75 ...
              72.
              73.     try
              74.     {
              75.       parent::doBind($values);
              76.     }
              77.     catch (sfValidatorError $error)
              78.     {
    * at sfFormSymfony->doBind(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\form\sfForm.class.php line 227 ...
             224.
             225.     try
             226.     {
             227.       $this->doBind(self::deepArrayUnion($this->taintedValues, self::convertFileInformation($this->taintedFiles)));
             228.       $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
             229.
             230.       // remove CSRF token
    * at sfForm->bind(array('username' => 'admin', 'password' => 'admin', '_csrf_token' => '0b9b4825a656101613c70c2f1ee7bfa9'))
      in SF_ROOT_DIR\apps\frontend\modules\sfGuardAuth\lib\BasesfGuardAuthActions.class.php line 33 ...
              30.
              31.     if ($request->isMethod('post'))
              32.     {
              33.       $this->form->bind($request->getParameter($this->form->getName()));
              34.       if ($this->form->isValid())
              35.       {
              36.         $values = $this->form->getValues(); 
    * at BasesfGuardAuthActions->executeSignin(object('sfWebRequest'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\action\sfActions.class.php line 60 ...
              57.     }
              58.
              59.     // run action
              60.     return $this->$actionToRun($request);
              61.   }
              62. }
  63.
    * at sfActions->execute(object('sfWebRequest'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfExecutionFilter.class.php line 92 ...
              89.   {
              90.     // execute the action
              91.     $actionInstance->preExecute();
              92.     $viewName = $actionInstance->execute($this->context->getRequest());
              93.     $actionInstance->postExecute();
              94.
              95.     return null === $viewName ? sfView::SUCCESS : $viewName;
    * at sfExecutionFilter->executeAction(object('sfGuardAuthActions'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfExecutionFilter.class.php line 78 ...
              75.       }
              76.     }
              77.
              78.     return $this->executeAction($actionInstance);
              79.   }
              80.
              81.   /**
    * at sfExecutionFilter->handleAction(object('sfFilterChain'), object('sfGuardAuthActions'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfExecutionFilter.class.php line 42 ...
              39.     {
              40.       $timer = sfTimerManager::getTimer(sprintf('Action "%s/%s"', $actionInstance->getModuleName(), $actionInstance->getActionName()));
              41.
              42.       $viewName = $this->handleAction($filterChain, $actionInstance);
              43.
              44.       $timer->addTime();
              45.       $timer = sfTimerManager::getTimer(sprintf('View "%s" for "%s/%s"', $viewName, $actionInstance->getModuleName(), $actionInstance->getActionName()));
    * at sfExecutionFilter->execute(object('sfFilterChain'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfFilterChain.class.php line 53 ...
              50.       }
              51.
              52.       // execute the next filter
              53.       $this->chain[$this->index]->execute($this);
              54.     }
              55.   }
  56.
    * at sfFilterChain->execute()
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfRenderingFilter.class.php line 33 ...
              30.   public function execute($filterChain)
              31.   {
              32.     // execute next filter
              33.     $filterChain->execute();
              34.
              35.     // get response object
              36.     $response = $this->context->getResponse();
    * at sfRenderingFilter->execute(object('sfFilterChain'))
      in SF_ROOT_DIR\lib\vendor\symfony\lib\filter\sfFilterChain.class.php line 53 ...
              50.       }
              51.
              52.       // execute the next filter
              53.       $this->chain[$this->index]->execute($this);
              54.     }
              55.   }
  56.
    * at sfFilterChain->execute()
      in SF_ROOT_DIR\lib\vendor\symfony\lib\controller\sfController.class.php line 238 ...
             235.       }
             236.
             237.       // process the filter chain
             238.       $filterChain->execute();
             239.     }
             240.     else
             241.     {
    * at sfController->forward('sfGuardAuth', 'signin')
      in SF_ROOT_DIR\lib\vendor\symfony\lib\controller\sfFrontWebController.class.php line 48 ...
              45.       }
              46.
              47.       // make the first request
              48.       $this->forward($moduleName, $actionName);
              49.     }
              50.     catch (sfException $e)
              51.     {
    * at sfFrontWebController->dispatch()
      in SF_ROOT_DIR\lib\vendor\symfony\lib\util\sfContext.class.php line 170 ...
             167.    */
             168.   public function dispatch()
             169.   {
             170.     $this->getController()->dispatch();
             171.   }
             172.
             173.   /**
    * at sfContext->dispatch()
      in SF_ROOT_DIR\web\frontend_dev.php line 13 ...

尝试“条令:清除”来清除未使用的类中的项目库。然后重建模型并形成“条令:构建模型”和“条令:构建形式”


如果这无助于检查参数'Doctrine_Core::ATTR_AUTOLOAD_TABLE_CLASSES'是否设置为true。它应该在sfDoctrinePluginConfiguration类中。

1什么是blm?2什么是sfGuard认证器,您是如何配置它的?3您使用的是哪个版本的Symfony?blm=问题抱歉sfGaurd=sfDoctrineGuardPlugin我使用的是Symfony-1.3.9 thx