[symfony-users] Re: frontend and backend

2009-07-26 Thread Jake Barnes



On Jul 24, 11:18 am, juaninf juan...@gmail.com wrote:
 Hi everyone..

 Please i want to know when put modules within on the backend or within
 frontend,
 for example. If I have a user module this have that stay in frontend
 or both? or that criteria
 I have that do.


The first 2 sites I did, I only had one app. The dashboard for the
admins was just a module in that.

I'm not sure that you really need 2 apps, but, basically, the main
difference would be that with frontend you assume that everything is
public, till you lock it down, and with backend you assume that
everything is secure, unless you unlock it. And when I write you
assume, I'm actually talking about what settings you've put in the
apps security.yml.
--~--~-~--~~~---~--~~
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 do the objects take so long to dump to screen?

2009-07-26 Thread Lawrence


I was pursuing a rare bug involved with saving a form, so I opened
sfForm.class.php and I added in a print_r() statement:

public function getErrorSchema()
{

echo  the error schema: ;
print_r($this-errorSchema);
die();

return $this-errorSchema;
}

I simply wanted to see what the errorSchema was.

So, having changed sfForm.class.php, I tested the form again, hit
submit, and the object internals began to dump to the screen. This
went on for a long time. I got up and went and watched some
television. I'd come back during the commercials, and the data was
still being dumped to the browser. 40 minutes went by before it seemed
to stop. FireFox became so overwhelmed with info that it stopped
responding. I had to do ps aux to get the PID, so I could kill
FireFox from the terminal.

The dev site is on my machine. So there are no issues with network
speed, as the data is not going over a network. I've got the whole
LAMP stack running on my Ubunutu machine. I'm running Symfony 1.2.7.

How is it possible that the errorSchema could hold such an insane
amount of data? This attacks my intuition. Does it strike anyone else
as extraordinary that the print_r() statement might take 40 minutes to
complete?





--~--~-~--~~~---~--~~
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: why do the objects take so long to dump to screen?

2009-07-26 Thread Bernhard Schussek

Hi Lawrence

I suppose you are using Doctrine. The problem with dumping Doctrine
records is that they contains cyclic references. That means, a record
references a table, which references the record, which references the
table ... you get the drill.

If you try to dump this record, PHP tries to follow all these
references and literally goes on forever. Your error schema probably
contains a reference to such a Doctrine record (or any other object
with cyclic references) and thus is affected by this problem.

The solution is quite easy though, in your case: Use sfErrorSchema's
__toString() function:

print $form-getErrorSchema();

(Note that I'm not using print_r() or var_dump(), because these don't
implicitly convert the object to a string)


Bernhard
--
Software Architect  Engineer
Blog: http://webmozarts.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: Task - The default context does not exist

2009-07-26 Thread Bernhard Schussek

Could it be that yo have overwritten DemoAccountPeer::doSelect() to
use sfContext?

I suggest you to read the following article if you want to learn more
about that error:
http://webmozarts.com/2009/07/01/why-sfcontextgetinstance-is-bad/


Bernhard

--
Software Architect  Engineer
Blog: http://webmozarts.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: why do the objects take so long to dump to screen?

2009-07-26 Thread Jake Barnes



On Jul 26, 7:19 am, Bernhard Schussek bschus...@gmail.com wrote:
 Hi Lawrence

 I suppose you are using Doctrine. The problem with dumping Doctrine
 records is that they contains cyclic references. That means, a record
 references a table, which references the record, which references the
 table ... you get the drill.

 If you try to dump this record, PHP tries to follow all these
 references and literally goes on forever. Your error schema probably
 contains a reference to such a Doctrine record (or any other object
 with cyclic references) and thus is affected by this problem.

 The solution is quite easy though, in your case: Use sfErrorSchema's
 __toString() function:

 print $form-getErrorSchema();

 (Note that I'm not using print_r() or var_dump(), because these don't
 implicitly convert the object to a string)


Thanks much for this, that is a hot tip. I was, in fact, using Propel,
but I'm sure the same thing is true. I had the impression that I was
dealing with an infinite loop, but I was having trouble imagining how
print_r() could trigger an infinite loop. Your explanation makes a lot
of sense.







--~--~-~--~~~---~--~~
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] Form Validation based on a tainted value?

2009-07-26 Thread johnwards

Hello,

I have a form containing dates, I have two fields called:

Auction date
Baseline required by

Auction date must be after the baseline date, now I can do this on
existing objects by using the date validator and the min field.
However, I need the tainted value for edits and new data. The tainted
values are not avaliable until after bind.

Now I could overload the bind method and then call my setup of
validators after then but this seems wrong, especially since bind uses
the validators...so I'd have to call them twice??

I'm sure I am missing something here...help.

Cheers
John
--~--~-~--~~~---~--~~
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: why do the objects take so long to dump to screen?

2009-07-26 Thread John - White October

If you can, install xdebug and use var_dump rather than print_r. It
stops recursion after a configurable amount of times. Also makes
errors pretty...

On Jul 26, 6:32 pm, Jake Barnes lkrub...@geocities.com wrote:
 On Jul 26, 7:19 am, Bernhard Schussek bschus...@gmail.com wrote:



  Hi Lawrence

  I suppose you are using Doctrine. The problem with dumping Doctrine
  records is that they contains cyclic references. That means, a record
  references a table, which references the record, which references the
  table ... you get the drill.

  If you try to dump this record, PHP tries to follow all these
  references and literally goes on forever. Your error schema probably
  contains a reference to such a Doctrine record (or any other object
  with cyclic references) and thus is affected by this problem.

  The solution is quite easy though, in your case: Use sfErrorSchema's
  __toString() function:

  print $form-getErrorSchema();

  (Note that I'm not using print_r() or var_dump(), because these don't
  implicitly convert the object to a string)

 Thanks much for this, that is a hot tip. I was, in fact, using Propel,
 but I'm sure the same thing is true. I had the impression that I was
 dealing with an infinite loop, but I was having trouble imagining how
 print_r() could trigger an infinite loop. Your explanation makes a lot
 of sense.
--~--~-~--~~~---~--~~
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: Reading mail from smtp with symfony.

2009-07-26 Thread John - White October

We use the Zend Mail class from Zend Framework.

As recommended in the Jobeet tutorial!

Cheers
John

On Jul 25, 1:43 pm, Sherif sherifgmans...@gmail.com wrote:
 Thanks for sharing.. interesting + creative method

 On Jul 25, 6:37 pm, Crafty_Shadow vankat...@gmail.com wrote:

  In the end, I went with a task that is called through a corn job.
  The task uses php's IMAP set of functions, some of my code is based 
  onhttp://davidwalsh.name/gmail-php-imapandvarious other sources that
  come up when you do a simple google search. Depending on your host,
  finding way to access your mailbox may pose a bit of a problem, what I
  found to work well for 2 of the hosts I use was {yourhost.com:993/imap/
  ssl/novalidate-cert}INBOX

  As for my particular problem, I used symfony to send automatic e-mails
  concerning the status of orders on my site. Every e-mails set is kept
  as a conversation and is attached to the order in question, and a
  serial number of the order is present in the auto-emails body and
  subject (+ a small note not to delete the SN from the subject when
  replying (which I do think anyone would do anyway, but just to be on
  the safe side), then I perform a regex, and attach every e-mail to the
  appropriate order. Makes for a pretty neat system.

  On Jul 24, 7:52 pm, Gábor Fási maerl...@gmail.com wrote:

   You misunderstood me :) I fetch data from websites, not mail accounts.

   On Fri, Jul 24, 2009 at 18:17, Richtermeisternex...@gmail.com wrote:

Hey Gabor,

I'd be interested in what software you use to access the imap servers.
Any pointers? :)

Thanks,
Daniel

On Jul 24, 6:33 am, Gábor Fási maerl...@gmail.com wrote:
I have a site that needs to regularly collect info from other
locations, not mails though, but websites. I achieved this via tasks
scheduled with cron. They all boil down to the simple
connect-process-store steps, I believe a similar approach is ok for
you.

On Fri, Jul 24, 2009 at 15:08, Crafty_Shadowvankat...@gmail.com 
wrote:

 Everybody knows how to send e-mails from symfony, or php in general.
 It's a trivial task.
 However, I am now faced with the need to do the reverse - use imap to
 read e-mails.
 From what I gather, one way to do so would be a task that is called
 through a cron job

 If anyone has any experience with this, please advice.


--~--~-~--~~~---~--~~
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: Form Validation based on a tainted value?

2009-07-26 Thread Gábor Fási

I'm not sure I get what you mean. If you want to make sure one date is
later than another one, I suggest you set up an
sfValidatorSchemaCompare [1] instance as a post validator.

[1] 
http://www.symfony-project.org/forms/1_2/en/B-Validators#chapter_b_sub_sfvalidatorschemacompare

On Sun, Jul 26, 2009 at 21:35, johnwardsjohnwa...@gmail.com wrote:

 Hello,

 I have a form containing dates, I have two fields called:

 Auction date
 Baseline required by

 Auction date must be after the baseline date, now I can do this on
 existing objects by using the date validator and the min field.
 However, I need the tainted value for edits and new data. The tainted
 values are not avaliable until after bind.

 Now I could overload the bind method and then call my setup of
 validators after then but this seems wrong, especially since bind uses
 the validators...so I'd have to call them twice??

 I'm sure I am missing something here...help.

 Cheers
 John
 


--~--~-~--~~~---~--~~
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] dynamic input fields

2009-07-26 Thread mirfan

hi,
i am working with a very dynamic form that is i can add and remove
fields from admin side into a form and all the fields are saved in
database table and the form will load all the fields when loaded
the table will be

id filed_namefield_id   default_value
==
how i will manage it in symfony, please help
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
-~--~~~~--~~--~--~---