Symfony sfModelGenerator.class.php line 321 error

Well I’ve been playing with Symfony and I started building modules today from the Jobeet day 3 tutorial and I ran into an issue.   The Symfony Project is basically a framework in which you can build PHP web applications which I’ve been using for a school project.

I’m not sure if I missed a step of if this is a system specific problem but basically I went to run the “symfony propel:build-module” command to genereate my module files and I got this error.

Fatal error: Class ‘PersonForm’ not found in /var/www/cam/trunk/lib/generator/sfModelGenerator.class.php on line 321

The “PersonForm” class was, as the error indicated, no where to be found.  It turned out that I needed to run the command “symfony cc” which clears the symfony cache of files.   I also had to run the command “symfony propel:build-forms“  in order to get symfony to build my modules.

So to re-cap

  1. Run $ php symfony cc
  2. Run $ php symfony propel:build-forms
  3. Run $ php symfony build:module  (Params)

Once I did those steps the build:module step worked perfectly and I was able to view the skeleton application at my dev.php/person url.

Symfony seems to be very very powerful and I’m excited to learn how to develope applications with it.

  • http://www.dehna-web.de Markus

    thank a lot!

  • Salim

    Thank’s too !

    That was very useful

  • e-satis

    Thanks as well.

  • Jotape

    Thank you very much man. It solved my problem. Thanks a lot!! =)