symfony

PHP sessions: What if I set the session expiry to 10 days?

I want the users of my application to stay logged in for very long periods of time. The problem is the the session expires on the server end, thus losing variables stored in the session. So, I'm setting the session to expire in 10 days. My question is: Is there any security or performance issues of setting the GC expiry and cookie lifet...

Validating a video upload in the Symfony Admin Generator

When using the admin generator to upload a video, my form is acting quite strangely. If the file is too large, i.e. it is larger than the PHP upload limit, the form displays the first error in the edit.yml file, or no error at all. My admin generator defines the video in the following way video_filename: help: Videos must ...

Can I change Symfony's view suffix in a global scope?

By default view files need to end in "Success". So my index view file would be named "indexSuccess.php". Is there a way to globally change this suffix? I'd like to set it to blank so that my view file could simply be named "index.php" ...

Symfony: email address as request parameter

I'm having some issues with passing an email address in a url to a symfony app. The url looks like example.com/unsubscribe/email/[email protected] It will always result in a sfError404Exception, except when the period is removed. After doing some googling around, the only solution I've yet seen is that htaccess is bypassing the url beca...

Many-to-many relation with attributes in refClass

Hello, I'm currently designing a website, using symfony (1.2) with Doctrine as an ORM. I have a Dinner class, a Criteria class, and a Mark class. A Mark is linked with a Dinner and a Criteria, and has private attributes, like DateOfMark, MarkValue, etc. Dinner and Criteria can have many Marks (or none). As I use Doctrine, I defin...

Symfony: Is it possible to setTemplate for components ?

There’s no setTemplate() for components! I know but maybe there is another way to do it ? (The question seems to be about a php framework: http://www.symfony-project.org/) ...

reverse engineering in symfony

I have a database. I am trying to reverse engineer using symfony to create schema.yml. I get this error message: [propel-schema-reverse] There was an error building XML from metadata: SQLSTATE[HY000]: General error: 2030 This command is not supported in the prepared statement protocol yet I can generate the schema.xml using Creole but ...

how to resolve symfony doctrine:build-schema error (Unknown relation alias table_name)

how to resolve this symfony error : C:\inetpub\wwwroot\project\trunk\preprod\signup>php symfony doctrine:build-schema --trace >> doctrine generating yaml schema from database [sfException] Unknown relation alias table_name Exception trace: at C:\inetpub\wwwroot\project\trunk\preprod\signup\lib\vendor\symfony\lib\plugins\sfDoc...

PHP Web development IDE

I am coming from a C++ background and am used to testing code by setting breakpoints, viewing variables in the debugger etc. I am now doing web development (using the symfony framework). what I really miss is not being able to set a breakpoint when a particular action is performed (e.g. a url clicked etc). Is there a FREE (GPL or other ...

Doctrine not Inserting Datetime in SQL Server

Doctrine ORM 1.0 inserts Datetime values in ISO8601 format; that is: '2009-10-23 12:31:22', but for some reason using SQL Server 2008 Express as my DB, throws an exception as if the value inserted was NULL. Here's the query: {sfDoctrineLogger} executeQuery : INSERT INTO [vbif_inventarios] ([anulado], [id_restaurante], [fecha_inventari...

Long script in admin, task in Symfony?

In the admin panel, when the admin selects an action it will load data from an API and save it to the DB. It could take from 2 seconds to 3 minutes, depending on what he is importing. How can I do in Symfony to create like a thread, so the admin is not waiting to finish. And when it's finished tell him to check the result? Are the task...

Doctrine - How do you ask WHERE cond1 AND ( cond2 OR cond3)

While using Doctrine in a Symfony project I've come into the situation where I need to apply a condition and then one of two following conditions (which both happen to be sub-queries). I know of the andWhere() and orWhere() functions, but am having trouble using these to generate things like: WHERE cond1 AND ( cond2 OR cond3) ...

Is it possible to use an offset when using the Symfony sfPager class?

I would like to disregard the first n items in a pager list of items. I.e. they are being used elsewhere in the design. So my pager list needs to be as such: Page 1: Items 8 - 17 Page 2: Items 18 - 27 Page 3: Items 28 - 37 ... However, setting an offset or limit in the criteria object does nothing. I presume they are used by the pag...

Restricting an entire symfony admin generator page according to credentials

I have a website with a large number of admin generators to take care of an assortment of tables. Within the realm of authenticated users, I want to be able to deny access, not just to individual actions or fields, but an entire admin module. There doesn't appear to be a global credentials parameter for generator.yml, and putting stuff ...

Is there any way to output the sql generated by a propel select in symfony?

I want to output the query generated by a symfony propel select for testing purposes. Is there any way to do this? I know I can use the sf_debug bar, but sometimes I need to see the statement in a situation where the sf_debug bar hasn't loaded yet, or isn't going to load at all. ...

Choosing routing.yml based on user culture?

In my Symfony application I would like to choose the routing.yml based on the current user's culture; 'en' => routing.en.yml 'no' => routing.no.yml and so forth. Any suggestion to how this can be done? Edit: I am not trying to do i18n this way - I use Symfony's built-in methods for that. I simply want "static" urls to reflect the us...

Symfony difference between <ModelName>.class.php and <ModelName>Table.class.php

Cuold someone explain me the difference between the Doctrine auto generated files .class.php and Table.class.php? For example in the Jobeet tutorial there's JobeetJob.class.php and JobeetJobTable.class.php (http://svn.jobeet.org/doctrine/trunk/lib/model/doctrine/sfJobeetPlugin/) I don't understand the role of each file and where I have ...

symfony routing problems

Hello, I'm building a site using symfony php framework. I have a link in my page which leads to page X : <a href="/X">test</a> well, the problem is, under my development environment, the link works and the link points to http://localhost/web/frontend%5Fdev.php/X but when Im using the production page (index.php) the link turns out ...

Symfony and Lucene

SOLVED See my answer below. Question left unchanged for anyone else who has trouble with this. I'd like to use lucene (or anything else that could be used withs symfony for searching really) however I can't get the sfLucene plugin to work (says there are no tasks in the namespace "lucene" when i do ./symfony lucene:initialize). What ...

symfony routing problems with index.php

hey fellas, I have a site built in symfony. However, I'm putting some routing rules : resgister: url: /register param: { module: register, action: index } and I put a link : link_to('register - here','register') but this link points to http://www.mydomain.com/register instead of http://www.mydomain.com/index.php/register s...