[symfony-users] Re: Performance & ORM for Symfony 1.3

2009-10-20 Thread Fabian Lange

Hi Roberto,
I have a hard time understanding your numbers.
You say you generate a benchmark file in the front controller which
just writes how long the page took to load?
Which unit is that time? Is it bad? Is there any change when invoking
the pages a few more times?
what are the specs of the system? is apc or similar on?

When you benchmark something you usually want to show or prove
something. just printing how long the total execution takes does not
help much.
You could compare how well a apc vs a no apc version performs, the
impact of apc.stat=0 or removing .htaccess files. Or using a Ramdisc,
or using windows vs linux.

Or, what would symfony help more: find out what part of the respective
pages is slow. For that you need additional profiling means like
xdebug. Profilers can show hot spots where most time is spend and we
can go for them to fix them

Fabian

On Wed, Oct 21, 2009 at 12:16 AM, roberto german puentes diaz
 wrote:
> Well, it’s just very initial
>
> The problem: Follow Practical Jobeet with Propel and Doctrine, and using
> Symfony1.3, How long takes interac with a simple CRUD?
> Reading the Chapters 1 and 3, for each ORM, and warp to front controller for
> DEV enviorement inside a benchmark file, these is the results
>
> http://www.puentesdiaz.com.ar/blog/?p=167
>
> I don't want start a warflame, please. It's just a simple test with
> practical jobeet. It's not an absolute true.
>
> --
> Cr. Puentes Diaz
> MP 10.12726.9
> Córdoba - Argentina
>
> www.puentesdiaz.com.ar/blog/
> www.puentesdiaz.com.ar/blog/novedades
> www.twitter.com/puentesdiaz
> Linux User n° 441474
> Ubuntu/Symfony/Eclipse Rocks!
>
> Sign for Free License for Project Zero
> http://www.petitiononline.com/zerogpl/
>
> >
>

--~--~-~--~~~---~--~~
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: Help me for writing criteria

2009-10-20 Thread Gareth McCumskey
$exploded_query = explode(" ", $this->query);

$k->getNewCriterion(
sfGuardUserProfilePeer::FIRST_NAME,"%".$exploded_query[0]."%",Criteria::LIKE)

$k->getNewCriterion(
sfGuardUserProfilePeer::LAST_NAME,"%".$exploded_query[1]."%",Criteria::LIKE)

On Wed, Oct 21, 2009 at 5:25 AM, Avani  wrote:

>
> Hi
>
> I have 1 table in my project, called "sf_guard_user_profile". In
> which, there are 2 fields,
>
> 1. first_name
> 2. last_name
>
> I m working on search module
>
> in table, suppose there is 1 entry
>
> firstname = 'John'
> lastname = 'Lee'
>
> In search if any body searches for  'john lee', how to match ?
>
> bcoz query should be like..
>
> first_name+' '+last_name = 'john lee'
>
>
> If user searches for "john"   or   "lee"  than I can display records,
>
>
> $k->getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,"%".$this-
> >query."%",Criteria::LIKE)
>
> $k->getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,"%".$this-
> >query."%",Criteria::LIKE)
>
>
> but I dont know how to write for 'first_name' + ' ' + 'last_name'
>
> Pls help me...
>
> Thanks.
> >
>


-- 
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] Help me for writing criteria

2009-10-20 Thread Avani

Hi

I have 1 table in my project, called "sf_guard_user_profile". In
which, there are 2 fields,

1. first_name
2. last_name

I m working on search module

in table, suppose there is 1 entry

firstname = 'John'
lastname = 'Lee'

In search if any body searches for  'john lee', how to match ?

bcoz query should be like..

first_name+' '+last_name = 'john lee'


If user searches for "john"   or   "lee"  than I can display records,


$k->getNewCriterion(sfGuardUserProfilePeer::FIRST_NAME,"%".$this-
>query."%",Criteria::LIKE)

$k->getNewCriterion(sfGuardUserProfilePeer::LAST_NAME,"%".$this-
>query."%",Criteria::LIKE)


but I dont know how to write for 'first_name' + ' ' + 'last_name'

Pls help me...

Thanks.
--~--~-~--~~~---~--~~
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] Retrieving data from different models after a join. Unknowns methods

2009-10-20 Thread cosmy

Hi all.
I'm trying to get field values in my View after having done multiple
joins between some tables (models) but i don't know how to do..
I have three tables: Interview, Answer and Question.
I want to show a single interview with all the Questions and the
Answers related to that Interview (by the way, every Answer has got a
related Question).

So in my actions i have:
  public function executeShow(sfWebRequest $request)
  {
$this->interview = Doctrine::getTable('Interview')->find($request-
>getParameter('id'));
$this->answers = Doctrine::getTable('Interview')->getAnswers
($request->getParameter('id'));
$this->forward404Unless($this->interview);
  }

And in my InterviewTable.class.php:
public function getAnswers($id){
$q = Doctrine_Query::create()
->from('Answer a')
->leftJoin('a.Question q')
->leftJoin('a.Interview i')
->where('a.idInterview = ?', $id );

return $q->execute();
}

But how do i do to get a parameter of Question in the View code?

If i do:
   
getAnswerField() ?>
getQuestionField() ?>">


it gives me this error:
Unknown method Answer::getQuestionField

Of Course - i say - QuestionField is in Question model not in Answer
one!! but i don't know how to make it works..

Thank you in advance and sorry for my poor english. I hope you have
understood what i want to say..

--~--~-~--~~~---~--~~
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] Performance & ORM for Symfony 1.3

2009-10-20 Thread roberto german puentes diaz
Well, it’s just very initial

The problem: Follow Practical Jobeet with Propel and Doctrine, and using
Symfony1.3, How long takes interac with a simple CRUD?
Reading the Chapters 1 and 3, for each ORM, and warp to front controller for
DEV enviorement inside a benchmark file, these is the results

http://www.puentesdiaz.com.ar/blog/?p=167

I don't want start a warflame, please. It's just a simple test with
practical jobeet. It's not an absolute true.

-- 
Cr. Puentes Diaz
MP 10.12726.9
Córdoba - Argentina

www.puentesdiaz.com.ar/blog/
www.puentesdiaz.com.ar/blog/novedades
www.twitter.com/puentesdiaz
Linux User n° 441474
Ubuntu/Symfony/Eclipse Rocks!

Sign for Free License for Project Zero
http://www.petitiononline.com/zerogpl/

--~--~-~--~~~---~--~~
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] Clearing frontend cache in backend

2009-10-20 Thread ju1ius

I tried the method described here, but it doesn't work...
http://www.symfony-project.org/book/1_2/12-Caching#chapter_12_sub_clearing_cache_across_applications_new_in_symfony_1_1

I define this method in backenConfiguration.class.php:
public function getFrontendCache()
{
  if (!$this->frontendCache)
  {
$this->frontendCache = new sfFileCache(array(
  'cache_dir' => sfConfig::get('sf_cache_dir').'/
frontend/'.sfConfig::get('sf_environment').'/template'
));
  }
  return $this->frontendCache;
}

and override the processForm method of the admin-generated module
protected function processForm(sfWebRequest $request, sfForm $form)
{
  // ... bla, bla, bla
  if ($form->isValid())
  {
// ... bla, bla, bla

$news_article = $form->save();
$cache = sfProjectConfiguration::getActive()->getFrontendCache();
$result = $cache->removePattern('/news/index?sf_culture=*');

// ... bla, bla, bla
  }
}

The cache is never cleared...
--~--~-~--~~~---~--~~
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: Optimizing Lots of Routes

2009-10-20 Thread Jacob Coby


On Oct 20, 2009, at 3:00 PM, Eno wrote:

>
> On Tue, 20 Oct 2009, Alexandru-Emil Lupu wrote:
>
>> 2) you would still have problems with this issue. I remember you  
>> that the
>> link_to and url_for is using the allready generated routes.
>
> You could write your own routing class to handle that.
>
> But ss I said earlier, seems easier to me to fix all the link_to()  
> calls
> in all the templates that write new code to work the right way and add
> code to make the slugs.

Thanks for the ideas.  They've decided to go back and update all of  
the pages to use a more standard routing setup.

>
>
>
>
> -- 
>
>
>
> >

--
Jacob Coby







--~--~-~--~~~---~--~~
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: Optimizing Lots of Routes

2009-10-20 Thread Eno

On Tue, 20 Oct 2009, Alexandru-Emil Lupu wrote:

> 2) you would still have problems with this issue. I remember you that the
> link_to and url_for is using the allready generated routes.

You could write your own routing class to handle that.

But ss I said earlier, seems easier to me to fix all the link_to() calls 
in all the templates that write new code to work the right way and add 
code to make the slugs.




-- 



--~--~-~--~~~---~--~~
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: route with :slug

2009-10-20 Thread Eno

On Tue, 20 Oct 2009, mbernasocchi wrote:

> getTitle(), 'post_by_slug', $post) ?>

Shouldn't that second parameter name the route and pass the slug? i.e.

link_to($post->getTitle(), '@post_by_slug?slug=' . $post->getSlug());

Im assuming your model has a getSlug() method and named routes usually 
have a '@' as per the docs:

http://www.symfony-project.org/book/1_2/09-Links-and-the-Routing-System#chapter_09_sub_speeding_up_routing_by_using_the_rule_name

> my actions.class.php is:
> 
> public function executeShow(sfWebRequest $request)
>   {
> $this->post = $this->getRoute()->getObject();
>   }
> 
> and in the showSuccess.php I've:
> 
> getId() ?>
> getSlug() ?>

In your action you sent a variable called $post but then you're using 
$bubble in the template???

> any Ideas why? as well, I was wondering what does the @ in front of a
> route-name mean? when do you use it? if I add it to my link_to I get
> an error saying that the route misses the slug.

Read the docs on links and routing, chapter 9 of the Definitive Guide.



-- 



--~--~-~--~~~---~--~~
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: Trying to list profile fields in the backend

2009-10-20 Thread tirengarfio

I found this article but it only works if you can install sfDbFinder
(Sf 1.1):

http://redotheweb.com/2008/09/25/sorting-by-custom-column-in-the-symfony-admin-generator/

Javi

On Oct 14, 2:14 pm, tirengarfio  wrote:
> On Oct 14, 1:39 pm, Alexandru-Emil Lupu  wrote:
>
> > the sfGuardUser module allready does that listing ...
>
> Do you mean it also can sort the list by the Profile fields?
--~--~-~--~~~---~--~~
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] sfValidatorEmail and sfValidatorFile: always "Invalid"

2009-10-20 Thread tirengarfio

Hi,

I have created the backend for the sfGuardUser module.

Then I have added the Profile fields to the filter using this tutorial
(in spanish):

http://jsangil.blogspot.com/2009/09/modificacion-de-filtros-en-symfony-para.html

Now i have problems when i use "sfValidatorEmail" and
"sfValidatorFile": after pushing Filter the text "Invalid" appears
next to the field. It doesnt care if the field is empty or not or if
the email is written correctly.

Here you have the code:

 widgetSchema['nombre_apellidos'] = new sfWidgetFormFilterInput
(array(
  'with_empty' => false
  ));


  $this->widgetSchema['email'] = new sfWidgetFormFilterInput(array(
  'with_empty' => false
  ));

  $this->widgetSchema['fotografia'] = new sfWidgetFormFilterInput(array
(
  'with_empty' => false
  ));

  // Validadores
  $this->validatorSchema['nombre_apellidos'] = new sfValidatorPass
(array(
  'required' => false
  ));


  $this->validatorSchema['email'] = new sfValidatorPass(array(
  'required' => false
  ));

  $this->validatorSchema['fotografia'] = new sfValidatorPass(array(
  'required' => false
  ));



  }

  public function addNombreApellidosColumnQuery(Doctrine_Query $query,
$field, $values)
  {
//Se comprueba que no sea nulo el valor del campo del filtro
if ($values['text'] != '') {
  $query->from('sfGuardUser u')
->innerJoin('u.Profile us')
->andWhere("us.nombre_apellidos LIKE ?", '%'.$values
['text'].'%');
}

  }



public function addEmailColumnQuery(Doctrine_Query $query, $field,
$values)
{

  if ($values['text'] != '') {
  $query->from('sfGuardUser u')
->innerJoin('u.Profile us')
->andWhere("us.email LIKE ?", '%'.$values['text'].'%');
  }

}


public function addFotografiaColumnQuery(Doctrine_Query $query,
$field, $values)
{

  if ($values['text'] != '') {
  $query->from('sfGuardUser u')
->innerJoin('u.Profile us')
->andWhere("us.fotografia LIKE ?", '%'.$values['text'].'%');
  }

}


public function getFields()
{
  return parent::getFields() + array(
  'nombre_apellidos' => 'Text',
  'email' => 'Text',
  'fotografia' => 'Text'
  );
}

}

Any idea?

Javi
--~--~-~--~~~---~--~~
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: where do I insert my hit counter?

2009-10-20 Thread Eno

On Tue, 20 Oct 2009, Gareth McCumskey wrote:

> True. But again some people don't want the n'th degree of statistics and a
> basic counter is sufficient. Its all about his requirements. I'm a fan of
> not over complicating a solution to your needs.

Pretty funny statement, considering that most analytics are simple
Javascript includes (vs. writing some action/database code :-)



-- 



--~--~-~--~~~---~--~~
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] i18n nested table

2009-10-20 Thread HAUSa

I use this in my own form formatter:

protected $rowFormat = '%label%%hidden_fields%%field
%%error%%help%';

My i18n form is loaded at the %field% spot, as a complete new table.

My question: is it also possible to load the i18n form as a new table
below the other ones, instead of a nested table?
--~--~-~--~~~---~--~~
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: Where in symfony can I set doctrine-specific attributes ?

2009-10-20 Thread Jonathan Wage
That will work as well.

- Jon

On Tue, Oct 20, 2009 at 11:30 AM, Greg Maruszeczka  wrote:

>
> On Tue, 20 Oct 2009 08:11:13 -0700 (PDT)
> Hong Kil Dong  wrote:
>
> >
> > I wish ot use ENUM type in my Doctrine model, and according to
> > doctrine manual I have to set  attribute
> > Doctrine::ATTR_USE_NATIVE_ENUM to TRUE (
> >
> http://www.doctrine-project.org/documentation/manual/1_1/en/defining-models#columns:data-types:enum
> > )
> >
> > Where can I do it in symfony ?
> > >
>
>
> IIRC you can do this in 'databases.yml' by adding extra params to the
> relevant DB connection. For example,
>
> all:
>  doctrine:
>class: sfDoctrineDatabase
>param:
>  dsn: 'mysql:host=localhost;dbname=symfony_istb_doctrine'
>  username: 
>  password: 
>  attributes:
>use_dql_callbacks: true
>use_native_enum:  true
>
> HTH,
>
> GM
>
> --
>
> Greg Maruszeczka
>
> Office: 250.412.9651  ||  Mobile: 250.886.4577
> Skype: websage.ca ||  GTalk IM: gmarus
>
> http://websage.ca
>
> GnuPG-ID: 0x4309323E, http://pgp.mit.edu
>
> >
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.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] Re: Where in symfony can I set doctrine-specific attributes ?

2009-10-20 Thread Raphael
hi,

you can find this in:
http://www.symfony-project.org/doctrine/1_2/en/03-Configuration

im using my attribuites in databases.yml

On Tue, Oct 20, 2009 at 1:11 PM, Hong Kil Dong  wrote:

>
> I wish ot use ENUM type in my Doctrine model, and according to
> doctrine manual I have to set  attribute
> Doctrine::ATTR_USE_NATIVE_ENUM to TRUE (
>
> http://www.doctrine-project.org/documentation/manual/1_1/en/defining-models#columns:data-types:enum
> )
>
> Where can I do it in symfony ?
> >
>


-- 
Raphael Almeida Araújo
Homepage: http://sites.google.com/site/raphoxaraujo

--~--~-~--~~~---~--~~
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: Where in symfony can I set doctrine-specific attributes ?

2009-10-20 Thread Greg Maruszeczka

On Tue, 20 Oct 2009 08:11:13 -0700 (PDT)
Hong Kil Dong  wrote:

> 
> I wish ot use ENUM type in my Doctrine model, and according to
> doctrine manual I have to set  attribute
> Doctrine::ATTR_USE_NATIVE_ENUM to TRUE (
> http://www.doctrine-project.org/documentation/manual/1_1/en/defining-models#columns:data-types:enum
> )
> 
> Where can I do it in symfony ?
> > 


IIRC you can do this in 'databases.yml' by adding extra params to the
relevant DB connection. For example,

all:
  doctrine:
class: sfDoctrineDatabase
param:
  dsn: 'mysql:host=localhost;dbname=symfony_istb_doctrine'
  username: 
  password: 
  attributes:
use_dql_callbacks: true
use_native_enum:  true

HTH,

GM

-- 
   
Greg Maruszeczka

Office: 250.412.9651  ||  Mobile: 250.886.4577
Skype: websage.ca ||  GTalk IM: gmarus

http://websage.ca

GnuPG-ID: 0x4309323E, http://pgp.mit.edu

--~--~-~--~~~---~--~~
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: Error creating database on ALTER TABLE..

2009-10-20 Thread cosmy

Maybe.. i've done what you sai, setting "setnull: true" o these
fields, but the error persist.
It seems to be fault on the "onDelete: SET NULL" property on doctrine
schemas foreign keys.
If i remove these it works!!!
But i don't want to remove the foreign field..

On 18 Ott, 11:04, Yahel  wrote:
> Hi.
>
> I think its because you're trying to set idCategory as null (in the
> forien key) while the field defined as 'notnull: true' .
> you should change the forien key (under relation) or idCategory
> definition.
--~--~-~--~~~---~--~~
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: Where in symfony can I set doctrine-specific attributes ?

2009-10-20 Thread Jonathan Wage
In your ProjectConfiguration. Check the Symfony + Doctrine documentation on
the symfony website for how to set attributes.

http://www.symfony-project.org/doctrine/1_2/en/03-Configuration

- Jon

On Tue, Oct 20, 2009 at 11:11 AM, Hong Kil Dong  wrote:

>
> I wish ot use ENUM type in my Doctrine model, and according to
> doctrine manual I have to set  attribute
> Doctrine::ATTR_USE_NATIVE_ENUM to TRUE (
>
> http://www.doctrine-project.org/documentation/manual/1_1/en/defining-models#columns:data-types:enum
> )
>
> Where can I do it in symfony ?
> >
>


-- 
Jonathan H. Wage (+1 415 992 5468)
Open Source Software Developer & Evangelist
sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org

You can contact Jonathan about Doctrine, Symfony and Open-Source or for
training, consulting, application development, or business related questions
at jonathan.w...@sensio.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] Where in symfony can I set doctrine-specific attributes ?

2009-10-20 Thread Hong Kil Dong

I wish ot use ENUM type in my Doctrine model, and according to
doctrine manual I have to set  attribute
Doctrine::ATTR_USE_NATIVE_ENUM to TRUE (
http://www.doctrine-project.org/documentation/manual/1_1/en/defining-models#columns:data-types:enum
)

Where can I do it in symfony ?
--~--~-~--~~~---~--~~
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: Test:All under Windows

2009-10-20 Thread ridcully

The Idee comes not from us, Zend Server CE install PHP under Programm
Files.

On Oct 20, 2:40 pm, david  wrote:
> It's generally not a good idea to have php installed under "program files"  
> - suggest to your colleague to reinstall it to a folder under the root of  
> a drive - ie "C:\php" - it'll save you a lot of headaches both now and  
> later.
>
> On Tue, 20 Oct 2009 14:34:45 +0200, ridcully   
> wrote:
>
>
>
>
>
> > I'm coding on a Mac, but a collegue is coding on a Windows System, and
> > i think it's not a shame to code under Windows.
>
> > But the the php.bat is not the Problem, because a symfony.bat
> > doctrine:build-all-reload works 100% on this Windows system.
>
> > I think the testrunner wants to create a new PHP Task from the PHP
> > script and fails to locate php, because of the space in the path.
> > Both fixaround doesn't fix the problem at this Windows System.
> > Can I do anything ?
>
> > On Oct 20, 1:31 pm, Alexandre SALOME 
> > wrote:
> >> A fixaround would be to create a batch :
>
> >> c:\windows\system32\php.bat
>
> >> that contains
>
> >> "c:\program files\\php.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
>
> >> But the best thing is to fix the symfony.bat file.
>
> >> Try replacing lines 22 to 26 with :
>
> >> IF EXIST ".\symfony" (
> >>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q ".\symfony" %1  
> >> %2
> >> %3 %4 %5 %6 %7 %8 %9
> >> ) ELSE (
> >>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q
> >> "%SCRIPT_DIR%\symfony" %1 %2 %3 %4 %5 %6 %7 %8 %9
> >> )
>
> >> If it fixes the problem, tell me, I will submit a patch to symfony.
>
> >> Alexandre
>
> >> 2009/10/20 Gareth McCumskey 
>
> >> > Wih I could offer more help. Its a shame you don't code on a *nix  
> >> box
>
> >> > On Tue, Oct 20, 2009 at 11:55 AM, ridcully  
> >> wrote:
>
> >> >> Our Problems seem there is a space in the directoryname C:\program
> >> >> file where the PHP executable lies.
>
> >> >> Google says it's a bug in symfony, is any workaround there?
>
> >> >> THX
> >> >> Joerg
>
> >> >> On Oct 20, 9:55 am, Gareth McCumskey  wrote:
> >> >> > This is a path setting in windows. Look at the symfony.bat file  
> >> and put
> >> >> the
> >> >> > correct path to your PHP executable.
>
> >> >> > On Tue, Oct 20, 2009 at 9:50 AM, ridcully  
> >> 
> >> >> wrote:
>
> >> >> > > Hi,
>
> >> >> > > our test task failed under Windows, it says 'Unable to find PHP
> >> >> > > executable'.
>
> >> >> > > All other symfony task works, only the test task failed.
>
> >> >> > > The Search Path is right and we're using 1.2.9 with doctrine.
>
> >> >> > --
> >> >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> >> >> > twitter: @garethmcc
>
> >> > --
> >> > Gareth McCumskey
>
> >> >http://garethmccumskey.blogspot.com
> >> > twitter: @garethmcc
>
> >> --
> >> Alexandre Salomé -- alexandre.sal...@gmail.com
>
> --
> 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: where do I insert my hit counter?

2009-10-20 Thread Gareth McCumskey
True. But again some people don't want the n'th degree of statistics and a
basic counter is sufficient. Its all about his requirements. I'm a fan of
not over complicating a solution to your needs.

On Tue, Oct 20, 2009 at 4:25 PM, Gábor Fási  wrote:

>
> There are statistical tools that can be locally installed, like Mint.
>
> On Tue, Oct 20, 2009 at 16:23, Gareth McCumskey 
> wrote:
> > Not everyone wants data "on the cloud" ;)
> >
> > On Tue, Oct 20, 2009 at 4:02 PM, Eno  wrote:
> >>
> >> On Tue, 20 Oct 2009, aymeric wrote:
> >>
> >> > But now that I use symfony and that I try to follow the OO and MVC
> >> > spirit I'm not sure of the right way to do this.
> >> >
> >> > Does anyboy has an answer?
> >>
> >> Why not just use Google Analytics?
> >>
> >>
> >> --
> >>
> >>
> >>
> >>
> >
> >
> >
> > --
> > 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: Help Criteria, Last index

2009-10-20 Thread Gareth McCumskey
If you have created_at or update_at fields you can use those too.

If you need me to describe the exact methods and so on to use then you
really should be reading the book more as those are basic functions to
perform

On Sun, Oct 18, 2009 at 7:29 PM, Gabi  wrote:

>
> Hello, i want to know how I can select last 6 rows of my table named
> 'users'
> I want to show last 6 users registred on website. But didnt know how
> with criteria..
>
> Thanks all.
>
> >
>


-- 
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: where do I insert my hit counter?

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

There are statistical tools that can be locally installed, like Mint.

On Tue, Oct 20, 2009 at 16:23, Gareth McCumskey  wrote:
> Not everyone wants data "on the cloud" ;)
>
> On Tue, Oct 20, 2009 at 4:02 PM, Eno  wrote:
>>
>> On Tue, 20 Oct 2009, aymeric wrote:
>>
>> > But now that I use symfony and that I try to follow the OO and MVC
>> > spirit I'm not sure of the right way to do this.
>> >
>> > Does anyboy has an answer?
>>
>> Why not just use Google Analytics?
>>
>>
>> --
>>
>>
>>
>>
>
>
>
> --
> 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: where do I insert my hit counter?

2009-10-20 Thread Gareth McCumskey
Using a pre-filter is your best bet...

http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_filters

On Tue, Oct 20, 2009 at 2:11 PM, aymeric  wrote:

>
> I would like to know how many time my domain is accessed each day and
> store this info in my DB
> For the previous non-symfony version of my website I wrote a script in
> the index.php that did the trick.
> But now that I use symfony and that I try to follow the OO and MVC
> spirit I'm not sure of the right way to do this.
>
> Does anyboy has an answer?
> >
>


-- 
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: where do I insert my hit counter?

2009-10-20 Thread Gareth McCumskey
Not everyone wants data "on the cloud" ;)

On Tue, Oct 20, 2009 at 4:02 PM, Eno  wrote:

>
> On Tue, 20 Oct 2009, aymeric wrote:
>
> > But now that I use symfony and that I try to follow the OO and MVC
> > spirit I'm not sure of the right way to do this.
> >
> > Does anyboy has an answer?
>
> Why not just use Google Analytics?
>
>
> --
>
>
>
> >
>


-- 
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: link_to() for a file in /web dir (symfony install in a web server subfolder)

2009-10-20 Thread Arian Hojat
Hey Gareth,

That unfortunately also doesnt work; gives a url like:
http://site1.localhost/C%3A%5Cdev%5Csymfony-workspace%5CtheAppName%5Cweb/files";>Download
File

I just did something ghetto and figured out how to calculate path based on
where web directory is in web root folder which works on both servers...

getFileName() . '"
target="_blank">Download Report';
?>

so if webroot is
C:/dev/symfony-workspace/site1/web
and
web folder is
C:/dev/symfony-workspace/site1/web
(aka probably apache conf file has alias setup for symfony so front
controller handles everything automatically)
$path is '', so
so then it just gets files/blah.xls from db field and filepath is 

if webroot is
/var/www/html
and
web folder is
/var/www/html/symfony_dir/web
(aka symfony project is just a sub directory on server and user manually
goes to /web url on server to access symfony, like our 'prod' setup)
path is 'symfony_dir/web', so
so then filepath is 




On Mon, Oct 19, 2009 at 2:02 AM, Gareth McCumskey wrote:

> link_to("Download File",
> sfConfig::get('sf_web_dir')."/".$this->getFileName());

--~--~-~--~~~---~--~~
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: where do I insert my hit counter?

2009-10-20 Thread Eno

On Tue, 20 Oct 2009, aymeric wrote:

> But now that I use symfony and that I try to follow the OO and MVC
> spirit I'm not sure of the right way to do this.
> 
> Does anyboy has an answer?

Why not just use Google Analytics?


-- 



--~--~-~--~~~---~--~~
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: Disabling component cache dynamically

2009-10-20 Thread Grégoire

I can't find a way to solve that issue...
Nobody has any suggestion/idea?
--~--~-~--~~~---~--~~
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: sfGuard "remember me" does not quite work

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

It does seem to be a bug that exists in the propel version as well.

On Sat, Oct 17, 2009 at 21:01, HiDDeN  wrote:
>
> But why is the filter storing the IP if it is not using it to
> authenticate the user?
>
>
> On 11 oct, 11:06, Alexandru-Emil Lupu  wrote:
>> use just the cookie ... not the ip itsself ...
>>
>> On Fri, Oct 9, 2009 at 5:46 PM, Charles Bernard 
>> wrote:
>>
>>
>>
>> > Hi there,
>>
>> > I’m concerned about this IP checking thing (ip_address field in
>> > sf_guard_remember_key table).
>>
>> > It seems like my website remenbers me for a day only since most ISPs
>> > renew their IPs each day.
>> > When I get back to my site the day after the cookie value no longer
>> > matches my IP which has probably changed over night.
>>
>> > Shouldn't be relying on users' ips, should it ?
>>
>> --
>> As programmers create bigger & better idiot proof programs, so the universe
>> creates bigger & better idiots!
>> I am on web:  http://www.alecslupu.ro/
>> I am on twitter:http://twitter.com/alecslupu
>> I am on linkedIn:http://www.linkedin.com/in/alecslupu
>> Tel: (+4)0748.543.798
>
> >
>

--~--~-~--~~~---~--~~
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: where do I insert my hit counter?

2009-10-20 Thread david

You can also just drop something into sfUser and override it's initialize  
method.

On Tue, 20 Oct 2009 14:13:55 +0200, harryjekyll   
wrote:

>
> In symfony 1.0 I would have used the filter system.
>
> In symfony 1.2 I think the event system can help you.
>
> Maybe the other devs have better ideas.
>
> Regards
>
> On Oct 20, 2009, at 8:11 PM, aymeric wrote:
>
>>
>> I would like to know how many time my domain is accessed each day and
>> store this info in my DB
>> For the previous non-symfony version of my website I wrote a script in
>> the index.php that did the trick.
>> But now that I use symfony and that I try to follow the OO and MVC
>> spirit I'm not sure of the right way to do this.
>>
>> Does anyboy has an answer?
>> >
>
>
> >


-- 
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: Help Criteria, Last index

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

Sort descending by userid, and limit 6? addDescendingOrderByColumn()
and setLimit()

On Sun, Oct 18, 2009 at 19:29, Gabi  wrote:
>
> Hello, i want to know how I can select last 6 rows of my table named
> 'users'
> I want to show last 6 users registred on website. But didnt know how
> with criteria..
>
> Thanks all.
>
> >
>

--~--~-~--~~~---~--~~
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: Where is jobeet

2009-10-20 Thread Daniel Echalar
www.*symfony*-project.org/*jobeet*/

2009/10/15 rernst 

>
> I bought the tutorial book and it directs me to the 1.2 download page
> to download the jobeet project. However, I can only find the sandbox
> there and the base code, no jobeet project.
>
> >
>

--~--~-~--~~~---~--~~
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: jobeet tutorial Day3: ./symfony propel:build-model and Fetal error

2009-10-20 Thread Arian Hojat
saw you answered your own questions,
just wanted to mention if you want to start using xml instead of yml, you
can run
'symfony propel-convert-yml-schema' and vice versa
'symfony propel-convert-xml-schema'

lates,
Arian

--~--~-~--~~~---~--~~
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: i18n in forms

2009-10-20 Thread HAUSa

Someone who has experience with this?

On 19 okt, 10:37, HAUSa 
wrote:
> When I have some i18n fields in my form, it is displayed like this:
>
> price:  
> rank:  
> en:
> -- title: 
> -- description: 
> nl:
> -- title: 
> -- description: 
>
> But, is it also possible to display it like this:
>
> title:
> -- en: 
> -- nl: 
> price: 
> rank: 
> description:
> -- en: 
> -- nl: 
--~--~-~--~~~---~--~~
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: Test:All under Windows

2009-10-20 Thread david

It's generally not a good idea to have php installed under "program files"  
- suggest to your colleague to reinstall it to a folder under the root of  
a drive - ie "C:\php" - it'll save you a lot of headaches both now and  
later.

On Tue, 20 Oct 2009 14:34:45 +0200, ridcully   
wrote:

>
> I'm coding on a Mac, but a collegue is coding on a Windows System, and
> i think it's not a shame to code under Windows.
>
> But the the php.bat is not the Problem, because a symfony.bat
> doctrine:build-all-reload works 100% on this Windows system.
>
> I think the testrunner wants to create a new PHP Task from the PHP
> script and fails to locate php, because of the space in the path.
> Both fixaround doesn't fix the problem at this Windows System.
> Can I do anything ?
>
> On Oct 20, 1:31 pm, Alexandre SALOME 
> wrote:
>> A fixaround would be to create a batch :
>>
>> c:\windows\system32\php.bat
>>
>> that contains
>>
>> "c:\program files\\php.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
>>
>> But the best thing is to fix the symfony.bat file.
>>
>> Try replacing lines 22 to 26 with :
>>
>> IF EXIST ".\symfony" (
>>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q ".\symfony" %1  
>> %2
>> %3 %4 %5 %6 %7 %8 %9
>> ) ELSE (
>>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q
>> "%SCRIPT_DIR%\symfony" %1 %2 %3 %4 %5 %6 %7 %8 %9
>> )
>>
>> If it fixes the problem, tell me, I will submit a patch to symfony.
>>
>> Alexandre
>>
>> 2009/10/20 Gareth McCumskey 
>>
>>
>>
>> > Wih I could offer more help. Its a shame you don't code on a *nix  
>> box
>>
>> > On Tue, Oct 20, 2009 at 11:55 AM, ridcully  
>> wrote:
>>
>> >> Our Problems seem there is a space in the directoryname C:\program
>> >> file where the PHP executable lies.
>>
>> >> Google says it's a bug in symfony, is any workaround there?
>>
>> >> THX
>> >> Joerg
>>
>> >> On Oct 20, 9:55 am, Gareth McCumskey  wrote:
>> >> > This is a path setting in windows. Look at the symfony.bat file  
>> and put
>> >> the
>> >> > correct path to your PHP executable.
>>
>> >> > On Tue, Oct 20, 2009 at 9:50 AM, ridcully  
>> 
>> >> wrote:
>>
>> >> > > Hi,
>>
>> >> > > our test task failed under Windows, it says 'Unable to find PHP
>> >> > > executable'.
>>
>> >> > > All other symfony task works, only the test task failed.
>>
>> >> > > The Search Path is right and we're using 1.2.9 with doctrine.
>>
>> >> > --
>> >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> >> > twitter: @garethmcc
>>
>> > --
>> > Gareth McCumskey
>>
>> >http://garethmccumskey.blogspot.com
>> > twitter: @garethmcc
>>
>> --
>> Alexandre Salomé -- alexandre.sal...@gmail.com
> >


-- 
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: Test:All under Windows

2009-10-20 Thread ridcully

I'm coding on a Mac, but a collegue is coding on a Windows System, and
i think it's not a shame to code under Windows.

But the the php.bat is not the Problem, because a symfony.bat
doctrine:build-all-reload works 100% on this Windows system.

I think the testrunner wants to create a new PHP Task from the PHP
script and fails to locate php, because of the space in the path.
Both fixaround doesn't fix the problem at this Windows System.
Can I do anything ?

On Oct 20, 1:31 pm, Alexandre SALOME 
wrote:
> A fixaround would be to create a batch :
>
> c:\windows\system32\php.bat
>
> that contains
>
> "c:\program files\\php.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9
>
> But the best thing is to fix the symfony.bat file.
>
> Try replacing lines 22 to 26 with :
>
> IF EXIST ".\symfony" (
>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q ".\symfony" %1 %2
> %3 %4 %5 %6 %7 %8 %9
> ) ELSE (
>   "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q
> "%SCRIPT_DIR%\symfony" %1 %2 %3 %4 %5 %6 %7 %8 %9
> )
>
> If it fixes the problem, tell me, I will submit a patch to symfony.
>
> Alexandre
>
> 2009/10/20 Gareth McCumskey 
>
>
>
> > Wih I could offer more help. Its a shame you don't code on a *nix box
>
> > On Tue, Oct 20, 2009 at 11:55 AM, ridcully wrote:
>
> >> Our Problems seem there is a space in the directoryname C:\program
> >> file where the PHP executable lies.
>
> >> Google says it's a bug in symfony, is any workaround there?
>
> >> THX
> >> Joerg
>
> >> On Oct 20, 9:55 am, Gareth McCumskey  wrote:
> >> > This is a path setting in windows. Look at the symfony.bat file and put
> >> the
> >> > correct path to your PHP executable.
>
> >> > On Tue, Oct 20, 2009 at 9:50 AM, ridcully 
> >> wrote:
>
> >> > > Hi,
>
> >> > > our test task failed under Windows, it says 'Unable to find PHP
> >> > > executable'.
>
> >> > > All other symfony task works, only the test task failed.
>
> >> > > The Search Path is right and we're using 1.2.9 with doctrine.
>
> >> > --
> >> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> >> > twitter: @garethmcc
>
> > --
> > Gareth McCumskey
>
> >http://garethmccumskey.blogspot.com
> > twitter: @garethmcc
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.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] Re: Error creating database on ALTER TABLE..

2009-10-20 Thread Yahel

Hi.

I think its because you're trying to set idCategory as null (in the
forien key) while the field defined as 'notnull: true' .
you should change the forien key (under relation) or idCategory
definition.


--~--~-~--~~~---~--~~
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] Help Criteria, Last index

2009-10-20 Thread Gabi

Hello, i want to know how I can select last 6 rows of my table named
'users'
I want to show last 6 users registred on website. But didnt know how
with criteria..

Thanks all.

--~--~-~--~~~---~--~~
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: jobeet tutorial Day3: ./symfony propel:build-model and Fetal error

2009-10-20 Thread Saeid Moradi
Hi All,
Answering my questions .
I've increased  "memory_limit" to 128M in php.ini (*) and every things looks
fine ! :-)

(*) you need to know which php.ini is used by your console , you could find
it by run $ php check_configuration.php

Also If we have check memory_limit then probebly would save time for the
next one !

About Propel and xml configuration , Yes we could use schema.xml inestead of
schema.yml , you need just drop your schema.xml to config folder and remove
your schema.yml file . But I will not do that ! ;-)

Cheers,
Sid
p.s. I found my answer from
symfony-es

On Sat, Oct 17, 2009 at 9:47 PM, Sid  wrote:

> Hi All,
> I am very new in Symfony ! :-)  and this is my first post.
>
> I am getting Fetal error after running propel:build-model  command in
> day3 of jobeet tutorial !
> I also tried SVN  (http://svn.jobeet.org/propel/tags/release_day_03)
> but result is same .
>
> my console output :
>
> s...@sid-t60:~/ws/php/jobeet$ ./symfony propel:build-model
> >> schemaconverting "/home/sid/ws/php/jobeet/config/schema.yml" to XML
> >> schemaputting /home/sid/ws/php/jobeet/config/generated-schema.xml
> >> propelRunning "om" phing task
> Buildfile: /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/plugins/
> sfPropelPlugin/lib/vendor/propel-generator/build.xml
> [resolvepath] Resolved /home/sid/ws/php/jobeet/config to /home/sid/ws/
> php/jobeet/config
>
> propel-project-builder > check-project-or-dir-set:
>
>
> propel-project-builder > check-project-set:
>
>
> propel-project-builder > set-project-dir:
>
>
> propel-project-builder > check-buildprops-exists:
>
>
> propel-project-builder > check-buildprops-for-propel-gen:
>
>
> propel-project-builder > check-buildprops:
>
>
> propel-project-builder > configure:
>
> [echo] Loading project-specific props from /home/sid/ws/php/
> jobeet/config/propel.ini
>  [property] Loading /home/sid/ws/php/jobeet/config/propel.ini
>
> propel-project-builder > om:
>
>[phing] Calling Buildfile '/home/sid/ws/php/jobeet/lib/vendor/
> symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-
> propel.xml' with target 'om'
>  [property] Loading /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/
> plugins/sfPropelPlugin/lib/vendor/propel-generator/./
> default.properties
>
> propel > check-run-only-on-schema-change:
>
>
> propel > om-check:
>
>
> propel > mysqli-check:
>
>
> propel > om:
>
> [echo] +--+
> [echo] |  |
> [echo] | Generating Peer-based Object Model for   |
> [echo] | YOUR Propel project! |
> [echo] |  |
> [echo] +--+
> [phingcall] Calling Buildfile '/home/sid/ws/php/jobeet/lib/vendor/
> symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-
> propel.xml' with target 'om-template'
>  [property] Loading /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/
> plugins/sfPropelPlugin/lib/vendor/propel-generator/./
> default.properties
>
> propel > om-template:
>
> [propel-om] Processing: generated-schema.xml
> [propel-om] Processing Datamodel : JoinedDataModel
> [propel-om]   - processing database : propel
> [propel-om] + jobeet_category
> [propel-om] -> BaseJobeetCategoryPeer [builder: SfPeerBuilder]
>
> Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
> allocate 30720 bytes) in /home/sid/ws/php/jobeet/lib/vendor/symfony/
> lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/
> engine/builder/om/php5/PHP5ObjectBuilder.php on line 684
>
> Call Stack:
>0.0003 106576   1. {main}() /home/sid/ws/php/jobeet/symfony:0
>0.0062 513944   2. include('/home/sid/ws/php/jobeet/lib/vendor/
> symfony/lib/command/cli.php') /home/sid/ws/php/jobeet/symfony:14
>0.14798440552   3. sfSymfonyCommandApplication->run() /home/
> sid/ws/php/jobeet/lib/vendor/symfony/lib/command/cli.php:20
>0.15418739776   4. sfTask->runFromCLI() /home/sid/ws/php/
> jobeet/lib/vendor/symfony/lib/command/
> sfSymfonyCommandApplication.class.php:76
>0.15428739776   5. sfBaseTask->doRun() /home/sid/ws/php/jobeet/
> lib/vendor/symfony/lib/task/sfTask.class.php:77
>0.27258897112   6. sfPropelBuildModelTask->execute() /home/sid/
> ws/php/jobeet/lib/vendor/symfony/lib/task/sfBaseTask.class.php:63
>0.30149321376   7. sfPropelBaseTask->callPhing() /home/sid/ws/
> php/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
> sfPropelBuildModelTask.class.php:62
>0.3768   16224088   8. sfPhing->runBuild() /home/sid/ws/php/jobeet/
> lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
> sfPropelBaseTask.class.php:293
>0.3768   16225800   9. Phing->runBuild() /home/sid/ws/php/jobeet/
> lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
> sfPhing.class.php:33
>0.4920   240394

[symfony-users] Re: sfGuard "remember me" does not quite work

2009-10-20 Thread HiDDeN

But why is the filter storing the IP if it is not using it to
authenticate the user?


On 11 oct, 11:06, Alexandru-Emil Lupu  wrote:
> use just the cookie ... not the ip itsself ...
>
> On Fri, Oct 9, 2009 at 5:46 PM, Charles Bernard 
> wrote:
>
>
>
> > Hi there,
>
> > I’m concerned about this IP checking thing (ip_address field in
> > sf_guard_remember_key table).
>
> > It seems like my website remenbers me for a day only since most ISPs
> > renew their IPs each day.
> > When I get back to my site the day after the cookie value no longer
> > matches my IP which has probably changed over night.
>
> > Shouldn't be relying on users' ips, should it ?
>
> --
> As programmers create bigger & better idiot proof programs, so the universe
> creates bigger & better idiots!
> I am on web:  http://www.alecslupu.ro/
> I am on twitter:http://twitter.com/alecslupu
> I am on linkedIn:http://www.linkedin.com/in/alecslupu
> Tel: (+4)0748.543.798

--~--~-~--~~~---~--~~
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] Why "Remember Me" stores info in the database?

2009-10-20 Thread HiDDeN

I have a simple question: why is the "remember me" feature storing
information in the database?

It works well because it is storing the user login in a cookie, so I
think that the "sf_guard_remember_key" table is completely
unnecessary. It is just storing the user id, some dates, and his IP.
If I change my IP, it is yet working well, so... why is it storing the
IP?? I can't understand it.

Any idea? Thanks!

--~--~-~--~~~---~--~~
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] [sfDoctrineGuardPlugin] Why "Remember Me" stores info in the database?

2009-10-20 Thread HiDDeN

I have a simple question: why is the "remember me" feature storing
information in the database?

It works well because it is storing the user login in a cookie, so I
think that the "sf_guard_remember_key" table is completely
unnecessary. It is just storing the user id, some dates, and his IP.
If I change my IP, it is yet working well, so... why is it storing the
IP?? I can't understand it.

Any idea? Thanks!

--~--~-~--~~~---~--~~
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] jobeet tutorial Day3: ./symfony propel:build-model and Fetal error

2009-10-20 Thread Sid

Hi All,
I am very new in Symfony ! :-)  and this is my first post.

I am getting Fetal error after running propel:build-model  command in
day3 of jobeet tutorial !
I also tried SVN  (http://svn.jobeet.org/propel/tags/release_day_03)
but result is same .

my console output :

s...@sid-t60:~/ws/php/jobeet$ ./symfony propel:build-model
>> schemaconverting "/home/sid/ws/php/jobeet/config/schema.yml" to XML
>> schemaputting /home/sid/ws/php/jobeet/config/generated-schema.xml
>> propelRunning "om" phing task
Buildfile: /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/plugins/
sfPropelPlugin/lib/vendor/propel-generator/build.xml
[resolvepath] Resolved /home/sid/ws/php/jobeet/config to /home/sid/ws/
php/jobeet/config

propel-project-builder > check-project-or-dir-set:


propel-project-builder > check-project-set:


propel-project-builder > set-project-dir:


propel-project-builder > check-buildprops-exists:


propel-project-builder > check-buildprops-for-propel-gen:


propel-project-builder > check-buildprops:


propel-project-builder > configure:

 [echo] Loading project-specific props from /home/sid/ws/php/
jobeet/config/propel.ini
 [property] Loading /home/sid/ws/php/jobeet/config/propel.ini

propel-project-builder > om:

[phing] Calling Buildfile '/home/sid/ws/php/jobeet/lib/vendor/
symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-
propel.xml' with target 'om'
 [property] Loading /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/
plugins/sfPropelPlugin/lib/vendor/propel-generator/./
default.properties

propel > check-run-only-on-schema-change:


propel > om-check:


propel > mysqli-check:


propel > om:

 [echo] +--+
 [echo] |  |
 [echo] | Generating Peer-based Object Model for   |
 [echo] | YOUR Propel project! |
 [echo] |  |
 [echo] +--+
[phingcall] Calling Buildfile '/home/sid/ws/php/jobeet/lib/vendor/
symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-
propel.xml' with target 'om-template'
 [property] Loading /home/sid/ws/php/jobeet/lib/vendor/symfony/lib/
plugins/sfPropelPlugin/lib/vendor/propel-generator/./
default.properties

propel > om-template:

[propel-om] Processing: generated-schema.xml
[propel-om] Processing Datamodel : JoinedDataModel
[propel-om]   - processing database : propel
[propel-om] + jobeet_category
[propel-om] -> BaseJobeetCategoryPeer [builder: SfPeerBuilder]

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to
allocate 30720 bytes) in /home/sid/ws/php/jobeet/lib/vendor/symfony/
lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/
engine/builder/om/php5/PHP5ObjectBuilder.php on line 684

Call Stack:
0.0003 106576   1. {main}() /home/sid/ws/php/jobeet/symfony:0
0.0062 513944   2. include('/home/sid/ws/php/jobeet/lib/vendor/
symfony/lib/command/cli.php') /home/sid/ws/php/jobeet/symfony:14
0.14798440552   3. sfSymfonyCommandApplication->run() /home/
sid/ws/php/jobeet/lib/vendor/symfony/lib/command/cli.php:20
0.15418739776   4. sfTask->runFromCLI() /home/sid/ws/php/
jobeet/lib/vendor/symfony/lib/command/
sfSymfonyCommandApplication.class.php:76
0.15428739776   5. sfBaseTask->doRun() /home/sid/ws/php/jobeet/
lib/vendor/symfony/lib/task/sfTask.class.php:77
0.27258897112   6. sfPropelBuildModelTask->execute() /home/sid/
ws/php/jobeet/lib/vendor/symfony/lib/task/sfBaseTask.class.php:63
0.30149321376   7. sfPropelBaseTask->callPhing() /home/sid/ws/
php/jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBuildModelTask.class.php:62
0.3768   16224088   8. sfPhing->runBuild() /home/sid/ws/php/jobeet/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPropelBaseTask.class.php:293
0.3768   16225800   9. Phing->runBuild() /home/sid/ws/php/jobeet/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/task/
sfPhing.class.php:33
0.4920   24039464  10. Project->executeTargets() /home/sid/ws/php/
jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/
Phing.php:541
0.4920   24039464  11. Project->executeTarget() /home/sid/ws/php/
jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/
Project.php:675
0.5067   24145608  12. Target->performTasks() /home/sid/ws/php/
jobeet/lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/
Project.php:702
0.5068   24145608  13. Target->main() /home/sid/ws/php/jobeet/lib/
vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/Target.php:
263
0.5068   24145608  14. Task->perform() /home/sid/ws/php/jobeet/lib/
vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/Target.php:
240
0.5079   24166144  15. PhingTask->main() /home/sid/ws/php/jobeet/
lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/phing/
Task.p

[symfony-users] doctrine blob field

2009-10-20 Thread David Régade

Hi,

I use symfony with doctrine and I try to store some binary data in my
MySQL database. So I defined a class with a blob field like this:

File:
  columns:
id:
  type: integer
  primary: true
  unsigned: true
  notnull: true
  autoincrement: true
name:
  type: string(255)
size:
  type: integer
  unsigned: true
  notnull: true
mime_type:
  type: string(255)
binary_data:
  type: blob

I generate a module for this class. But unfortunatelly I can't access
binary_data field in templates. binary_data field is ok in actions but
never in templates.
I try to create an action to download a file. Here is my action:

public function executeGetFile(sfWebRequest $request) {
$this->forward404Unless( $this->file = Doctrine::getTable('File')-
>find(array($file_id)), sprintf('Object file does not exist (%s).',
array( $file_id )) );

$this->getResponse()->setHttpHeader('Content-Type', $this->file-
>mime_type, true);
$this->getResponse()->setHttpHeader('Content-Disposition',
'attachment; filename="'.$this->file->name.'"', true);

 //file_put_contents("/tmp/titi.pdf", $this->file->binary_data);
}

Here is my template:
binary_data;


No data is echoed, Is there a reason for that ?

Regards

--~--~-~--~~~---~--~~
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] objects_for_select multiple

2009-10-20 Thread Job

hi there,

i am using an objects for select with the multiple = true (symfony
1.2)

everything works fine with the exception of capturing the array. in
the action.

$this->getRequestParameter('...') only returns one of the items
selected.

I have tried also _$POST with the same result.

can anyone help me on that?

--~--~-~--~~~---~--~~
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] Multiple schemas and Sql Server

2009-10-20 Thread Eduardo Botelho
Hi, I want know how I configure my application to work with multiple schemas
in Sql Server.

I have a delegate database with several schemas, and I will work with just
some of them, but the command propel:build-schema generate all tables.

Another problem is, when symfony make queries in database the error message
is showed: "Invalid object name ''.". ie, symfony shold not be
putting the schema in the preffix in the table name.

How can I properly configure my schemas?

Thanks a lot

--~--~-~--~~~---~--~~
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] Where is jobeet

2009-10-20 Thread rernst

I bought the tutorial book and it directs me to the 1.2 download page
to download the jobeet project. However, I can only find the sandbox
there and the base code, no jobeet project.

--~--~-~--~~~---~--~~
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: jobbet using sf 1.3

2009-10-20 Thread Hugo HAMON
Hi,
 
The new sf 1.3 jobeet tutorial contains a new chapter about how to configure 
and send emails with the new integrated Swif Mailer system. The tutorial has 
been updated to fit the new recommandations of sf 1.3 / 1.4.
 
Hugo.



De : symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] De 
la part de Nei Rauni Santos
Envoyé : jeudi 15 octobre 2009 01:35
À : symfony-users@googlegroups.com
Objet : [symfony-users] jobbet using sf 1.3


There is any diference of this tutorial using sf 1.3? or it´s iquals the old 
one using 1.2 ?

-- 
Nei Rauni Santos
nra...@gmail.com
+55 41 85020985




--~--~-~--~~~---~--~~
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: where do I insert my hit counter?

2009-10-20 Thread harryjekyll

In symfony 1.0 I would have used the filter system.

In symfony 1.2 I think the event system can help you.

Maybe the other devs have better ideas.

Regards

On Oct 20, 2009, at 8:11 PM, aymeric wrote:

>
> I would like to know how many time my domain is accessed each day and
> store this info in my DB
> For the previous non-symfony version of my website I wrote a script in
> the index.php that did the trick.
> But now that I use symfony and that I try to follow the OO and MVC
> spirit I'm not sure of the right way to do this.
>
> Does anyboy has an answer?
> >


--~--~-~--~~~---~--~~
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] where do I insert my hit counter?

2009-10-20 Thread aymeric

I would like to know how many time my domain is accessed each day and
store this info in my DB
For the previous non-symfony version of my website I wrote a script in
the index.php that did the trick.
But now that I use symfony and that I try to follow the OO and MVC
spirit I'm not sure of the right way to do this.

Does anyboy has an answer?
--~--~-~--~~~---~--~~
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: Caching strategy: 'with_layout: true' + filter to add dynamics

2009-10-20 Thread Hong Kil Dong

It looks exactly like SSI. Maybe it will be your more standard way if
you manage to implement SSI on dynamic page ;)

On Oct 19, 11:46 am, SA  wrote:
> Hello,
> we are developing a news website which mostly consists of constantly
> changing, but fully cacheable content, the only dynamic parts are ads
> which have to be selected randomly and user panel.
>
> We couldn't cache the pages with layout and had to include these
> components in the layout. The layout includes other components and
> actions that are cached in memcached. Profiling shows that even if the
> component is cached its a pretty costly operation to include it when
> you have many.
>
> This gives an idea of caching an action with layout and replacing
> dynamic parts of the page in a filter. Dynamic parts are marked by
> markers such as  or  include_ad_slot:main_slot -->. We tried this strategy and overhead
> added by this filters preg_match and replace seems to be minor -
> site's performance increased by 50%. I can't see any drawback in this
> now and I don't feel comfortable with it. :)
>
> What do you think of this strategy? Are we reinventing the wheel? Can
> we achieve this in a more 'standard' way?
>
> Please comment. Thanks.
--~--~-~--~~~---~--~~
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: Unset i18n field

2009-10-20 Thread HAUSa

Okay thx! But how do I use that when I extended the form class?

I got these forms:

ObjectForm extends BaseObjectForm
ObjectI18nForm extends BaseObjectI18nForm

Then in my app lib I created these forms:

MyObjectForm extends ObjectForm
MyObjectI18nForm extends ObjectI18nForm

Ofcourse, the form still takes the ObjectI18nForm object instead of
the MyObjectI18nForm object for the i18n fields. How can I make
Symfony use the MyObjectI18nForm instead of the ObjectI18nForm in
MyObjectForm?


On 19 okt, 23:49, Alexandre SALOME  wrote:
> I18n fields are not in the form, the in the i18nform.
>
> Example :
>
> CmsPageForm has embed CmsPageI18nForm
>
> So go to your CmsPageI18nForm and unset "title" or "content" field.
>
> Alexandre
>
> 2009/10/19 HAUSa 
>
>
>
> > In my form class, I can unset several fields.
> > But how can I unset an i18n field?
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.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] Re: Output escaping using htmlspecialchars should not double escape?

2009-10-20 Thread gunnarlium

Have done that. escaping_strategy is on and set to ESC_SPESCIALCHARS.
To problem is with the implementation of the htmlspecialchars.

On 19 Okt, 23:10, Alexandre SALOME  wrote:
> Check your settings.yml in config folder of your application. There is an
> escaping strategy that can be enabled by default.
>
> Make some debug to see if your variable during the process are as expected.
>
> Alexandre
>
> 2009/10/19 gunnarlium 
>
>
>
>
>
>
>
> > Hi!
>
> > I have a problem with variables being double escaped when passed to a
> > partial. I'm experiencing this issue for example with the & character.
> > In the source code it ends up as &. This problem goes away if
> > I hack EscapingHelper.php to add a fourth variable false to the
> > htmlspecialchars.
>
> > Why is this not the default options? Seems more sensible to me (at
> > least for this use case)?
>
> > Would it make sense to make configureable?
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.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] Re: route with :slug

2009-10-20 Thread mbernasocchi

Sorry, my pc is doing weird things...
so: I forgot to mention that if I follow this :>
http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455

and add an Id to the route then it works correctly

#works
post_by_slug:

  url:  /:sf_culture/post/:id/:slug

  class:sfDoctrineRoute

  param:{ module: post, action: show }

  options:  { model: Post, type: object }

#broken (before I copied the wrong route)
post_by_slug:
  url:  /:sf_culture/post/:slug
  class:sfDoctrineRoute
  param:{ module: post, action: show }
  options:  { model: Post, type: object }

Thanks 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: Test:All under Windows

2009-10-20 Thread Alexandre SALOME
A fixaround would be to create a batch :

c:\windows\system32\php.bat

that contains

"c:\program files\\php.exe" %1 %2 %3 %4 %5 %6 %7 %8 %9

But the best thing is to fix the symfony.bat file.

Try replacing lines 22 to 26 with :

IF EXIST ".\symfony" (
  "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q ".\symfony" %1 %2
%3 %4 %5 %6 %7 %8 %9
) ELSE (
  "%PHP_COMMAND%" -d html_errors=off -d open_basedir= -q
"%SCRIPT_DIR%\symfony" %1 %2 %3 %4 %5 %6 %7 %8 %9
)

If it fixes the problem, tell me, I will submit a patch to symfony.

Alexandre

2009/10/20 Gareth McCumskey 

> Wih I could offer more help. Its a shame you don't code on a *nix box
>
> On Tue, Oct 20, 2009 at 11:55 AM, ridcully wrote:
>
>>
>> Our Problems seem there is a space in the directoryname C:\program
>> file where the PHP executable lies.
>>
>> Google says it's a bug in symfony, is any workaround there?
>>
>> THX
>> Joerg
>>
>>
>> On Oct 20, 9:55 am, Gareth McCumskey  wrote:
>> > This is a path setting in windows. Look at the symfony.bat file and put
>> the
>> > correct path to your PHP executable.
>> >
>> > On Tue, Oct 20, 2009 at 9:50 AM, ridcully 
>> wrote:
>> >
>> > > Hi,
>> >
>> > > our test task failed under Windows, it says 'Unable to find PHP
>> > > executable'.
>> >
>> > > All other symfony task works, only the test task failed.
>> >
>> > > The Search Path is right and we're using 1.2.9 with doctrine.
>> >
>> > --
>> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
>> > twitter: @garethmcc
>>
>>
>
>
> --
> Gareth McCumskey
>
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
> >
>


-- 
Alexandre Salomé -- alexandre.sal...@gmail.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] Re: route with :slug

2009-10-20 Thread mbernasocchi

Forgot to mention that if I follow this :
> http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455
and add an Id to the route like this

openbubble_by_slug:

  url:  /:sf_culture/post/:id/:slug

  class:sfDoctrineRoute

  param:{ module: post, action: show }

  options:  { model: Post, type: object }
--~--~-~--~~~---~--~~
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] route with :slug

2009-10-20 Thread mbernasocchi

hi, i'd like to have a route for my posts like this:

post_by_slug:

  url:  /:sf_culture/post/:slug

  class:sfDoctrineRoute

  param:{ module: openbubble, action: show }

  options:  { model: OpenBubble, type: object }

I call the links like this in indexSuccess.php:
getTitle(), 'post_by_slug', $post) ?>

my actions.class.php is:

public function executeShow(sfWebRequest $request)
  {
$this->post = $this->getRoute()->getObject();
  }

and in the showSuccess.php I've:

getId() ?>
getSlug() ?>

everything "looks" good (as in: the links are genrated correctly and
succesShow displays something), but no matter what slug I pass (even
an inexistent one) I always see the post with ID=1.

any Ideas why? as well, I was wondering what does the @ in front of a
route-name mean? when do you use it? if I add it to my link_to I get
an error saying that the route misses the slug.

thanks a lot
Marco

http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455
--~--~-~--~~~---~--~~
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: Test:All under Windows

2009-10-20 Thread Gareth McCumskey
Wih I could offer more help. Its a shame you don't code on a *nix box

On Tue, Oct 20, 2009 at 11:55 AM, ridcully  wrote:

>
> Our Problems seem there is a space in the directoryname C:\program
> file where the PHP executable lies.
>
> Google says it's a bug in symfony, is any workaround there?
>
> THX
> Joerg
>
>
> On Oct 20, 9:55 am, Gareth McCumskey  wrote:
> > This is a path setting in windows. Look at the symfony.bat file and put
> the
> > correct path to your PHP executable.
> >
> > On Tue, Oct 20, 2009 at 9:50 AM, ridcully 
> wrote:
> >
> > > Hi,
> >
> > > our test task failed under Windows, it says 'Unable to find PHP
> > > executable'.
> >
> > > All other symfony task works, only the test task failed.
> >
> > > The Search Path is right and we're using 1.2.9 with doctrine.
> >
> > --
> > Gareth McCumskeyhttp://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: Join .Net Community

2009-10-20 Thread Gareth McCumskey
Mind not spamming the list with unrelated posts please?

On Tue, Oct 20, 2009 at 12:08 PM, Shawon_  wrote:

>
> Join .Net Community
>
> This group represents the Microsoft .Net community. All .net
> programmers all around the world are welcome here. In this group
> you'll find the latest releases of .Net related products, frameworks,
> Upgradation, technologies, IDEs etc. You also can share your
> experiences and problems you are facing. You can discuses about
> C#.Net, VB.net, ASP.Net and .Net frameworks, .net in other operating
> system etc. topics.
>
>
>
> http://www.dotnetcommunity.tk
> >
>


-- 
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: Join .Net Community

2009-10-20 Thread Alexandru-Emil Lupu
no thanks

On Tue, Oct 20, 2009 at 1:08 PM, Shawon_  wrote:

>
> Join .Net Community
>
> This group represents the Microsoft .Net community. All .net
> programmers all around the world are welcome here. In this group
> you'll find the latest releases of .Net related products, frameworks,
> Upgradation, technologies, IDEs etc. You also can share your
> experiences and problems you are facing. You can discuses about
> C#.Net, VB.net, ASP.Net and .Net frameworks, .net in other operating
> system etc. topics.
>
>
>
> http://www.dotnetcommunity.tk
> >
>


-- 
As programmers create bigger & better idiot proof programs, so the universe
creates bigger & better idiots!
I am on web:  http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0748.543.798

--~--~-~--~~~---~--~~
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] Join .Net Community

2009-10-20 Thread Shawon_

Join .Net Community

This group represents the Microsoft .Net community. All .net
programmers all around the world are welcome here. In this group
you'll find the latest releases of .Net related products, frameworks,
Upgradation, technologies, IDEs etc. You also can share your
experiences and problems you are facing. You can discuses about
C#.Net, VB.net, ASP.Net and .Net frameworks, .net in other operating
system etc. topics.



http://www.dotnetcommunity.tk
--~--~-~--~~~---~--~~
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: Test:All under Windows

2009-10-20 Thread ridcully

Our Problems seem there is a space in the directoryname C:\program
file where the PHP executable lies.

Google says it's a bug in symfony, is any workaround there?

THX
Joerg


On Oct 20, 9:55 am, Gareth McCumskey  wrote:
> This is a path setting in windows. Look at the symfony.bat file and put the
> correct path to your PHP executable.
>
> On Tue, Oct 20, 2009 at 9:50 AM, ridcully  wrote:
>
> > Hi,
>
> > our test task failed under Windows, it says 'Unable to find PHP
> > executable'.
>
> > All other symfony task works, only the test task failed.
>
> > The Search Path is right and we're using 1.2.9 with doctrine.
>
> --
> Gareth McCumskeyhttp://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: embed forms and use_fields

2009-10-20 Thread geoffroy

Hey,

I think in each case you must have to create an extend class (up!)

By example :
in backend/modules/sfGuard/lib/signinBackendForm.class.php &&
proflBackendForm.class.php
in frontend/modules/login/lib/signinFrontendForm.class.php &&
proflFrontendForm.class.php

And on each extends class you can overwrite widgets or validators or
keep some ..

I think it's a wrong way to change it in actionClass. It depends from
model not view or controller !

Use extend Class, it's the an advantage of sf !

Geo



On Oct 19, 11:55 pm, Alexandre SALOME 
wrote:
> Hello,
>
> So I want to show/hide the form fields dynamically in the controller
> dependent to the action
>
> You are right :
>
> your form will contains every fields : widgets and validators. Your
> validator schema is simple and have strict rules for login and password.
> Others are facultative.
>
> So, set your two fields as required, leave the others as "free".
>
> And create two templates :
>
> One for registering, with show/hide
> One other for profile, without show/hide
>
> You can separate the two logical with isNew() method. isNew = insert =create
> = registering // not isNew = update = edit = profile
>
> About show/hide, you must consider the forms in two separate scopes :
>
>     1 - defining fields and rules on them to allow only some kind of values
> : widgetSchema & validatorSchema
>
>     2 - displaying fields... This is not form but templating !
>
> Have fun,
>
> Alexandre
>
> 2009/10/19 mintao 
>
>
>
>
>
> > Imagine this scenario (I think that's pretty common, so I don't
> > understand why I can't find any solution):
>
> > 1. For the subscription process I only have 2 mandatory fields
> > "username" and "email". The password is created automatically.
>
> > 2. Later, when the user is subscribed, he/she has the possibility to
> > complete his/her profile with additional information like first name,
> > last name, skype, etc.
>
> > 3. For the login process I just need the username and password field
> > to be displayed.
>
> > So I want to show/hide the form fields dynamically in the controller
> > dependent to the action. So I only need to know how to access the
> > fields of an embedded form (which contains additional information to
> > sfUserGuard).
>
> > Best,
> > Florian
>
> > On Oct 19, 12:12 am, mintao  wrote:
> > > if there's a field called "last_name" in the embedded form called
> > > "profile", how can I access this?
>
> > > On 18 Okt., 11:15, geoffroy  wrote:
>
> > > > Hie,
>
> > > > I think you have ti unset() fields like :
>
> > > > class signForm extends PluginsfGuardUserForm
> > > > {
> > > >   public function configure()
> > > >   {
> > > >     $form = new sfGuardUserProfileForm();
> > > >     $this->embedForm('profile', $form);
>
> > > >     unset(
> > > >       $this['filed_u_dont_want1],
> > > >       $this['filed_u_dont_want2'],
> > > >     );
> > > >   }
>
> > > > }
>
> > > > Or try to unset() fields in your sfGuardProfileForm extend class.
>
> > > > Geo
>
> > > > On Oct 17, 11:35 pm, mintao  wrote:
>
> > > > > Hi folks,
>
> > > > > it's really no fun for a newbie to configure the symfony forms. I'm
> > > > > using 1.3Alpha2 and activated the plugin sfDoctrineUserGuard. The
> > > > > description of this plugin is so old that nearly nothing of the
> > > > > described steps worked.
> > > > > So 3 days later I'm trying to set up a sign up form. Therefore I use
> > > > > the sfGuardUserForm and  an embedded ProfileForm:
>
> > > > > class signForm extends PluginsfGuardUserForm
> > > > > {
> > > > >   public function configure()
> > > > >   {
> > > > >     $form = new sfGuardUserProfileForm();
> > > > >     $this->embedForm('profile', $form);
> > > > >     $this->useFields(array(
> > > > >         'username',
> > > > >         'profile.email',
> > > > >     ));
> > > > >   }
>
> > > > > }
>
> > > > > As you can imagine, I try only to display a username and  an email
> > > > > field. The username is part of the plugin, the email is part of the
> > > > > embedded form.
>
> > > > > My question: my version doesn't work. How can I display fields of
> > > > > embedded forms?
>
> --
> Alexandre Salomé -- alexandre.sal...@gmail.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] Re: Test:All under Windows

2009-10-20 Thread Gareth McCumskey
This is a path setting in windows. Look at the symfony.bat file and put the
correct path to your PHP executable.

On Tue, Oct 20, 2009 at 9:50 AM, ridcully  wrote:

>
> Hi,
>
> our test task failed under Windows, it says 'Unable to find PHP
> executable'.
>
> All other symfony task works, only the test task failed.
>
> The Search Path is right and we're using 1.2.9 with doctrine.
>
>
> >
>


-- 
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] Test:All under Windows

2009-10-20 Thread ridcully

Hi,

our test task failed under Windows, it says 'Unable to find PHP
executable'.

All other symfony task works, only the test task failed.

The Search Path is right and we're using 1.2.9 with doctrine.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---