Ask your Symfony questions! Pay money and get answers fast! (more info)

Trying to move to new server - Fatal error Propel.php on line 345 Symfony

I developed a site on a server where Symfony 1.2.5 was installed via Pear. Now I have moved to a new server. This new server does not have Symfony installed. So I am installing it myself, in a sort of Sandbox setup. I downloaded [[LINK href="http://www.symfony-project.org/installation"]]Symfony 1.2.12[[/LINK]] and uploaded the lib folder to my projects folder lib/vendor/symfony.

Then I edit config/ProjectConfiguration.class.php. I edit the top line so it points to the new folder:

require_once '/home/dev15/public_html/lib/vendor/symfony/autoload/sfCoreAutoload.class.php';


But when I look at the site in the browser, using the dev controller, I get this error:

Fatal error: Call to a member function getParameters() on a non-object in /home/dev15/public_html/lib/plugins/sfPropelPlugin/lib/vendor/propel/Propel.php on line 345

I have deleted the cache and log folders, then re-created them and then chmod them 0777.

I copied over the database and changed the database config to have the current password and user. Where there any major changes in how databases were handled between Symfony 1.2.5 and 1.2.12? I'm assuming this should be a minor upgrade.

Any thoughts about what might be wrong?

My config/databases.yml file looks like this:


dev:
propel:
param:
classname: DebugPDO

test:
propel:
param:
classname: DebugPDO

all:
propel:
class: sfPropelDatabase
param:
classname: PropelPDO
dsn: mysql:dbname=xxx;host=localhost
username: xxx
password: xxx
encoding: utf8
persistent: true
pooling: true


These credentials allow me to log in from the command line.



Answers (5)

2011-02-16

Nate Flink answers:

It is necessary to make sure that the propel plugin is included with the lib, and that a sim link exists for it in the /web folder vis a vis:

/web/sfPropelPlugin -> ../lib/vendor/symfony/lib/plugins/sfPropelPlugin/web

2011-02-16

Claudio Dias answers:

Hi!

This information i thinks that is generic....
If you could show me the config/ProjectConfiguration.class.php or better, send to my e-mail the stack trace that is showed by the symfony 'cause this way i can check what's happens :)

2011-02-16

Ivan Rey answers:

I wonder why it's looking at your Propel.php at lib/plugins/sfPropelPlugin instead of lib/vendor/symfony/lib/plugins/sfPropelPlugin,

did you uncompress symfony in lib AND in lib/vendor/symfony? because it seems to be finding the clases in the lib folder first instead of the lib/vendor/symfony

2011-02-17

Yura Rodchyn answers:

Problem in your propel configuration. Look at your Propel.php on line 345. It can't load parameters from config file. Please show me your propel.ini and schema's files.

Or alternatively you can use sf_sandbox.tgz uncompress it and just copy your files there.
Sandbox is preconfigured and there will be no such errors.

Real symfony sandbox 1.2 is [[LINK href="http://www.symfony-project.org/get/sf_sandbox_1_2.tgz"]]here[[/LINK]]

2011-02-17

José Nahuel Cuesta Luengo answers:

Are you able to run any propel cli commands? I mean: $ php symfony propel:build-model or any of its friends..