symfony

How to update symfony ?

It looks like it is a stupid question, but i could not figure how to update symfony to 1.3. When i follow the tutorial to update my project, one of the step says "Upgrade symfony to 1.3" which is actually what i am following the tuto for... Well i guess there is a difference between updating the project and symfony. But i can not find ou...

how to detect session timeout in symfony

Hi stackoverflowers, I'm currently working on a project with the php framework symfony. I've configured secured pages, defined 30 minutes for the session timeout and set the page where the user should be redirect if an unauthenticated user tries to access a secured page. I've remarked that he is also redirected there if he tries to acce...

using .htaccess to modify asset paths base on domain (multiple sites on one symfony app).

I'm building a symfony application thats made to run many sites. Similar to this article. So far so good except he uses some .htaccess "voodoo". To make it so image and css file links get rewriten so to point to a assets directory named after the current domain. Again read the article above if that doesn't make sense. Here is the line ...

incremental update with symfony/propel

Hi, I would like execute a query like this one in symfony using the Propel ORM: UPDATE ADS SET HITS=HITS+1 WHERE ID=10; I know that Propel API can let me set a previously fixed value for a column of a given record, but I definitely don't want to retrieve the column value first before issuing an update query since there are concurrent...

symfony sandbox and virtual host

I have installed symfony sandbox 1.2 and created a virtual host by modifying apache config like this (following this tut http://www.symfony-project.org/askeet/1%5F0/en/1 but I adapted as sandbox dirs are different from their tuts): NameVirtualHost 127.0.0.1:80 <VirtualHost 127.0.0.1:80> ServerName askeet DocumentRoot "c:/webserver/...

Best Step by Step tutorial for Symfony - (I am running PHP on Windows)

I have tried to follow the symfony tutorial here: http://www.symfony-project.org/book/1_2/03-Running-Symfony It's incoherent : It says to download the sandbox but the rest of the tutorial seems for the non-sandbox version. It's not a step by step as it seems and I can't get the same result. This is really frustrating and if I haven't a...

Extra changeColumns in Doctrine generate-migrations-diff

I'm generating migrations between different yaml schema files: i.e. running: symfony doctrine:generate-migrations-diff And the resulting migration file has a whole slew of changeColumn calls that weren't added in the last schema file change. For example, if you run generate-migrations-diff without changing your schema file whatsoever,...

Running a website from an encrypted partition

I am looking at the possibility of running a PHP-based website (built in symfony) from an encrypted partition on a LAMP server. The reason for this is because a client would have access to the server but I don't want them to see the source code behind the php website. I am open to other solutions if this is not possible. For example, p...

Symfony form validation for date fields (sfWidgetFormI18nDate)

I am using Symfony 1.2.9, and I have a form that contains two date fields: start_date AND end_date. I want to impose the following validation criteria for the 'start_date' field: i). CANNOT be less than todays date ii). CANNOT be greater than end_date iii). CANNOT be more than 1 month away For end_date, I want the following restric...

Data storage in PHP Frameworks

Actually, I'm looking for a framework which helps me using a "Data Mapper" pattern. I have noticed that a lot of PHP framework propose an "Active Record" implementation... I found the "Active Record" too poor for managing "functional data"... It also seems simpler to handle "complex transactions" with this pattern, or to handle non-DBMS...

Do I need to modify httpd.conf to get symfony to wor

Can someone tell me is it necessary to modify httpd.conf to get symfony to work? I am following a tutorial which says I need to edit httpd.conf file but my provider does not give me access to that file. from tutrial: http://www.symfony-project.org/cookbook/1%5F2/en/web%5Fserver Alias If you already have a website on a domain...

What is the best place for a template that can be used in multiple apps?

I have 2 apps in my Symfony framework: backend and frontend. is it possible to have templates that are being used by both apps? And if so, what is the best place to put those template? ...

How to run multiple versions of Symfony PHP Framework

I have several web projects built with Symfony v1.0, but I am excited by the new features in Symfony version 1.4 (Improved security, native email support and improved performance). How can I continue to develop my 1.0 projects but also create a testing environment for version 1.4? ...

Standard idiom for adding new models to an app built on Symfony + Doctrine

What is the a standard way of adding new model to my app built on Symfony + Doctrine while maintaining all previous models and their meta-data (like relationships). What am I really looking for: A command / procedure that will be equivalent of ./script/generate model FooModel in Ruby on Rails (which does not have any sort of reset db / ...

Symfony Admin Generator in multi user setup (restricting records in LIST view)

I am using SF 1.2.9 to build a website. I want to use the admin generator to provide admin functionality for the object models I have used (specifically LIST, edit and delete). I have read the Symfony docs (Chapter 14), but unless, I am very much mistaken, all examples I have come accross so far, seems to be written for a single user en...

Jquery Autocompleter Submitting Empty Value

I am playing around with the Jquery Autocompleter in sfFormExtraPlugin but I am having trouble when i need to create a value not already in the autocomplete list. The form always submits and empty value for the field with the autocomplete on it... i have found the mustMatch config option which is off by default .. i have also set it exp...

Should I upgrade from Symfony 1.2.9 to 1.4

I am a few weeks from hopefully launching my site (Yes, I know like I may be tempting fate, even merely asking this question). I am developing using SF 1.2.9 (using Propel ORM), but I am increasingly being tempted to upgrade to 1.4, least of all, I feel it will be less of an effort to migrate a life system from 1.4 to 2.0 later on, than...

How do I let two apps in Symfony share components?

I have frontend and admin apps in Symfony 1.2/Doctrine and both generate email messages. I see a lot of shared code doing the email between the two apps. If I wanted to consolidate the email into one component, where would it reside? Doesn't seem like it should go in the model. Suggestions? ...

customizing form templates (new/edit view) for admin generated modules

I am using SF 1.2.9 (with Propel ORM), to build a website. I have generated admin modules for some of my models. I want to modify the template used to display the Form because there are some fields that I dont want to display (but need) - example the 'slug' field in a form. Since the templates are autogenerated, I cant make the changes ...

How to give a user a credential when first created?

I am using Symfony 1.2.9 (with Propel ORM) on a website I am building. I have installed the sfGuard plugin and have created groups and permissions. Assume the credential in this case is 'foobar'. I am thinking of assigning the permission 'foobar' to a group 'foobarGrp', and then making new users, members of the group 'foobarGrp'. The as...