[symfony-users] Re: Symfony Super Cache in 1.2

2009-10-02 Thread Stephen Melrose
It certainly needs some work, but as and when I have something I'm  
confident with, I'll get it on our company blog. Here's the URL if you  
wanna grab the RSS,

http://blog.madebypi.co.uk/

Thanks again for the replies guys!

Steve


On 2 Oct 2009, at 02:49, Pablo Godel pgo...@gmail.com wrote:

 Hi Stephen,

 Please contribute it if you can, or write a blog post about it.

 Thanks
 Pablo

 On Thu, Oct 1, 2009 at 6:07 PM, Stephen Melrose  
 step...@sekka.co.uk wrote:

 We're using APC, and it's a propel project. Still super duper slow!

 I ended up writing my own mini version of sfSuperCache that bypasses
 Symfony, but at the same time uses Symfony's cache.

 It is about 5ms slower than serving a static HTML file. Quite
 impressed with myself. Might release it as a plugin if I can tidy it
 up.

 Thanks anyway!

 On 1 Oct, 14:55, Mariusz Sasinski sasin...@weboticx.com wrote:
   We've been doing some tests, and even with pages that are cached  
 with
   the layout, the overhead Symfony produces is phenomenal compared  
 to
   just reading a file from the server.
 
  Well, it's hard to expect symfony to be as fast as a static html  
 file
  First of all you need to have XCache or APC installed. Then, if  
 you are using
  Doctrine, you should also configure your project to use  
 Doctrine_Cache to
  either use Memcache or APC, and add -useResultCache(true); to  
 your queries.
 
  You may also switch to Nginx, with php-cgi.
 
  Last but not least, read this and see if you can implement some of  
 the
  suggestions  from this articlehttp://developer.yahoo.com/ 
 performance/rules.htm
 
  Mariusz




 -- 
 Pablo Godel
 ServerGrove Networks
 http://servergrove.com/

 

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] From Propel to Doctrine... for every projects ?

2009-10-02 Thread Adrien Mogenet

Hi everyone,

I developping a simple association manager, which can manage
members, fees, expenses, activities, accounts...
I'm using symfony 1.2 (trunk) and Propel 1.3 (trunk also).

I know that symfony will evolve with Doctrine and not with Propel
anymore.

So I'm wondering if it would be interesting to change my current ORM,
even if it's a small project.
Will it take a long time to perform this change ?

Will it be interesting in the near future to change from Propel to
Doctrine ?


If you have any experience to share, feel free :-)

--
Adrien Mogenet
Looking for a 6 month internship, opensource/innovative projects
http://adrien.frenchcomp.net
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: JobeetJobTable class vs JobeetJob class

2009-10-02 Thread Gábor Fási

They have very different purposes, it only makes sense to separate
them, work with them a bit, and you'll see :)

On Fri, Oct 2, 2009 at 01:58, Keith kmedli...@gmail.com wrote:

 That makes sense.  Interesting that it's split up like that rather
 than all being in a single model class, but interesting nevertheless.

 On Oct 1, 4:48 pm, Gábor Fási maerl...@gmail.com wrote:
 You use the Model class when dealing with a single element - like a
 blog entry, or a blog comment; and you use the ModelTable class when
 dealing with the table - like when you retrieve some records from it.
 When retrieving items via the ModelTable class, you get a collection
 of Model objects.

 On Thu, Oct 1, 2009 at 22:25, Keith kmedli...@gmail.com wrote:

  I'm working through the Jobeet tutorial to learn 1.2 after a long
  hiatus from Symfony.

  What is the difference between the ModelTable and the Model class in
  the model/doctrine/ directory?

  When is it appropriate to use each?  I'm assuming it has something to
  do with how requests are processed and the order in which these model
  classes get processed, but I may have overlooked it or not understood
  the tutorial if it covered it.

  Thanks for the help!
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: From Propel to Doctrine... for every projects ?

2009-10-02 Thread Gábor Fási

The default ORM will be doctrine, but propel will be supported,
hopefully for a long time. I've used it in many projects, and I don't
plan on switching - no reason to :)
I started learning doctrine when propel seemed to be abandoned, so I
can start new projects with it, but it got a new leader, and it's
under development again.
Unless you have a good reason to change, it's unneccesary - propel is
alive, and it will do so for a while.
If you followed the MVC separation, it will be a relatively easy task
to switch - almost all the code you need to tamper with is in the
model classes.

Gábor

On Fri, Oct 2, 2009 at 09:15, Adrien Mogenet adrien.moge...@gmail.com wrote:

 Hi everyone,

 I developping a simple association manager, which can manage
 members, fees, expenses, activities, accounts...
 I'm using symfony 1.2 (trunk) and Propel 1.3 (trunk also).

 I know that symfony will evolve with Doctrine and not with Propel
 anymore.

 So I'm wondering if it would be interesting to change my current ORM,
 even if it's a small project.
 Will it take a long time to perform this change ?

 Will it be interesting in the near future to change from Propel to
 Doctrine ?


 If you have any experience to share, feel free :-)

 --
 Adrien Mogenet
 Looking for a 6 month internship, opensource/innovative projects
 http://adrien.frenchcomp.net
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: spl support: undefined function spl_autoload_register()

2009-10-02 Thread Davide Borsatto

SPL should can not be disabled IMHO. It's called Standard PHP Library,
why would someone not enable that...
Same as filter library (I'm talking to you, my crappy hosting, I hate
you).

Back to the topic, I don't think symfony (or its cache) is the problem
here, since it can not even load the core classes.

PHP (at least in ubuntu) has php.ini configuration files for different
environments, so even if SPL is enabled in CLI mode, it's not sure it
is also enabled for apache. Check this out...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: How to execute a stored procedure on a remote db server throught symfony?

2009-10-02 Thread Gareth McCumskey
This article is what I read when I needed to setup and manage multiple
databases in symfony:

http://www.lampjunkie.com/2008/04/using-multiple-databases-in-symfony-with-propel/

The best bet to see how custom queries run is to look at the Propel
documentation itself on the doSelectRS statement if you use Propel 1.2 or
the doSelectStmt for Propel 1.3. Google should find you loads.

On Thu, Oct 1, 2009 at 4:10 PM, Farrukh Abbas
strategy.vs.lo...@gmail.comwrote:

 yeah thanks for the heads up ... i don't have a choice, my application has
 to interact with a third party service and the only way they provide is
 through stored procedures ... so really don't have a choice ... any pointers
 to where i can get some good read about propel custom queries? and also
 connecting to another db ... coz i have to get the data from the other db
 and put it in my db
 thanks

 On Thu, Oct 1, 2009 at 8:26 AM, Gareth McCumskey gmccums...@gmail.comwrote:

 Stored procedures, while seemingly convenient, are actually not a good
 idea if you want to ensure your application remains properly database
 abstracted/agnostic. Stored procedures are in most cases not transferable
 between database type. For example, MySQL handles stored procedures very
 differently to MSSQL and there are differences as well to PostgreSQL.

 In my development I avoid stored procedures and only use them as a last
 resort and even then as little as possible and reluctantly. Usually you can
 replicate what a stored procedure does in code and so they are not actually
 necessary.

 If you do use Propel custom queries you will probably need to look at
 using the doSelectRS (Propel 1.2) or doSelectStmt(Propel 1.3 and up) to
 accomplish it, but bear in mind the implications if you need to switch
 databases.

 On Mon, Sep 28, 2009 at 2:42 AM, dagger strategy.vs.lo...@gmail.comwrote:


 Hi,

 in my current project I have to connect to a remote system and execute
 some stored procedures then get the returned data and save it on to
 the local database... Is there a way I can achieve this through
 symfony or would I have to bank on plain php?

 Your time n help is highly appreciated... Thx




 --
 Gareth McCumskey
 http://garethmccumskey.blogspot.com
 twitter: @garethmcc





 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: JobeetJobTable class vs JobeetJob class

2009-10-02 Thread Gareth McCumskey
Propel does the same thing. Pretty much its to seperate any of your own
methods designed to be called as static functions that will perform just
quick queries on the database where you don't need to work on instanced
version necessarily to get what you need. Otherwise you would have to
instantiate an object, use mutators to set variables then run queries, etc,
whereas with this seperation you can just run a method on a class and
quickly grab some results.

On Fri, Oct 2, 2009 at 1:58 AM, Keith kmedli...@gmail.com wrote:


 That makes sense.  Interesting that it's split up like that rather
 than all being in a single model class, but interesting nevertheless.

 On Oct 1, 4:48 pm, Gábor Fási maerl...@gmail.com wrote:
  You use the Model class when dealing with a single element - like a
  blog entry, or a blog comment; and you use the ModelTable class when
  dealing with the table - like when you retrieve some records from it.
  When retrieving items via the ModelTable class, you get a collection
  of Model objects.
 
  On Thu, Oct 1, 2009 at 22:25, Keith kmedli...@gmail.com wrote:
 
   I'm working through the Jobeet tutorial to learn 1.2 after a long
   hiatus from Symfony.
 
   What is the difference between the ModelTable and the Model class in
   the model/doctrine/ directory?
 
   When is it appropriate to use each?  I'm assuming it has something to
   do with how requests are processed and the order in which these model
   classes get processed, but I may have overlooked it or not understood
   the tutorial if it covered it.
 
   Thanks for the help!
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Component- Templating

2009-10-02 Thread Gareth McCumskey
Whats wrong with magic in symfomy? Perhaps point out to him that at anytime
you can go and see exactly what symfony does in its magic. Also, I'd
rather have symfony auto-generate code for me where a far larger number of
developers have tested, used, implemented and stressed that magic code for
bugs than my own implementation which will have no where near the same
amount of tested use for bugs. Pretty much , anything symfony can do for me
means less potential bugs. Try that on the lead developer

On Thu, Oct 1, 2009 at 9:14 PM, ProdigitalSon ant.cunning...@gmail.comwrote:


 Haha... more or less my stance.

 Its not that Zend is horrible - its just that it is lacking most of
 the time saving magic I've been spoiled with by Symfony and Django.
 Then again the lead developer is against magic, which means we are
 spending a lot of time implementing a lot of things when we could have
 easily leveraged existing tools with no ill effects.

 ORM being one shining example. Sure we could have used Propel or
 Doctrine but that would just make development too magical  - no,
 better to re-implement the features we need using Zend_Db as the DBAL.
 sigh /

 On Oct 1, 2:28 pm, Richtermeister nex...@gmail.com wrote:
  I'll take that :)
 
  Because Zend feels like Symfony after you drop it from 100feet into
  little bits that need sketchy re-assembly.
  I feel your pain ;)
 
  Daniel
 
  On Sep 30, 1:05 pm, Eno symb...@gmail.com wrote:
 
   On Wed, 30 Sep 2009, ProdigitalSon wrote:
If you get around to plugging it in to 1.3 id love to see a simple
 how-
to since its on my list of personal projects to pursue once i escape
my current Zend Hell ;-)
 
   Why do you call it Zend Hell ? :-)
 
   --
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: About embed forms

2009-10-02 Thread Francisco José Núñez Rivera
But all the opinions have the same features.

Feature - id , desc
1,Feature 1 ; 2, Feature2...

Opinion shows all the features..
Feature 1 -Score:
Feature 2 - Score:

OpinionFeature - opinion_id , feature_id , score
I only insert a row here when im scoring a feature.

I think my schema is right... no?

Thank you very much.







2009/10/1 Abraham Montilla amontil...@gmail.com

 elkrema, if you have I have an Opinion with many Features then the right
 schema is

 Feature is: id, opinion_id, desc
 OpinionFeature is: opinion_id, score

 that's why you have an integrity constraint violation I don't know how
 i missed that first time i read your post hehe, that's all the problem

 2009/10/1 elkrema elfra...@gmail.com


 With unsetting only option id doesn't work.

 The problem is that i am inserting the object of main form and the
 embedded objects too.

 But i found a solution... I rewrite the function saveEmbeddedForms in
 OpinionForm

  public function saveEmbeddedForms($con = null, $forms = null)
  {

foreach($this-getEmbeddedForms() as $opinionForm)
{

  $opinionForm-getObject()-setOpinionId($this-getObject()-getId
 ());
}


parent::saveEmbeddedForms($con, $forms);
  }

 I set the opinionid before saving the embed formsI dont know if is
 the good way..

 Otherwise i have a new problem..

 when i'm editing an opinion the value of the last feature is not
 showed.. ¿?

 Thank you!






 On 30 sep, 07:21, Abraham Montilla amontil...@gmail.com wrote:
  try just unsetting opinion_id, tell me if works
 
  2009/9/29 elkrema elfra...@gmail.com
 
 
 
 
 
   Hello Abraham,
 
   This is my code with i'm embedding forms in OpinionForm:
 
   foreach($this-getObject()-getFeatures() as $feature)
   {
$opinionf = new OpinionFeature();
$opinionf-setOpinionId($this-getObject()-id);
$opinionf-setFeatureId($feature-getId());
$this-embedForm($feature-getName(), new OpinionFeatureForm
   ($opinionf));
   }
 
   With this code in when saving always get this flash message in the
   first Feature...
 
  * Feature id: Invalid.
 
   And if i configure OpinionFeatureForm to unset the fields (just for
   testing)
 
  unset($this['opinion_id'], $this['feature_id']);
 
   I get ..
 
   SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
   update a child row: a foreign key constraint fails
   (`opinion`.`opinion_feature`, CONSTRAINT `opinion_feature_ibfk_1`
   FOREIGN KEY (`opinion_id`) REFERENCES `opinion` (`id`) ON DELETE
   CASCADE)
 
   Thank you for helping
 
   On 29 sep, 01:25, Abraham Montilla amontil...@gmail.com wrote:
i think it's because when embedding the OpinionFeatureForms you're
 not
setting properly the foreign key to the objects, would be something
 like
 
for ( $i  . ){
$opfeat = new OpinionFeature();
$opfeat-setOpinionId($this-getObject-getId());
$OFform = new OpinionFeatureForm($opfeat);
$this-embedForm('Feature_'.$i, $OFform);
 
}
 
2009/9/28 elkrema elfra...@gmail.com
 
 Hello
 
 i have some problems with my embed forms and i can't find a
 solution...
 
 I have an Opinion with many Features..
 
 Feature is: id, desc
 OpinionFeature is: opinion_id, feature_id,score
 
 In OpinionForm i'm inserting with [for each] all the features, but
 when im creating a new opinion i always get [Integrity constraint
 violation]
 
 I'ts easy get the id of the feature but i can get the ID of the
 opinion because it isnt created yet... is null.
 
 Somebody can help me please? I get trought many forums and jobeet
 tutorial but i cant get the solution!
 
 PS. Sorry for me english!!
 
--
Have a nice day.
Abraham Montilla.
 
  --
  Have a nice day.
  Abraham Montilla.




 --
 Have a nice day.
 Abraham Montilla.

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Upgrading to 1.2 on PHP 5.1

2009-10-02 Thread Gareth McCumskey
Hi all,

We are currently running a project on the symfony 1.1 release. Not ideal I
know but we do have some issues regarding upgrading PHP to 5.2.4 (minimum
requirements for symfony 1.2 and up) and so I was wondering if anyone was
able to get symfony 1.2 running on a machine with PHP 5.1 installed.

I did try previously. The biggest stumbling block is Propel 1.3 bundled with
symfony 1.2 uses PHP's PDO which only came with PHP 5.2. In addition, if I
remember correctly, there was an issue with the symfony classes using PHP
5.2 specific functions only, such as the DateTime classes.

I know everyones knee jerk reaction will be Just upgrade PHP which is
something we are investigating to do but we may potentially have no solution
that the system administrators/Technical Director will be happy with so it
would be helpful if there was some way to use symfony 1.2 anyway.

-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Upgrading to 1.2 on PHP 5.1

2009-10-02 Thread david

It would require some patching but you might be able to use 1.2 in  
conjunction with some of the PEAR libs.
I know there's a PEAR compat lib that's designed to help with this type of  
issue.

On Fri, 02 Oct 2009 13:11:34 +0200, Gareth McCumskey  
gmccums...@gmail.com wrote:

 Hi all,

 We are currently running a project on the symfony 1.1 release. Not ideal  
 I
 know but we do have some issues regarding upgrading PHP to 5.2.4 (minimum
 requirements for symfony 1.2 and up) and so I was wondering if anyone was
 able to get symfony 1.2 running on a machine with PHP 5.1 installed.

 I did try previously. The biggest stumbling block is Propel 1.3 bundled  
 with
 symfony 1.2 uses PHP's PDO which only came with PHP 5.2. In addition, if  
 I
 remember correctly, there was an issue with the symfony classes using PHP
 5.2 specific functions only, such as the DateTime classes.

 I know everyones knee jerk reaction will be Just upgrade PHP which is
 something we are investigating to do but we may potentially have no  
 solution
 that the system administrators/Technical Director will be happy with so  
 it
 would be helpful if there was some way to use symfony 1.2 anyway.



-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Upgrading to 1.2 on PHP 5.1

2009-10-02 Thread Fabian Lange

You dont need much of PEAR
Fabian

On Fri, Oct 2, 2009 at 1:40 PM, david da...@inspiredthinking.co.uk wrote:

 It would require some patching but you might be able to use 1.2 in
 conjunction with some of the PEAR libs.
 I know there's a PEAR compat lib that's designed to help with this type of
 issue.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Upgrading to 1.2 on PHP 5.1

2009-10-02 Thread Gareth McCumskey
Would you be able to elaborate at all? :P

On Fri, Oct 2, 2009 at 1:42 PM, Fabian Lange 
fabian.la...@symfony-project.com wrote:


 You dont need much of PEAR
 Fabian

 On Fri, Oct 2, 2009 at 1:40 PM, david da...@inspiredthinking.co.uk
 wrote:
 
  It would require some patching but you might be able to use 1.2 in
  conjunction with some of the PEAR libs.
  I know there's a PEAR compat lib that's designed to help with this type
 of
  issue.

 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] project:disable not working

2009-10-02 Thread Steve Sanyal

Hi,

I'm trying to use project:disable when I perform app maintenance, but
it doesn't seem to work.  I see the following output:

xxx [~/x/myapp]# ./symfony project:disable frontend prod
 file+ /home//myapp/data/frontend_prod.lck
 enablefrontend [prod] has been DISABLED

But when I go to the application on the web it works fine.  Is there
something else I need to do?  I am using symfony 1.2.7.

Thanks,
Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: project:disable not working

2009-10-02 Thread Gábor Fási

http://www.symfony-project.org/reference/1_2/en/04-Settings#chapter_04_sub_check_lock

On Fri, Oct 2, 2009 at 15:39, Steve Sanyal steve.san...@gmail.com wrote:

 Hi,

 I'm trying to use project:disable when I perform app maintenance, but
 it doesn't seem to work.  I see the following output:

 xxx [~/x/myapp]# ./symfony project:disable frontend prod
 file+     /home//myapp/data/frontend_prod.lck
 enable    frontend [prod] has been DISABLED

 But when I go to the application on the web it works fine.  Is there
 something else I need to do?  I am using symfony 1.2.7.

 Thanks,
 Steve
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: project:disable not working

2009-10-02 Thread Steve the Canuck

Thanks!

On Oct 2, 9:41 am, Gábor Fási maerl...@gmail.com wrote:
 http://www.symfony-project.org/reference/1_2/en/04-Settings#chapter_0...

 On Fri, Oct 2, 2009 at 15:39, Steve Sanyal steve.san...@gmail.com wrote:

  Hi,

  I'm trying to use project:disable when I perform app maintenance, but
  it doesn't seem to work.  I see the following output:

  xxx [~/x/myapp]# ./symfony project:disable frontend prod
  file+     /home//myapp/data/frontend_prod.lck
  enable    frontend [prod] has been DISABLED

  But when I go to the application on the web it works fine.  Is there
  something else I need to do?  I am using symfony 1.2.7.

  Thanks,
  Steve
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] schema design

2009-10-02 Thread mbernasocchi

Hi I've a question regarding how to design a feature of my project.
my project has a question/answer section, a forum section and a
tutorial section.
I want to add a flag as inapropriate functionality to each of the
tables (question, answer, forum, forum_comment, recipe,
recipe_comment). I want to have a table where i store who flagged
which object. if the same object if flagged twice then it's 'is_abuse'
field is set to true and the abuser's account is blocked.

now I'we two ideas how to solve this and Im wondering which one you
consider better:

1. create a single table with object_type and object_id as attribute
[code]AbuseFlags:
   columns:
object_type:
  type: enum
  values: [question, answer, forum, forum_comment, recipe,
recipe_comment]
  primary: true
  notnull: true
object_id:
  type: integer(4)
  primary: true
  notnull: true
flagger_user_id:
  type: integer(4)
  primary: true
  notnull: true
abuser_user_id:
  type: integer(4)
  primary: true
  notnull: true
[/code]

2. create a separate table (like a m:n relation) for each object type.
[code]ForumCommentsAbuseFlags:
   columns:
forum_comment_id:
  type: integer(4)
  primary: true
  notnull: true
flagger_user_id:
  type: integer(4)
  primary: true
  notnull: true
abuser_user_id:
  type: integer(4)
  primary: true
  notnull: true
[/code]


or do you have a better idea, I'm shure this has been done a coupple
of times allready!
As far as i'm concerned I wouldent mind having some model method
taking care of getting the table name of the offending object and set
it as object_type in the AbuseFlag table.I was just wondering if from
a design (and symfony -my first project with it-) point of view which
one made more sense

thanks a lot
Marco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: sfGrid and Custom query

2009-10-02 Thread LvanderRee

Hi Alex,

sorry I completely missed this thread!
Last week however I implemented a extenstion on sfDataSourcePropel,
that allowed me to perform a custom query (not only by defining
criteria, but also by overruling PropelBasePeer to define my own inner-
queries, with nested select-queries). I however still used hydration
to process the results and allow to define relations (and perform
joins).
When I am back at the office monday I will post some of my work, so
you can see how I solved this issue

Regards
Leon

On Oct 1, 3:33 pm, alex knol alexk...@gmail.com wrote:
 Gareth,

 That's what I tried at first too, but what if you cannot get data from this
 because it's an aggregate function based on a parameter

 Then you would have to look in the criteria (in the propel case) or DQL (in
 the case of doctrine) to see if the alias is defined and you can count on
 getting the field in the dataset.

 Best Regards,
 Alex Knol
 Company: Pumiwex S.L.U.
 Country: Espana

 On Thu, Oct 1, 2009 at 3:28 PM, Gareth McCumskey gmccums...@gmail.comwrote:

  I didn't realise you were using Doctrine. I have been using Propel pretty
  much exclusively myself when I get into symfony at 1.0. My thinking is that
  a solution for Propel would be to just create that method in the tables
  model class to catch calls to that column and return what the result should
  be.

  On Thu, Oct 1, 2009 at 2:49 PM, E_lexy alexk...@gmail.com wrote:

  Hi all,

  @Gareth, The class doesn't have this method because the column is the
  result of an aggregate function in the Doctrine_query

  I have found a solution for the doctrine way, I guess it will be more
  or less the same for Propel.
  Don't know if it is the nicest way, feel free to comment

  The reason sfGrid cannot find the column is because it is looking in
  the model, not in the query feeding the datasource.
  I have not tested with other kind of datasources, but this seems to
  work for Doctrine_query:

   /**
    * @see sfDataSourceInterface::requireColumn()
    */
   public function requireColumn($column)
   {
     if (!$this-getTable()-hasColumn($column))
     {
       //var_dump($this-query-getAggregateAlias($column));
       if(!$this-query-getAggregateAlias($column)) {
         throw new LogicException(sprintf('The column %s has not been
  found in the datasource columns or the model %s', $column, $this-
  getTable()));
       }
     }
   }

  It checks whether the column you wanted is spcified as an aggregate
  alias in the query.

  On 1 okt, 14:30, Gareth McCumskey gmccums...@gmail.com wrote:
   Class Idea has no method called getideaRelationId

   Should your getter not be getIdeaRelationId ... note the case of that i
   after the get. Perhaps in your code you are calling the method with bad
  case

   On Mon, Sep 7, 2009 at 11:34 AM, E_lexy alexk...@gmail.com wrote:

I am trying to use sfGrid based on a custom query-datasource.
This custom query contains a result of a calculated field.
Symfony complains a bout not being able to find a setter. -
understandable.

I believe i need make a setter, but where? in Idea?

Datasource:
[code]
object(sfDataSourcePropel)[81]
 protected 'data' = null
 protected 'connection' = null
 protected 'baseClass' = string 'Idea' (length=4)
 protected 'objectPaths' =
   array
     0 = string 'Idea' (length=4)
 protected 'selectCriteria' =
   object(Criteria)[82]
     private 'ignoreCase' = boolean false
     private 'singleRecord' = boolean false
     private 'selectModifiers' =
       array
         empty
     private 'selectColumns' =
       array
         empty
     private 'orderByColumns' =
       array
         empty
     private 'groupByColumns' =
       array
         empty
     private 'having' = null
     private 'asColumns' =
       array
         'ideaRelationId' = string '(select IdeaRelationID
     from IdeaRelations
     where State = E
       and ((SourceID = IdeasListView.IdeaID
             and TargetID = )
       or (SourceID =
             and TargetID = IdeasListView.IdeaID)))' (length=226)
     private 'joins' =
       array
         empty
     private 'dbName' = string 'propel' (length=6)
     private 'primaryTableName' = null
     private 'originalDbName' = null
     private 'limit' = int 10
     private 'offset' = int 0
     private 'blobFlag' = null
     private 'aliases' =
       array
         empty
     private 'useTransaction' = boolean false
     private 'map' =
       array
         'idea.ID' =
           object(Criterion)[77]
             private 'value' = string 'select id from idea_list_view
where id != ' (length=42)
             private 'comparison' = string 'CUSTOM' (length=6)
             private 'table' = string 'idea' (length=4)
             private 'realtable' 

[symfony-users] Global validation: Propel unique validator issue

2009-10-02 Thread yengama...@gmail.com

Hi,

I have an application that has Volunteers, each one belonging to an
Organisation with an assigned code. I need to check that there cannot
be duplicated volunteers' codes within an organisation, so I used a
sfValidatorPropelUnique passing code and organisation id as
arguments.

When i log in as an organisation, I remove the organisation id field
in the volunteer form, as an organisation cannot change it (it's a
super-admin privilege). The problem is that PropelUnique validator
doesn't work if organisation id field isn't in the form. How can i
solve this? Do I need to change it to hidden?

Thanks in advance.

ps. I'm using admin generator, so a generator-ready solution would be
very appreciated (avoiding partials if possible)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: schema design

2009-10-02 Thread david

Consider writing a behavior - which you can then attach to whatever tables  
you wish.

Checkout:  
http://www.doctrine-project.org/documentation/manual/1_1/en/behaviors


On Fri, 02 Oct 2009 16:11:23 +0200, mbernasocchi mbernasoc...@gmail.com  
wrote:


 Hi I've a question regarding how to design a feature of my project.
 my project has a question/answer section, a forum section and a
 tutorial section.
 I want to add a flag as inapropriate functionality to each of the
 tables (question, answer, forum, forum_comment, recipe,
 recipe_comment). I want to have a table where i store who flagged
 which object. if the same object if flagged twice then it's 'is_abuse'
 field is set to true and the abuser's account is blocked.

 now I'we two ideas how to solve this and Im wondering which one you
 consider better:

 1. create a single table with object_type and object_id as attribute
 [code]AbuseFlags:
columns:
 object_type:
   type: enum
   values: [question, answer, forum, forum_comment, recipe,
 recipe_comment]
   primary: true
   notnull: true
 object_id:
   type: integer(4)
   primary: true
   notnull: true
 flagger_user_id:
   type: integer(4)
   primary: true
   notnull: true
 abuser_user_id:
   type: integer(4)
   primary: true
   notnull: true
 [/code]

 2. create a separate table (like a m:n relation) for each object type.
 [code]ForumCommentsAbuseFlags:
columns:
 forum_comment_id:
   type: integer(4)
   primary: true
   notnull: true
 flagger_user_id:
   type: integer(4)
   primary: true
   notnull: true
 abuser_user_id:
   type: integer(4)
   primary: true
   notnull: true
 [/code]


 or do you have a better idea, I'm shure this has been done a coupple
 of times allready!
 As far as i'm concerned I wouldent mind having some model method
 taking care of getting the table name of the offending object and set
 it as object_type in the AbuseFlag table.I was just wondering if from
 a design (and symfony -my first project with it-) point of view which
 one made more sense

 thanks a lot
 Marco
 


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Global validation: Propel unique validator issue

2009-10-02 Thread yengama...@gmail.com

BTW, a hidden input does the job, buy i have the risk of a user trying
to change organisation id with a custom request. So, how can i prevent
it?

On Oct 2, 6:10 pm, yengama...@gmail.com yengama...@gmail.com
wrote:
 Hi,

 I have an application that has Volunteers, each one belonging to an
 Organisation with an assigned code. I need to check that there cannot
 be duplicated volunteers' codes within an organisation, so I used a
 sfValidatorPropelUnique passing code and organisation id as
 arguments.

 When i log in as an organisation, I remove the organisation id field
 in the volunteer form, as an organisation cannot change it (it's a
 super-admin privilege). The problem is that PropelUnique validator
 doesn't work if organisation id field isn't in the form. How can i
 solve this? Do I need to change it to hidden?

 Thanks in advance.

 ps. I'm using admin generator, so a generator-ready solution would be
 very appreciated (avoiding partials if possible)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] a form to create multiple objects

2009-10-02 Thread MoUeTtE

Hi everybody,
I'm currently developing an application in which I have to create
objects that is linked to a week day.
Up to now, I select the weekday for every object, but most of the time
every field in the object is the same except this weekday.

What would be the best practice to have the user fill the form only
once ?

in order to be clearer, i'll give you a sample of what I mean.

schema.yml

propel:
  object:
id: ~
name: varchar(255)
weekday: integer

  link_user_object:
user_id:   ~
object_id:  ~

let's say I want to create an object called 'Test' for days from
Monday to Friday, up to now I have to create one for Monday, one for
Tuesday... you got it, it turns out to be too long (I actually have a
lot of data to fill in)

So, my question is what is the best practice to have my form save
method creating several object after I changed the weekday widget
'multiple' option to true ? Should I use another foreign table to
store the weekday only ? I'm afraid it could make the application
slower (up to A request out of 2 are concerning this table), and
performances are critical.

Hope I made myself clear,

Julien
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] iCalender support in Symfony

2009-10-02 Thread DEEPAK BHATIA
A plugin for the same would do wonders for Symfony...Please share your
thoughts

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: schema design

2009-10-02 Thread Gareth McCumskey
Your first solution is nice and simple but it has one big flaw. Because you
use enum if you want to add another type later that means you now have to
edit database schema to accomplish it.

One tactic which might work better is instead of enum'ing a few types just
use the table name as the type and your code can dynamically look for
matching table names of abuse instead. Also, this means that should you need
another type just go ahead and use it without worrying.

On Fri, Oct 2, 2009 at 4:11 PM, mbernasocchi mbernasoc...@gmail.com wrote:


 Hi I've a question regarding how to design a feature of my project.
 my project has a question/answer section, a forum section and a
 tutorial section.
 I want to add a flag as inapropriate functionality to each of the
 tables (question, answer, forum, forum_comment, recipe,
 recipe_comment). I want to have a table where i store who flagged
 which object. if the same object if flagged twice then it's 'is_abuse'
 field is set to true and the abuser's account is blocked.

 now I'we two ideas how to solve this and Im wondering which one you
 consider better:

 1. create a single table with object_type and object_id as attribute
 [code]AbuseFlags:
   columns:
object_type:
  type: enum
  values: [question, answer, forum, forum_comment, recipe,
 recipe_comment]
  primary: true
  notnull: true
object_id:
  type: integer(4)
  primary: true
  notnull: true
flagger_user_id:
  type: integer(4)
  primary: true
  notnull: true
abuser_user_id:
  type: integer(4)
  primary: true
  notnull: true
 [/code]

 2. create a separate table (like a m:n relation) for each object type.
 [code]ForumCommentsAbuseFlags:
   columns:
forum_comment_id:
  type: integer(4)
  primary: true
  notnull: true
flagger_user_id:
  type: integer(4)
  primary: true
  notnull: true
abuser_user_id:
  type: integer(4)
  primary: true
  notnull: true
 [/code]


 or do you have a better idea, I'm shure this has been done a coupple
 of times allready!
 As far as i'm concerned I wouldent mind having some model method
 taking care of getting the table name of the offending object and set
 it as object_type in the AbuseFlag table.I was just wondering if from
 a design (and symfony -my first project with it-) point of view which
 one made more sense

 thanks a lot
 Marco
 



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] How to know if an object has been modified

2009-10-02 Thread Ignacio Bergmann
Hello, this is my first message to the list... hope it isn't a silly
question.

I'm using Doctrine, and I have a class in my model which has a field that
stores the name of a file (a picture).

I have automated the deletion of those files when the corresponding record
is delete using the postDelete method.

Now, I want to automate the deletion of old files when they are changed for
a new one. For this I was trying to use preSave and postSave methods, but I
need to know if the 'file' field of my object is different of the one stored
in the database.

I have tried using the getModified method, but it gives me the new value of
the field, instead of the old one. Also, the getLastModified method that the
Doctrine documentatios suggests doesn't exist.

I'm trying to implement this in the class definition of the object instead
of implementing it on the form definition file, I think this is were this
kind of task belong, but I might be wrong (I made it work overriding the
doSave method of the form, but I still want to move it to the class).

I'm open to suggestions. Thanks,

Nacho
http://card.ly/nachocual



My code (that doesn't work):

class Mascotas extends BaseMascotas
{
  var $cambios;
  public function preSave($event)
  {
$this-cambios = $event-getInvoker()-getModified(true);
  }

  public function postSave($event)
  {
if($this-cambios['foto1'])
  {
$this-deletePictures($this-cambios['foto1']);
  }
  }
}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Prebuild cache?

2009-10-02 Thread Eno

On Fri, 2 Oct 2009, Martin wrote:

 After deployment on production server there is always the delay on
 first request.
 To switch to a new version I change the symlink from the old to the
 new project directory.
 Can I prebuild the yml- and routing-cache somehow before symlinking?


http://www.symfony-project.org/book/1_2/18-Performance#chapter_18_sub_generating_cached_pages



-- 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: schema design

2009-10-02 Thread Eno

On Fri, 2 Oct 2009, david wrote:

 Consider writing a behavior - which you can then attach to whatever tables  
 you wish.
 
 Checkout:  
 http://www.doctrine-project.org/documentation/manual/1_1/en/behaviors

+1


-- 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: a form to create multiple objects

2009-10-02 Thread david


Storing representation of dates, while not complex, really comes down to  
what you want to do with them and the granularity you wish to work at.
You have several options - and different people have different personal  
preferences and it boils down to where you want to do the processing.

Remember - what you store - isn't necessarily what you present.  You can  
always accept date ranges in the model - and store it differently in the  
db.

1) Continue as you are, represent days as single records and shift the  
processing up a level to the model
2) Store dates as weeks in the DB - here your object would be have a week  
represented and you'd compress/uncompress the information in the model
3) Store start and end dates in the DB




On Fri, 02 Oct 2009 18:28:54 +0200, MoUeTtE the.moue...@gmail.com wrote:


 Hi everybody,
 I'm currently developing an application in which I have to create
 objects that is linked to a week day.
 Up to now, I select the weekday for every object, but most of the time
 every field in the object is the same except this weekday.

 What would be the best practice to have the user fill the form only
 once ?

 in order to be clearer, i'll give you a sample of what I mean.

 schema.yml

 propel:
   object:
 id: ~
 name: varchar(255)
 weekday: integer

   link_user_object:
 user_id:   ~
 object_id:  ~

 let's say I want to create an object called 'Test' for days from
 Monday to Friday, up to now I have to create one for Monday, one for
 Tuesday... you got it, it turns out to be too long (I actually have a
 lot of data to fill in)

 So, my question is what is the best practice to have my form save
 method creating several object after I changed the weekday widget
 'multiple' option to true ? Should I use another foreign table to
 store the weekday only ? I'm afraid it could make the application
 slower (up to A request out of 2 are concerning this table), and
 performances are critical.

 Hope I made myself clear,

 Julien
 


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
symfony users group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---