[symfony-users] Re: generating url in task

2010-11-09 Thread hribo
that's not the case.
i am able to generate url also with url_for. in my script i am using
loaded helpers. but the case is that when i am using these helpers,
the LINK IS GENERATED BADLY. helpers prefixes: "symfony/symfony/" in
front of each well generated url.
when i am using this url helpers in action or in template, it works
correctly.

did anybody headed this problem? or is it some kind of symfony bug?
thank you


On Nov 9, 7:06 am, Gareth McCumskey  wrote:
> Tasks do not load the html helpers by default because, well, they do not run
> on the web server but on the comman line. To load the helper file for
> url_for you need to load the Url helper as such:
>
> sfLoader::loadHelpers(array('Url'));
>
> Then you can go ahead and use url_for to build your url.
>
>
>
> On Mon, Nov 8, 2010 at 6:21 PM, hribo  wrote:
> > hello i have problem with generating url inside of task.
> > i have tried already 3 different ways to generate it but always with
> > same result - with symfony/symfony/ prefix at the beginning:
>
> > symfony/symfony/reminder_set_to_is_returned/{$token_id} - WRONG
> > reminder_set_to_is_returned/{$token_id} - THIS SHOULD BE THE RESULT
>
> > these are my ways to generate url inside of task:
> > url_for('reminder/activateUserReminderIsActive?tokenizer='.$reminder-
> > >setTokenizer('borrower'));
>
> > sfContext::createInstance($configuration)->getRouting()-
> > >generate('reminder_set_to_is_returned', array('tokenizer' =>
> > $reminder->setTokenizer('borrower')));
>
> > sfContext::createInstance($configuration)->getController()-
> > >genUrl('reminder/reminderSetToIsReturned?tokenizer='.$reminder-
> > >setTokenizer('borrower'));
>
> > do you know where is the problem?
> > thank you
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.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
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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


Re: [symfony-users] Re: generating url in task

2010-11-09 Thread Gareth McCumskey
A quick google search found something that can explain it for you.
Basically, url_for uses the $_SERVER variables which in command line
obviously does not exist:

https://groups.google.com/group/symfony-users/msg/f71d8c3f819060f9?hl=fr&pli=1

On Tue, Nov 9, 2010 at 12:10 PM, hribo  wrote:

> that's not the case.
> i am able to generate url also with url_for. in my script i am using
> loaded helpers. but the case is that when i am using these helpers,
> the LINK IS GENERATED BADLY. helpers prefixes: "symfony/symfony/" in
> front of each well generated url.
> when i am using this url helpers in action or in template, it works
> correctly.
>
> did anybody headed this problem? or is it some kind of symfony bug?
> thank you
>
>
> On Nov 9, 7:06 am, Gareth McCumskey  wrote:
> > Tasks do not load the html helpers by default because, well, they do not
> run
> > on the web server but on the comman line. To load the helper file for
> > url_for you need to load the Url helper as such:
> >
> > sfLoader::loadHelpers(array('Url'));
> >
> > Then you can go ahead and use url_for to build your url.
> >
> >
> >
> > On Mon, Nov 8, 2010 at 6:21 PM, hribo  wrote:
> > > hello i have problem with generating url inside of task.
> > > i have tried already 3 different ways to generate it but always with
> > > same result - with symfony/symfony/ prefix at the beginning:
> >
> > > symfony/symfony/reminder_set_to_is_returned/{$token_id} - WRONG
> > > reminder_set_to_is_returned/{$token_id} - THIS SHOULD BE THE RESULT
> >
> > > these are my ways to generate url inside of task:
> > > url_for('reminder/activateUserReminderIsActive?tokenizer='.$reminder-
> > > >setTokenizer('borrower'));
> >
> > > sfContext::createInstance($configuration)->getRouting()-
> > > >generate('reminder_set_to_is_returned', array('tokenizer' =>
> > > $reminder->setTokenizer('borrower')));
> >
> > > sfContext::createInstance($configuration)->getController()-
> > > >genUrl('reminder/reminderSetToIsReturned?tokenizer='.$reminder-
> > > >setTokenizer('borrower'));
> >
> > > do you know where is the problem?
> > > thank you
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to
> > > security at symfony-project.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
> >
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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
>



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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: Defining an object [alias]?

2010-11-09 Thread xpanshun
I'm sorry if some of you feel I don't belong here because I ask for
help on things that are basic to you. I am not a developer pro. I am
doing a project for school that is due at the end of the month.

If I could find help elsewhere I would not be here. None of my
teachers at school will help me and I have no friends that do this
stuff. I am self teaching as much as I can, but I post here when I
can't find answers on my own. Sometimes I will be looking for hours
for the answer to a question that could be  answered for me here in a
few minutes. This is the most responsive discussion board I have come
across--that is why I use it. It has been a lifesaver to me because I
would not be as far along in my project without it.

If you all feel like I am wasting your time with my questions, you do
not have to answer them. Although, I VERY MUCH appreciate when people
do take the time to help me with my novice inquiries.

I have never worked with a development framework before and I'm
discovering how to incorporate different languages into how it works.
Therefore, what may seem obvious to others is actually not so obvious
to me.  I would also like to learn more of PHP, AJAX, and other
languages when I have the time, but that time is not now--as I am
skimming off the top to get my project presentable by the deadline.

This is why I ask questions. I just want you all to know that the
answers you all give me DO help me to learn. Maybe not as intensively
as reading a book, but I definitely have learned a lot from posting
here.

Thank you for all of your patience and understanding.


On Nov 8, 12:25 am, Gareth McCumskey  wrote:
> This is not symfony. This is basic PHP you should know before even
> considering using symfony. Seriously, go study some PHP mate. a foreach loop
> is autoamtically loops through an array. If you have the following code:
>
> $array_var = array (1,2,3);
> foreach ($array_var as $var)
> {
>   echo $var;
>
> }
>
> you will get "123" printed out.
>
>
>
>
>
>
>
>
>
> On Sat, Nov 6, 2010 at 1:53 AM, xpanshun  wrote:
> > Okay this may be the dumbest inquiry ever but I can't find any
> > references to help me.
>
> > In regards to the foreach statement ( > $product): ?>) used in some of the default templates...
>
> > Clearly this is a loop, but the part reading $products as $product,
> > what does that exactly mean? I am assuming that $product is an alias
> > for $products, but where is $products defined in the first place?
>
> > Also, my most important question...
>
> > What is another way to define $products as $product without using a
> > loop?
>
> > Thanks in advance.
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.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 > legroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: generating url in task

2010-11-09 Thread hribo
well,
still doing the same.
never mind. i used str_replace() to get it away. i just wanted to make
it cleaner.

On Nov 9, 11:30 am, Gareth McCumskey  wrote:
> A quick google search found something that can explain it for you.
> Basically, url_for uses the $_SERVER variables which in command line
> obviously does not exist:
>
> https://groups.google.com/group/symfony-users/msg/f71d8c3f819060f9?hl...
>
>
>
> On Tue, Nov 9, 2010 at 12:10 PM, hribo  wrote:
> > that's not the case.
> > i am able to generate url also with url_for. in my script i am using
> > loaded helpers. but the case is that when i am using these helpers,
> > the LINK IS GENERATED BADLY. helpers prefixes: "symfony/symfony/" in
> > front of each well generated url.
> > when i am using this url helpers in action or in template, it works
> > correctly.
>
> > did anybody headed this problem? or is it some kind of symfony bug?
> > thank you
>
> > On Nov 9, 7:06 am, Gareth McCumskey  wrote:
> > > Tasks do not load the html helpers by default because, well, they do not
> > run
> > > on the web server but on the comman line. To load the helper file for
> > > url_for you need to load the Url helper as such:
>
> > > sfLoader::loadHelpers(array('Url'));
>
> > > Then you can go ahead and use url_for to build your url.
>
> > > On Mon, Nov 8, 2010 at 6:21 PM, hribo  wrote:
> > > > hello i have problem with generating url inside of task.
> > > > i have tried already 3 different ways to generate it but always with
> > > > same result - with symfony/symfony/ prefix at the beginning:
>
> > > > symfony/symfony/reminder_set_to_is_returned/{$token_id} - WRONG
> > > > reminder_set_to_is_returned/{$token_id} - THIS SHOULD BE THE RESULT
>
> > > > these are my ways to generate url inside of task:
> > > > url_for('reminder/activateUserReminderIsActive?tokenizer='.$reminder-
> > > > >setTokenizer('borrower'));
>
> > > > sfContext::createInstance($configuration)->getRouting()-
> > > > >generate('reminder_set_to_is_returned', array('tokenizer' =>
> > > > $reminder->setTokenizer('borrower')));
>
> > > > sfContext::createInstance($configuration)->getController()-
> > > > >genUrl('reminder/reminderSetToIsReturned?tokenizer='.$reminder-
> > > > >setTokenizer('borrower'));
>
> > > > do you know where is the problem?
> > > > thank you
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it
> > to
> > > > security at symfony-project.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
>
> > > --
> > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > > twitter: @garethmcc
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.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
>
> --
> Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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


Re: [symfony-users] Re: Defining an object [alias]?

2010-11-09 Thread Alex Pilon
Lol, dude, this is a group of symfony professionals. If you need to ask
basic php questions you should check out sitepoint.com. That entire board is
a more or less an entry level board that would be the appropriate place to
ask.

Its great that you are trying to learn, but part of that is where and how to
find your own answers. Just keep in mind that there is a level of
appropriate places to find answers to these. Asking a symfony users group
how a foreach loop works is not really appropriate subject matter for this
users group.

Anyways, keep learning, and really learn! If you just ask questions trying
to get something done by a deadline then maybe you need to take a step back
and learn to walk before running!

On Tue, Nov 9, 2010 at 10:42, xpanshun  wrote:

> I'm sorry if some of you feel I don't belong here because I ask for
> help on things that are basic to you. I am not a developer pro. I am
> doing a project for school that is due at the end of the month.
>
> If I could find help elsewhere I would not be here. None of my
> teachers at school will help me and I have no friends that do this
> stuff. I am self teaching as much as I can, but I post here when I
> can't find answers on my own. Sometimes I will be looking for hours
> for the answer to a question that could be  answered for me here in a
> few minutes. This is the most responsive discussion board I have come
> across--that is why I use it. It has been a lifesaver to me because I
> would not be as far along in my project without it.
>
> If you all feel like I am wasting your time with my questions, you do
> not have to answer them. Although, I VERY MUCH appreciate when people
> do take the time to help me with my novice inquiries.
>
> I have never worked with a development framework before and I'm
> discovering how to incorporate different languages into how it works.
> Therefore, what may seem obvious to others is actually not so obvious
> to me.  I would also like to learn more of PHP, AJAX, and other
> languages when I have the time, but that time is not now--as I am
> skimming off the top to get my project presentable by the deadline.
>
> This is why I ask questions. I just want you all to know that the
> answers you all give me DO help me to learn. Maybe not as intensively
> as reading a book, but I definitely have learned a lot from posting
> here.
>
> Thank you for all of your patience and understanding.
>
>
> On Nov 8, 12:25 am, Gareth McCumskey  wrote:
> > This is not symfony. This is basic PHP you should know before even
> > considering using symfony. Seriously, go study some PHP mate. a foreach
> loop
> > is autoamtically loops through an array. If you have the following code:
> >
> > $array_var = array (1,2,3);
> > foreach ($array_var as $var)
> > {
> >   echo $var;
> >
> > }
> >
> > you will get "123" printed out.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Nov 6, 2010 at 1:53 AM, xpanshun  wrote:
> > > Okay this may be the dumbest inquiry ever but I can't find any
> > > references to help me.
> >
> > > In regards to the foreach statement ( > > $product): ?>) used in some of the default templates...
> >
> > > Clearly this is a loop, but the part reading $products as $product,
> > > what does that exactly mean? I am assuming that $product is an alias
> > > for $products, but where is $products defined in the first place?
> >
> > > Also, my most important question...
> >
> > > What is another way to define $products as $product without using a
> > > loop?
> >
> > > Thanks in advance.
> >
> > > --
> > > If you want to report a vulnerability issue on symfony, please send it
> to
> > > security at symfony-project.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
> >
> > --
> > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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
>



-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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

[symfony-users] Re: Defining an object [alias]?

2010-11-09 Thread xpanshun
Thanks Alex. I was not aware this was a strictly professional board. I
will definitely have to check out that site. Again, thanks for being
understanding about it. I never meant to upset anyone with my
presence.

On Nov 9, 10:53 am, Alex Pilon  wrote:
> Lol, dude, this is a group of symfony professionals. If you need to ask
> basic php questions you should check out sitepoint.com. That entire board is
> a more or less an entry level board that would be the appropriate place to
> ask.
>
> Its great that you are trying to learn, but part of that is where and how to
> find your own answers. Just keep in mind that there is a level of
> appropriate places to find answers to these. Asking a symfony users group
> how a foreach loop works is not really appropriate subject matter for this
> users group.
>
> Anyways, keep learning, and really learn! If you just ask questions trying
> to get something done by a deadline then maybe you need to take a step back
> and learn to walk before running!
>
>
>
>
>
>
>
>
>
> On Tue, Nov 9, 2010 at 10:42, xpanshun  wrote:
> > I'm sorry if some of you feel I don't belong here because I ask for
> > help on things that are basic to you. I am not a developer pro. I am
> > doing a project for school that is due at the end of the month.
>
> > If I could find help elsewhere I would not be here. None of my
> > teachers at school will help me and I have no friends that do this
> > stuff. I am self teaching as much as I can, but I post here when I
> > can't find answers on my own. Sometimes I will be looking for hours
> > for the answer to a question that could be  answered for me here in a
> > few minutes. This is the most responsive discussion board I have come
> > across--that is why I use it. It has been a lifesaver to me because I
> > would not be as far along in my project without it.
>
> > If you all feel like I am wasting your time with my questions, you do
> > not have to answer them. Although, I VERY MUCH appreciate when people
> > do take the time to help me with my novice inquiries.
>
> > I have never worked with a development framework before and I'm
> > discovering how to incorporate different languages into how it works.
> > Therefore, what may seem obvious to others is actually not so obvious
> > to me.  I would also like to learn more of PHP, AJAX, and other
> > languages when I have the time, but that time is not now--as I am
> > skimming off the top to get my project presentable by the deadline.
>
> > This is why I ask questions. I just want you all to know that the
> > answers you all give me DO help me to learn. Maybe not as intensively
> > as reading a book, but I definitely have learned a lot from posting
> > here.
>
> > Thank you for all of your patience and understanding.
>
> > On Nov 8, 12:25 am, Gareth McCumskey  wrote:
> > > This is not symfony. This is basic PHP you should know before even
> > > considering using symfony. Seriously, go study some PHP mate. a foreach
> > loop
> > > is autoamtically loops through an array. If you have the following code:
>
> > > $array_var = array (1,2,3);
> > > foreach ($array_var as $var)
> > > {
> > >   echo $var;
>
> > > }
>
> > > you will get "123" printed out.
>
> > > On Sat, Nov 6, 2010 at 1:53 AM, xpanshun  wrote:
> > > > Okay this may be the dumbest inquiry ever but I can't find any
> > > > references to help me.
>
> > > > In regards to the foreach statement ( > > > $product): ?>) used in some of the default templates...
>
> > > > Clearly this is a loop, but the part reading $products as $product,
> > > > what does that exactly mean? I am assuming that $product is an alias
> > > > for $products, but where is $products defined in the first place?
>
> > > > Also, my most important question...
>
> > > > What is another way to define $products as $product without using a
> > > > loop?
>
> > > > Thanks in advance.
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it
> > to
> > > > security at symfony-project.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 > > >  legroups.com>
> > 
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > > --
> > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > > twitter: @garethmcc
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.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 > legroups.com>
> > For more options, visit this group at
> >http://group

Re: [symfony-users] Re: Defining an object [alias]?

2010-11-09 Thread Alex Pilon
Dude we arent upset about your presence and we don't wish you off this
board. The point is, that this is a symfony user group. In general if one is
using symfony, one already has a very good knowledge of php. When I say its
a professionals board I guess what I mean is be professional. If you need to
ask what a loop is, that means that you are missing some fundamental
computer programming knowledge and you should be asking that on a beginner
board or reading a tutorial. There is no way that you searched for hours and
couldn't find something that explained what a php foreach loop is.

So when posting here, be professional and figure out if your question has to
do with symfony or not. This user group needs to maintain a certain
reputation otherwise we might as well call it hte general question board.

On Tue, Nov 9, 2010 at 10:56, xpanshun  wrote:

> Thanks Alex. I was not aware this was a strictly professional board. I
> will definitely have to check out that site. Again, thanks for being
> understanding about it. I never meant to upset anyone with my
> presence.
>
> On Nov 9, 10:53 am, Alex Pilon  wrote:
> > Lol, dude, this is a group of symfony professionals. If you need to ask
> > basic php questions you should check out sitepoint.com. That entire
> board is
> > a more or less an entry level board that would be the appropriate place
> to
> > ask.
> >
> > Its great that you are trying to learn, but part of that is where and how
> to
> > find your own answers. Just keep in mind that there is a level of
> > appropriate places to find answers to these. Asking a symfony users group
> > how a foreach loop works is not really appropriate subject matter for
> this
> > users group.
> >
> > Anyways, keep learning, and really learn! If you just ask questions
> trying
> > to get something done by a deadline then maybe you need to take a step
> back
> > and learn to walk before running!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Tue, Nov 9, 2010 at 10:42, xpanshun  wrote:
> > > I'm sorry if some of you feel I don't belong here because I ask for
> > > help on things that are basic to you. I am not a developer pro. I am
> > > doing a project for school that is due at the end of the month.
> >
> > > If I could find help elsewhere I would not be here. None of my
> > > teachers at school will help me and I have no friends that do this
> > > stuff. I am self teaching as much as I can, but I post here when I
> > > can't find answers on my own. Sometimes I will be looking for hours
> > > for the answer to a question that could be  answered for me here in a
> > > few minutes. This is the most responsive discussion board I have come
> > > across--that is why I use it. It has been a lifesaver to me because I
> > > would not be as far along in my project without it.
> >
> > > If you all feel like I am wasting your time with my questions, you do
> > > not have to answer them. Although, I VERY MUCH appreciate when people
> > > do take the time to help me with my novice inquiries.
> >
> > > I have never worked with a development framework before and I'm
> > > discovering how to incorporate different languages into how it works.
> > > Therefore, what may seem obvious to others is actually not so obvious
> > > to me.  I would also like to learn more of PHP, AJAX, and other
> > > languages when I have the time, but that time is not now--as I am
> > > skimming off the top to get my project presentable by the deadline.
> >
> > > This is why I ask questions. I just want you all to know that the
> > > answers you all give me DO help me to learn. Maybe not as intensively
> > > as reading a book, but I definitely have learned a lot from posting
> > > here.
> >
> > > Thank you for all of your patience and understanding.
> >
> > > On Nov 8, 12:25 am, Gareth McCumskey  wrote:
> > > > This is not symfony. This is basic PHP you should know before even
> > > > considering using symfony. Seriously, go study some PHP mate. a
> foreach
> > > loop
> > > > is autoamtically loops through an array. If you have the following
> code:
> >
> > > > $array_var = array (1,2,3);
> > > > foreach ($array_var as $var)
> > > > {
> > > >   echo $var;
> >
> > > > }
> >
> > > > you will get "123" printed out.
> >
> > > > On Sat, Nov 6, 2010 at 1:53 AM, xpanshun  wrote:
> > > > > Okay this may be the dumbest inquiry ever but I can't find any
> > > > > references to help me.
> >
> > > > > In regards to the foreach statement ( > > > > $product): ?>) used in some of the default templates...
> >
> > > > > Clearly this is a loop, but the part reading $products as $product,
> > > > > what does that exactly mean? I am assuming that $product is an
> alias
> > > > > for $products, but where is $products defined in the first place?
> >
> > > > > Also, my most important question...
> >
> > > > > What is another way to define $products as $product without using a
> > > > > loop?
> >
> > > > > Thanks in advance.
> >
> > > > > --
> > > > > If you want to report a vulnerability issue 

[symfony-users] [Symfony 2] Security: after login still not logged

2010-11-09 Thread gordonslondon
Hi,

After successfully login with the security component, i dump
$container->get('security.context')->getUser(); wich return null, in
the debug toolbar the user is still "anon.".

What i've checked:
 - Nothing interesting in logs.
 - There's no error message, all went fine.
 - The user is found and his password is encoded like described in the
documentation.
 - After login, i'm redirected to /index.php/ like a successful login
(but still non logged).

security.config:
providers:
main:
password_encoder: sha1
entity: { class: GordBundle:Account, property: email }
firewalls:
login_check: { pattern: /login_check, security: true,
anonymous: true, form-login: true }
backend:
pattern:/admin/.*
form_login: true
logout:  true
public:
pattern:/.*
security: false
form_login: true

Normally the user should be logged in, but not.
Is someone has any idea on why i can't login ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: Defining an object [alias]?

2010-11-09 Thread xpanshun
I perfectly understand what you are saying about the integrity of the
board. Again, I just did not know the whole protocol. But now that I
know I will definitely evaluate any questions before I post here.
Thank you for the heads up.

On Nov 9, 11:01 am, Alex Pilon  wrote:
> Dude we arent upset about your presence and we don't wish you off this
> board. The point is, that this is a symfony user group. In general if one is
> using symfony, one already has a very good knowledge of php. When I say its
> a professionals board I guess what I mean is be professional. If you need to
> ask what a loop is, that means that you are missing some fundamental
> computer programming knowledge and you should be asking that on a beginner
> board or reading a tutorial. There is no way that you searched for hours and
> couldn't find something that explained what a php foreach loop is.
>
> So when posting here, be professional and figure out if your question has to
> do with symfony or not. This user group needs to maintain a certain
> reputation otherwise we might as well call it hte general question board.
>
>
>
>
>
>
>
>
>
> On Tue, Nov 9, 2010 at 10:56, xpanshun  wrote:
> > Thanks Alex. I was not aware this was a strictly professional board. I
> > will definitely have to check out that site. Again, thanks for being
> > understanding about it. I never meant to upset anyone with my
> > presence.
>
> > On Nov 9, 10:53 am, Alex Pilon  wrote:
> > > Lol, dude, this is a group of symfony professionals. If you need to ask
> > > basic php questions you should check out sitepoint.com. That entire
> > board is
> > > a more or less an entry level board that would be the appropriate place
> > to
> > > ask.
>
> > > Its great that you are trying to learn, but part of that is where and how
> > to
> > > find your own answers. Just keep in mind that there is a level of
> > > appropriate places to find answers to these. Asking a symfony users group
> > > how a foreach loop works is not really appropriate subject matter for
> > this
> > > users group.
>
> > > Anyways, keep learning, and really learn! If you just ask questions
> > trying
> > > to get something done by a deadline then maybe you need to take a step
> > back
> > > and learn to walk before running!
>
> > > On Tue, Nov 9, 2010 at 10:42, xpanshun  wrote:
> > > > I'm sorry if some of you feel I don't belong here because I ask for
> > > > help on things that are basic to you. I am not a developer pro. I am
> > > > doing a project for school that is due at the end of the month.
>
> > > > If I could find help elsewhere I would not be here. None of my
> > > > teachers at school will help me and I have no friends that do this
> > > > stuff. I am self teaching as much as I can, but I post here when I
> > > > can't find answers on my own. Sometimes I will be looking for hours
> > > > for the answer to a question that could be  answered for me here in a
> > > > few minutes. This is the most responsive discussion board I have come
> > > > across--that is why I use it. It has been a lifesaver to me because I
> > > > would not be as far along in my project without it.
>
> > > > If you all feel like I am wasting your time with my questions, you do
> > > > not have to answer them. Although, I VERY MUCH appreciate when people
> > > > do take the time to help me with my novice inquiries.
>
> > > > I have never worked with a development framework before and I'm
> > > > discovering how to incorporate different languages into how it works.
> > > > Therefore, what may seem obvious to others is actually not so obvious
> > > > to me.  I would also like to learn more of PHP, AJAX, and other
> > > > languages when I have the time, but that time is not now--as I am
> > > > skimming off the top to get my project presentable by the deadline.
>
> > > > This is why I ask questions. I just want you all to know that the
> > > > answers you all give me DO help me to learn. Maybe not as intensively
> > > > as reading a book, but I definitely have learned a lot from posting
> > > > here.
>
> > > > Thank you for all of your patience and understanding.
>
> > > > On Nov 8, 12:25 am, Gareth McCumskey  wrote:
> > > > > This is not symfony. This is basic PHP you should know before even
> > > > > considering using symfony. Seriously, go study some PHP mate. a
> > foreach
> > > > loop
> > > > > is autoamtically loops through an array. If you have the following
> > code:
>
> > > > > $array_var = array (1,2,3);
> > > > > foreach ($array_var as $var)
> > > > > {
> > > > >   echo $var;
>
> > > > > }
>
> > > > > you will get "123" printed out.
>
> > > > > On Sat, Nov 6, 2010 at 1:53 AM, xpanshun  wrote:
> > > > > > Okay this may be the dumbest inquiry ever but I can't find any
> > > > > > references to help me.
>
> > > > > > In regards to the foreach statement ( > > > > > $product): ?>) used in some of the default templates...
>
> > > > > > Clearly this is a loop, but the part reading $products as $product,
> > > > > > what does

Re: [symfony-users] Password fields

2010-11-09 Thread Martin Ibarra Cervantes
Please read the form on symfony  or the chapter ...  read the book
jobeet , you can :-)


On Sun, Nov 7, 2010 at 9:22 PM, Gareth McCumskey  wrote:
> erm ...  HTML 101
>
> On Mon, Nov 8, 2010 at 12:09 AM, xpanshun  wrote:
>>
>> How can I make the input of a certain field in a generated form (on
>> the frontend) displayed as a password type (i.e. )? Where in
>> the directory can this be altered?
>>
>> Thanks.
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.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
>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: Security: after login still not logged

2010-11-09 Thread Florian
Hi,

I think you missed the third part of security config: the
access_control list ( Authorization )
http://docs.symfony-reloaded.org/master/guides/security/index.html

try adding this in your config:

access_control:
- { path: /admin/.*, role: ROLE_ADMIN }
- { path: /.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

The way you configured your security means /.* urls are accessible for
all ( security: false ).
Only /admin/.* urls are secured, but you have to tell explicitly to
the security component what kind of authorization is able to see these
urls.
By adding the /admin/.* access_control, you say only users with role
ROLE_ADMIN ( thus authenticated ) can see those resources.


On Nov 9, 5:15 pm, gordonslondon  wrote:
> Hi,
>
> After successfully login with the security component, i dump
> $container->get('security.context')->getUser(); wich return null, in
> the debug toolbar the user is still "anon.".
>
> What i've checked:
>  - Nothing interesting in logs.
>  - There's no error message, all went fine.
>  - The user is found and his password is encoded like described in the
> documentation.
>  - After login, i'm redirected to /index.php/ like a successful login
> (but still non logged).
>
> security.config:
>     providers:
>         main:
>             password_encoder: sha1
>             entity: { class: GordBundle:Account, property: email }
>     firewalls:
>         login_check: { pattern: /login_check, security: true,
> anonymous: true, form-login: true }
>         backend:
>             pattern:    /admin/.*
>             form_login: true
>             logout:  true
>         public:
>             pattern:    /.*
>             security: false
>             form_login: true
>
> Normally the user should be logged in, but not.
> Is someone has any idea on why i can't login ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: Security: after login still not logged

2010-11-09 Thread Florian
It could come from an issue with the session read/write, plese see:

http://groups.google.com/group/symfony-devs/msg/794ede4676fca362?

On Nov 9, 5:15 pm, gordonslondon  wrote:
> Hi,
>
> After successfully login with the security component, i dump
> $container->get('security.context')->getUser(); wich return null, in
> the debug toolbar the user is still "anon.".
>
> What i've checked:
>  - Nothing interesting in logs.
>  - There's no error message, all went fine.
>  - The user is found and his password is encoded like described in the
> documentation.
>  - After login, i'm redirected to /index.php/ like a successful login
> (but still non logged).
>
> security.config:
>     providers:
>         main:
>             password_encoder: sha1
>             entity: { class: GordBundle:Account, property: email }
>     firewalls:
>         login_check: { pattern: /login_check, security: true,
> anonymous: true, form-login: true }
>         backend:
>             pattern:    /admin/.*
>             form_login: true
>             logout:  true
>         public:
>             pattern:    /.*
>             security: false
>             form_login: true
>
> Normally the user should be logged in, but not.
> Is someone has any idea on why i can't login ?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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] Javascript onLoad event in a symfony context.

2010-11-09 Thread Parijat Kalia
Hey people,

I am trying to have an onLoad event in one of my webpages. But as we know,
the body tag appears in the layout and not the template pages. So I am
unable to understand how this can be done in symfony. If this is a little
out of context, I am sorry, but it's typically straight forward. Offcourse I
do not want that onload event on my body tag since it would load for all
pages, but I want the onLoad only for one specific page.

Thanks and regards

Parijat

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: Javascript onLoad event in a symfony context.

2010-11-09 Thread Parijat Kalia
Actually nevermind. I just put a body tag right at the top of the template
page I require the onload event on and it did execute itself. A quesxtion
that can spur off this is ...did including a body tag supersede the existing
body tag in the symfony layout page??? Clearly it did not supersede, because
the page rendered itself as per the CSS style that is assigned to the Body
tag. So I am assuming it simply  included the onload event into the existing
body tag. Anybody want to shed light on this?

On Tue, Nov 9, 2010 at 3:34 PM, Parijat Kalia wrote:

> Hey people,
>
> I am trying to have an onLoad event in one of my webpages. But as we know,
> the body tag appears in the layout and not the template pages. So I am
> unable to understand how this can be done in symfony. If this is a little
> out of context, I am sorry, but it's typically straight forward. Offcourse I
> do not want that onload event on my body tag since it would load for all
> pages, but I want the onLoad only for one specific page.
>
> Thanks and regards
>
> Parijat
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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


Re: [symfony-users] Javascript onLoad event in a symfony context.

2010-11-09 Thread Gareth McCumskey
You don't need to use the body tag as 

Using JQuery you can include your Javascript in your template and use JQuery
to do stuff onload for you.

On Wed, Nov 10, 2010 at 1:34 AM, Parijat Kalia wrote:

> Hey people,
>
> I am trying to have an onLoad event in one of my webpages. But as we know,
> the body tag appears in the layout and not the template pages. So I am
> unable to understand how this can be done in symfony. If this is a little
> out of context, I am sorry, but it's typically straight forward. Offcourse I
> do not want that onload event on my body tag since it would load for all
> pages, but I want the onLoad only for one specific page.
>
> Thanks and regards
>
> Parijat
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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
>



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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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


Re: [symfony-users] Javascript onLoad event in a symfony context.

2010-11-09 Thread Gareth McCumskey
And to answer your question, if you look at the layout file it has a section
labelled $sf_content. Everytiem you load a page, symfony runs your action,
processes the view associated to that action and "catches" the HTML that
view produces then takes your layout and inserts the generated HTML it
caught, just like if you had done a normal include_once in a php file.

On Wed, Nov 10, 2010 at 1:34 AM, Parijat Kalia wrote:

> Hey people,
>
> I am trying to have an onLoad event in one of my webpages. But as we know,
> the body tag appears in the layout and not the template pages. So I am
> unable to understand how this can be done in symfony. If this is a little
> out of context, I am sorry, but it's typically straight forward. Offcourse I
> do not want that onload event on my body tag since it would load for all
> pages, but I want the onLoad only for one specific page.
>
> Thanks and regards
>
> Parijat
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.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
>



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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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: RESTFul & etag

2010-11-09 Thread Shihab KB
When the settings are

In the settings.yml
prod:
  .settings:
no_script_name: on
logging_enabled:off
cache:  on
etag:   on


In the cache.yml
default:
  enabled: on
  with_layout: true
  lifetime: 86400
  client_lifetime: 0

then in the headers, etag, last-modified headers are coming with
response. And the changes made in the database is not reflecting in
the downloaded content without clearing the cache in the server
(symfony clear cache command)

But when the settings are

In the settings.yml
prod:
  .settings:
no_script_name: on
logging_enabled:off
cache:  false
etag:   on


In the cache.yml
default:
  enabled: false
  with_layout: true
  lifetime: 86400
  client_lifetime: 0

then in the headers, etag, last-modified headers are not coming with
response. And the changes made in the database is reflecting immedetly
(in the next request after modification)  in the downloaded content.
For this no need to clear cache in the server?

can somebody help me?

I am using Poster plugin of firefox to test the rest apis.

regards
Shihab

On Nov 8, 12:17 pm, pghoratiu  wrote:
> You have to check the browser HTTP headers that are sent (Request/
> Response) via Firebug or HttpFox Firefox extensions.
> Do you have enabled caching for your page?
> There are more things to consider when you try to cache a page, not
> just the Etag.
>
>     gabriel
>
> On Nov 8, 7:28 am, Shihab KB  wrote:
>
>
>
> > Thank you for your answer. I am trying to implement ETag in my restful
> > apis. I have a problem here. Please check this and could you please
> > give me a solution?
>
> > Hi,
>
> > I am trying to implement etag feature in my RESTFul web services. I
> > heard that etag is a mechanism that HTTP provides for cache
> > validation, and which allows a client to make conditional requests and
> > saves bandwidth, as a web server does not need to send a full response
> > if the content has not changed. I have manged to implement the etag
> > feature as given below.
>
> > In the settings.yml
> > prod:
> >   .settings:
> >     no_script_name:         on
> >     logging_enabled:        off
> >     cache:                  on
> >     etag:                   on
>
> > In the cache.yml
> > default:
> >   enabled: on
> >   with_layout: true
> >   lifetime: 86400
> >   client_lifetime: 0
>
> > But I have one issue that, after implementing this, when I modified
> > the content in the database, the client is receiving only previous
> > data. Not modified one. When I reset the above settings (setting.yml
> > and cache.yml) its working fine.
>
> > Have faced same situation? Can you suggest a way to overcome this?
>
> > My client application is a .NET application.
>
> > regards
> > Shihab
>
> > On Nov 5, 3:10 pm, Gareth McCumskey  wrote:
>
> > > ETag is just a way to have finer grained control over caching and to 
> > > manage
> > > when to reprocess a request or just send back a cached response. So for
> > > example, if you send a GET request for a resource with id 10 and get a
> > > result, sending a request later for id 10 should respond back with the
> > > cached version if the resource of id 10 has not changed but reprocess the
> > > request if it has changed.
>
> > > On Fri, Nov 5, 2010 at 8:29 AM, Shihab KB  wrote:
> > > > Dear friends,
>
> > > > Can you explain me the significance and benefits of enabling the ETag
> > > > feature ?
>
> > > > regards
> > > > Shihab
>
> > > > --
> > > > If you want to report a vulnerability issue on symfony, please send it 
> > > > to
> > > > security at symfony-project.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 > > >  ­legroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/symfony-users?hl=en
>
> > > --
> > > Gareth McCumskeyhttp://garethmccumskey.blogspot.com
> > > twitter: @garethmcc- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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] sfDoctrineMasterSlavePlugin and I18n

2010-11-09 Thread Janaksinh Jadeja
I trying to use sfDoctrineMasterSlavePlugin for replication with symfony 
1.4 and PHP 5.3. But I am facing problem while selecting I18n records 
and getting "Unknown relation alias Translation". Which was working 
without using sfDoctrineMasterSlavePlugin.


Does anyone faced such problem with sfDoctrineMasterSlavePlugin and i18n 
behavior. Is this a bug or What.


Please let me know if any one have such problem or solution.

// JJ

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.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