I found the source this problem of mine. I have actually copied to whole content of plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml to config/doctrine/schema.yml (just so i can easily change the schema) and delete the original plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml. Everything seems to work but the login part. My solution for now is to turn back to the original plugins/sfDoctrineGuardPlugin/config/doctrine/schema.yml and edit the schema from there.
On Thu, Apr 23, 2009 at 8:25 PM, Mohd Shakir bin Zakaria <[email protected]> wrote: > Thanks Eno for the hint. > > I've checked my apache's access log, and got this when using an invalid user: > 127.0.1.1:8082 127.0.0.1 - - [23/Apr/2009:20:14:10 +0800] "POST > /administration_dev.php/login HTTP/1.1" 200 10381 > "http://127.0.0.1:8082/administration_dev.php/login" "Mozilla/5.0 > (X11; U; Linux x86_64; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.10 > (intrepid) Firefox/3.0.8" > > > and the following line is when I use a valid user: > 127.0.1.1:8082 127.0.0.1 - - [23/Apr/2009:20:14:22 +0800] "POST > /administration_dev.php/login HTTP/1.1" 500 7381 > "http://127.0.0.1:8082/administration_dev.php/login" "Mozilla/5.0 > (X11; U; Linux x86_64; en-US; rv:1.9.0.8) Gecko/2009032712 Ubuntu/8.10 > (intrepid) Firefox/3.0.8" > > They are both the same, other than the HTTP status (200 compared to > 500 when the error occurs). The following line is from the error log > when using a valid user: > [Thu Apr 23 20:15:53 2009] [error] [client 127.0.0.1] Unknown method > sfGuardUser::checkPassword, referer: > http://127.0.0.1:8082/administration_dev.php/login > > > It's the same error as given by Symfony's debugging message. I'm not > really good in PHP, and was a bit clueless when reading the PHP files > reported by Symfony's stack trace. Here's the full stack trace to > whoever willing to read: > > > * at () > in > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Record.php > line 2129 ... > 2126. } > 2127. } > 2128. > 2129. throw new > Doctrine_Record_Exception(sprintf('Unknown method %s::%s', > get_class($this), $method)); > 2130. } > 2131. > 2132. /** > * at Doctrine_Record->__call('checkPassword', array('gdfgdfg')) > in > SF_SYMFONY_LIB_DIR/plugins/sfDoctrinePlugin/lib/record/sfDoctrineRecord.class.php > line 192 ... > 189. return parent::__call($method, $arguments); > 190. } > 191. } catch(Exception $e) { > 192. return parent::__call($method, $arguments); > 193. } > 194. } > 195. } > * at sfDoctrineRecord->__call('checkPassword', array('gdfgdfg')) > in n/a line n/a ... > * at sfGuardUser->checkPassword('gdfgdfg') > in > SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/lib/validator/sfGuardValidatorUser.class.php > line 38 ... > 35. if ($user = > Doctrine::getTable('sfGuardUser')->findOneByUsername($username)) > 36. { > 37. // password is ok? > 38. if ($user->checkPassword($password)) > 39. { > 40. return array_merge($values, array('user' => $user)); > 41. } > * at sfGuardValidatorUser->doClean(array('username' => 'shakir', > 'password' => 'gdfgdfg', '_csrf_token' => > '8575c77fe5951b60610ed755fc45758d', 'remember' => '')) > in SF_SYMFONY_LIB_DIR/validator/sfValidatorBase.class.php line 306 ... > 303. return $this->getEmptyValue(); > 304. } > 305. > 306. return $this->doClean($clean); > 307. } > 308. > 309. /** > * at sfValidatorBase->clean(array('username' => 'shakir', > 'password' => 'gdfgdfg', '_csrf_token' => > '8575c77fe5951b60610ed755fc45758d', 'remember' => '')) > in SF_SYMFONY_LIB_DIR/validator/sfValidatorSchema.class.php line 246 ... > 243. return $values; > 244. } > 245. > 246. return $validator->clean($values); > 247. } > 248. > 249. /** > * at sfValidatorSchema->postClean(array('username' => 'shakir', > 'password' => 'gdfgdfg', '_csrf_token' => > '8575c77fe5951b60610ed755fc45758d', 'remember' => '')) > in SF_SYMFONY_LIB_DIR/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' => 'shakir', > 'password' => 'gdfgdfg', '_csrf_token' => > '8575c77fe5951b60610ed755fc45758d')) > in SF_SYMFONY_LIB_DIR/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' => 'shakir', > 'password' => 'gdfgdfg', '_csrf_token' => > '8575c77fe5951b60610ed755fc45758d')) > in SF_SYMFONY_LIB_DIR/form/sfForm.class.php line 226 ... > 223. > 224. try > 225. { > 226. $this->values = > $this->validatorSchema->clean(self::deepArrayUnion($this->taintedValues, > self::convertFileInformation($this->taintedFiles))); > 227. $this->errorSchema = new > sfValidatorErrorSchema($this->validatorSchema); > 228. > 229. // remove CSRF token > * at sfForm->bind(array('username' => 'shakir', 'password' => > 'gdfgdfg', '_csrf_token' => '8575c77fe5951b60610ed755fc45758d')) > in > SF_ROOT_DIR/plugins/sfDoctrineGuardPlugin/modules/sfGuardAuth/lib/BasesfGuardAuthActions.class.php > line 33 ... > 30. > 31. if ($request->isMethod('post')) > 32. { > 33. $this->form->bind($request->getParameter('signin')); > 34. if ($this->form->isValid()) > 35. { > 36. $values = $this->form->getValues(); > * at BasesfGuardAuthActions->executeSignin(object('sfWebRequest')) > in SF_SYMFONY_LIB_DIR/action/sfActions.class.php line 53 ... > 50. } > 51. > 52. // run action > 53. return $this->$actionToRun($request); > 54. } > 55. } > 56. > * at sfActions->execute(object('sfWebRequest')) > in SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 90 ... > 87. { > 88. // execute the action > 89. $actionInstance->preExecute(); > 90. $viewName = > $actionInstance->execute($this->context->getRequest()); > 91. $actionInstance->postExecute(); > 92. > 93. return is_null($viewName) ? sfView::SUCCESS : $viewName; > * at sfExecutionFilter->executeAction(object('sfGuardAuthActions')) > in SF_SYMFONY_LIB_DIR/filter/sfExecutionFilter.class.php line 76 ... > 73. return sfView::SUCCESS; > 74. } > 75. > 76. return $this->executeAction($actionInstance); > 77. } > 78. > 79. /** > * at sfExecutionFilter->handleAction(object('sfFilterChain'), > object('sfGuardAuthActions')) > in SF_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/filter/sfCommonFilter.class.php line 29 ... > 26. public function execute($filterChain) > 27. { > 28. // execute next filter > 29. $filterChain->execute(); > 30. > 31. // execute this filter only once > 32. $response = $this->context->getResponse(); > * at sfCommonFilter->execute(object('sfFilterChain')) > in SF_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/controller/sfController.class.php line 245 ... > 242. } > 243. > 244. // process the filter chain > 245. $filterChain->execute(); > 246. } > 247. else > 248. { > * at sfController->forward('sfGuardAuth', 'signin') > in SF_SYMFONY_LIB_DIR/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_SYMFONY_LIB_DIR/util/sfContext.class.php line 159 ... > 156. */ > 157. public function dispatch() > 158. { > 159. $this->getController()->dispatch(); > 160. } > 161. > 162. /** > * at sfContext->dispatch() > in SF_ROOT_DIR/web/administration_dev.php line 13 ... > > > > On Thu, Apr 23, 2009 at 7:57 PM, Eno <[email protected]> wrote: >> >> On Thu, 23 Apr 2009, Mohd Shakir bin Zakaria wrote: >> >>> I'm using Symfony 1.2 and sfDoctrineGuardPlugin 3.0 and been getting >>> the following error when trying to log in using a valid user: >>> >>> >>> 500 | Internal Server Error | Doctrine_Record_Exception >> >> Look in your symfony or Apache error logs. >> >> >> -- >> >> >> >> >> -- Regards, Mohd Shakir Zakaria www.mohdshakir.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
