This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » Installation and setup » "Fatal error: Class 'BaseFormPropel' not found"
"Fatal error: Class 'BaseFormPropel' not found" [message #59554] Wed, 27 August 2008 16:40 Go to next message
dubitable  is currently offline dubitable
Messages: 3
Registered: August 2008
Junior Member
Hi folks,

I've been working using symfony locally and have had no problems. But now I'm trying to deploy on GoDaddy and running into some trouble.

I got over the first few hurdles with a bit of assistance from some online sources and the forum archives: I dealt with some path issues relating to the sf directory and tweaked the code in frontend_dev.php so that I could see it remotely, and added some htaccess and php5.ini stuff. MySQL db config proceeded smoothly enough, and I finally got my application to work on one of the module actions. However, the other two module actions involve forms, and it seems that this is where the problem is.

When I go to the module action "answer/create," I get this code dumped to the browser (note that I've changed the path in this code example to protect the innocent):

[?php /** * Project form base class. * * @package form * @version SVN: $Id: sfPropelFormBaseTemplate.php 6174 2007-11-27 06:22:40Z fabien $ */
abstract class BaseFormPropel extends sfFormPropel { public function setup() { } }
Fatal error: Class 'BaseFormPropel' not found in /some/web/path/symfony/lib/form/base/BaseAnswerForm.class.php on line 10


Seems sort of funny 'cause it is clearly dumping out BaseFormPropel...so obviously it is finding it on some level! But I'm a bit stumped at this point. Anyone have any ideas? Is this something to do with GoDaddy, or something I failed to tweak (both...)?

Thank you for any suggestions!

Best,
DD
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #59568 is a reply to message #59554 ] Wed, 27 August 2008 18:40 Go to previous messageGo to next message
scott_dev  is currently offline scott_dev
Messages: 40
Registered: August 2008
Member
I'm newbie to symfony still.Trying to help you.
Go with
http://www.symfony-project.org/book/forms/1_1/en/04-Propel-I ntegration.
May be you can forgot to execute some command. You may also ask godaddy support (via ticket) if they help out to resolve this problem.
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #59571 is a reply to message #59554 ] Wed, 27 August 2008 18:54 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
The "[?php" is a bit of a warning flag for me. This is a symbol used to describe the template of a class before it is written in a symfony PHP process. Ultimately I think it indicates that there was an error in the Forms build process, so would advise you to do that again (and watch carefully for errors).

Also make sure you do your forms building on your local machine, not on your host (there is no need to do it on your host - just upload the generated files from your local machine).


Remember Palestine
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #59573 is a reply to message #59554 ] Wed, 27 August 2008 18:57 Go to previous messageGo to next message
dubitable  is currently offline dubitable
Messages: 3
Registered: August 2008
Junior Member
Thank you all for your responses. To be clear: I built the forms on my local machine (I do not have SSH access to the remote server), and the application works perfectly on my local machine, forms and all.

I'm trying now to install on top of a sandbox package, which seems like it is already working more smoothly as some forms I created locally are working remotely. However, I would like to know what the problem was...seems clear there is some configuration value that is set during form-building or otherwise that I am not aware of...
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #59577 is a reply to message #59554 ] Wed, 27 August 2008 19:08 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Try clearing your remote cache manually: delete everything inside your cache folder.


Remember Palestine
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #59583 is a reply to message #59554 ] Wed, 27 August 2008 20:11 Go to previous messageGo to next message
dubitable  is currently offline dubitable
Messages: 3
Registered: August 2008
Junior Member
Yeah, I tried that too already!

Well, the fact is, I wasn't able to get it working until I dropped it into a sandbox install. It seems like, most importantly, the culprit was some configuration somewhere in the symfony libs--when I used the libs from the symfony sandbox (which I assume are self-contained/self-referential configuration-wise), it seemed to start working for me.

Anyways...I hope this helps someone! Thank you all for your feedback!!

Re: "Fatal error: Class 'BaseFormPropel' not found" [message #67903 is a reply to message #59554 ] Tue, 16 December 2008 18:31 Go to previous messageGo to next message
ksloan  is currently offline ksloan
Messages: 2
Registered: December 2008
Junior Member
I am bumping this in hopes of finding the real cause as I have the same issue.

Are there any problems with just converting all all [?php to <?php ?
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #71759 is a reply to message #67903 ] Sat, 07 February 2009 23:03 Go to previous messageGo to next message
cestcri  is currently offline cestcri
Messages: 232
Registered: August 2007
Location: Paris
Faithful Member
Hi all,


I bumped into exactly the same problem. Any idea how this could happen? It seems that symfony somehow tries to use doctrine because I get the following:

Call to undefined method BaseUser::exists


with the following in the stack trace...

at User->exists()
in SF_ROOT_DIR/lib/vendor/symfony-1.2.4/plugins/sfDoctrinePlugin/lib/form/sfFormDoctrine.class.php line 89 ...


How comes that there are some doctrine classes called?


I am very confused, especially because everything works like a charm locally.


Hope that someone has some ideas,
Christian
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #71765 is a reply to message #71759 ] Sat, 07 February 2009 23:42 Go to previous messageGo to next message
cestcri  is currently offline cestcri
Messages: 232
Registered: August 2007
Location: Paris
Faithful Member
Very suspicious... I checked my config_autoload.yml in the cache folder and found the following lines:

'BaseUserForm' => '[...]/lib/vendor/symfony-1.2.4/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/form/doctrine/base/BaseUserForm.class.php',


...

'ProjectConfiguration' => '[...]/lib/vendor/symfony-1.2.4/plugins/sfDoctrinePlugin/test/functional/fixtures/config/ProjectConfiguration.class.php',


...

'frontendConfiguration' => '[...]/lib/vendor/symfony-1.2.4/plugins/sfDoctrinePlugin/test/functional/fixtures/apps/frontend/config/frontendConfiguration.class.php',


...

'AuthorForm' => '[...]/lib/vendor/symfony-1.2.4/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/form/doctrine/AuthorForm.class.php',


...and I could go on. Somehow doctrine get autoloaded even without being enabled! That´s scary and sounds like a bug... what do you think?

I deleted the whole doctrine plugin and the problem was gone. Now I "only" struggle with the wrong BaseFormPropel, and I suppose that is also due to autoloading.


Opinions?


Cheers,
Christian
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #71889 is a reply to message #59554 ] Mon, 09 February 2009 16:50 Go to previous messageGo to next message
ksloan  is currently offline ksloan
Messages: 2
Registered: December 2008
Junior Member
I did solve this problem, still not sure what exactly caused it.

Quick answer:
delete the file
rm lib/symfony/plugins/sfPropelPlugin/data/generator/sfPropelForm/default/template/sfPropelFormBaseTemplate.php

and clear your cache on the command line
./symfony cc



Long answer:
Symfony builds a master include class array that seems to tell php where to find class files per application. This file is located at
cache/$app/$env/config/config_autoload.yml.php

Where $evn is production, dev etc (whatever appears after your script name, typically _dev.php when not in production)

You will should be getting 2 lines for BaseFormPropel, and this is the issue. If you swap the two lines, you will see things should work. But your world will come crashing down the next time you clear symfony cache.

I'm not sure what/why there is 2 instances of this same class. I ended up just deleting the php file that was being read out instead of server side ran, and then my app worked, and I haven't had any issues since. Its been about a full month since I've done this.

The 2 files that conflict are
lib/symfony/plugins/sfPropelPlugin/data/generator/sfPropelForm/default/template/sfPropelFormBaseTemplate.php

lib/form/BaseFormPropel.class.php


With the problem one being the one deep in the propel plugin area. If you compare the files, they are the same except for the square brace instead of greater then sign to start out the php statement.

Both of these files seem to be included in symfony 1.1 in the sf_sandbox, and I believe this might just be a bug.

Also of note, I didn't get this problem tell we moved code to a new server, so I still don't really understand why this bad file started getting added to the master class file array.
Re: "Fatal error: Class 'BaseFormPropel' not found" [message #71892 is a reply to message #71889 ] Mon, 09 February 2009 16:56 Go to previous message
cestcri  is currently offline cestcri
Messages: 232
Registered: August 2007
Location: Paris
Faithful Member
Thanks for your answer. This bug "allowed me" to explore and understand the autoload feature, so I'm digging everytime deeper into this beautiful framework.

Anyway, I'd say this bug should somehow be treated and removed for the next version, I hope they're already working on it.

In the meanwhile I follow your advice, thanks a million.


Have a nice day,
Christian
Previous Topic:installation sandbox - bad tutorial
Next Topic:OVH installation quick question
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software