symfony

How to create a dynamic menu in Symfony

While I do find that the PHP Symfony framework is wonderful for many things, I am finding it difficult to create easily scalable dynamic menus for a website. I am wondering how other Symfony developers out there have dealt with this issue. I will give a simple example as to what I am asking. If go to www.fool.com you will see that they...

Multiple database transaction

In my PHP application ( constructed using symfony framework and Propel ORM), when I add a record to the MYSQL database, I need to update an external MYSQL database using web service API provided by the external vendor. The question is what is the best practice to maintain the database integrity. Take for example, if the first update is ...

custom 500 error page in symfony 1.1

does symfony redirect to custom error page if Fatal PHP error occurs? ...

Symfony 1.2: Error when adding/editing entry in admin module

I get this error when trying to run the model module "user" in the app "backend" with backend_dev.php/user, then clicking "New" and adding some data: Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in C:\xampp\htdocs\sf_sandbox\lib\symfony\util\sfParameterHolde r.class....

How to set different template layout for different modules in Symfony

How to set different template layouts for different modules in Symfony? I have a banking application that consists of a login screen, and a member section. So when a user goes to my site he will be presented with a login screen. After login in he will be redirected to the member section that he can do his whatever banking needs. So, ho...

PHP: Storing objects in a Symfony plug-in module's lib/ directory

I am building a Symfony project, and have created a new plug-in named sfUtilsPlugin. I currently have a directory structure that looks like this: sfUtilsPlugin/ modules/ sfSearchLucene/ actions/ config/ lib/ templates/ Now, in the sfUtilsPlugin/modules/sfSearchLucene/lib dir...

What is the best IDE to use with the Symfony framework?

I'm looking for an IDE with use with the Symfony Framework. I have a bit of experience using the NetBeans 6.5 IDE but it does not always seem to complete the class methods, plus it doesn't seem to have any PHP code snippets built in. Here are the features I would ideally like to have, in order of importance, from an IDE: Code complet...

Where and How to define Constant in Symfony?

I have a few of my own constants in symfony, and I need to make them available throughout the application, where to best define them? I tried, in the directory myapps\config\config.php, define my constant in this way: sfConfig::set('aaa', 'mya'); But when I tried to access the constant in myapps\apps\frontend\modules\login\actions\ac...

Storing user session data into a customized database

It's possible to store user session in database by changing the settings in factories.yml: all: storage: class: sfMySQLSessionStorage param: db_table: session # Name of the table storing the sessions database: propel # Name of the database connection to use # Optional paramete...

How to get user data in form in Symfony 1.2?

I'm using Symfony 1.2 in a standard Propel form class. public function configure() { $this->setWidgets(array( 'graduate_job_title' => new sfWidgetFormInput( array(), array( 'maxlength' => 80, 'size' => 30, 'value' => '' ) ) )); //etc } However, I want the value of this field to come from the user information, which I'd no...

Deploy Symfony applications across multiple servers

For my Symfony application, I have at least two modules: Login Module Processing Module The Login Module is located on the gateway server; it does all the authentication when a user is first logging in. After that, it redirects to the processing module which is located on another server. Note that there can be many servers handling p...

How to Configure Symfony Configuration for Load balancing purpose?

How to configure symfony for load balancing purpose? Basically, my load balancing technique works like this: Determine where is the symfony module ( login module, main menu module etc) of an url Direct the module to appropiate servers. ...

How to generate SQL from fixture YMLs in Symfony 1.0?

Hello, I am trying to build a script to automate the update process for symfony projects. E.g. apply any patches from one revision to another including any possible model updates and new fixtures without re-loading the entire database. I have completed most of it, but I have been unable to find a way to generate an SQL file containing ...

Symfony routing problem

I've set a website up. If I try and click on a link such as register I get the following error: 404 | Not Found | sfError404Exception Empty module and/or action after parsing the URL "/trevelyan.alumni/register" (/). The links are generated using <?php print link_to( 'Register', 'register/index' ); ?> And I have a 'regi...

symfony Logging

During the day I am a Java developer, but at night I try stopping crime as a PHP superhero. My weapon of choice is symfony. We can say that I am training to be a superhero. In Java, I use log4J, a logging framework. In Log4j you can do something like this: if (log.isDebug()) { // do some expensive operation that should only be dis...

Can you force symfony resolve to a specific route?

Say that I have to following 2 routes in this order: Zip: url: home/:zip param: { module: home, action: results } State: url: home/:state param: { module: home, action: results } and I use a route such as: '@State?state=CA' Why does it resolve to the Zip route? I thought when you specified the route name explicitly: '@Stat...

How to configure symfony project in local server??

I am beginner for symfony. I have to configure the already developed project that is built using symfony. I changed the database information but when browse localhost/myproject/web there is nothing displayed. What can i do to configure the project in local server. I have created the database as well. Hope to get help. Thanks .......... ...

How painless is it to upgrade Symfony applications from 1.1 to 1.2

I am currently developing a system on a server running PHP version 5.1.6 thus I am forced to use Symfony 1.1 in the current environment. I am planning to migrate the application from 1.1 to 1.2 in the somewhat near future and I was wondering if anyone has any experience with this? I have attempted to migrate a system from 1.0 to 1.1 and ...

symfony: change application dir

I have ordinal symfony project which includes 2 applications: public and admin parts. I need to move admin application files to project_path/web/admin. So if I call www.project.com/admin the admin project will be shown. How should I configure project to allow that ? ...

How to Maintain Foreign Key Constraint Across Different Databases?

I know, I know, putting two related tables on different databases isn't exactly the best design practice. But for whatever's sake, suppose that I have to do it absolutely. And I have to break up two foreign-key-related tables that were previously located in a database into two databases, that are located on two different servers, but I s...