[symfony-users] Re: SETUP SERVER

2009-05-22 Thread Nathan Rzepecki
Is symfony actually installed on this new server or is your project frozen?

-
Nathan Rzepecki
http://www.lionslair.net.au



Frank He wrote:
 I also suspect the new server configuration does not support symfony's 
 minimum requirement, such as PDO, php 5 or whatever.

 On Fri, May 22, 2009 at 1:21 PM, Eno symb...@gmail.com 
 mailto:symb...@gmail.com wrote:


 On Thu, 21 May 2009, janlar...@gmail.com
 mailto:janlar...@gmail.com wrote:

  hi im trying to replicate my server to a new pc, i can now run
 it but
  my problem is that when i clear cache it delete all in the cache

 That's normal.

  and
  when im trying to access it does not work anymore i need to copy my
  cache from my old server and to my new one.

 Bizarre - you should never copy cache from one server to another
 since its
 generated by symfony itself. You should check permissions - yes
 there's a
 command for that too:

 
 http://www.symfony-project.org/book/1_2/16-Application-Management-Tools#chapter_16_sub_managing_a_production_application

  Also my new server keeps
  ponting to my old database what do I need to configure so that I can
  point it to may new lo database server???

 Edit your databases.yml - did you write this application?

 Might be useful for you to read the 'Application Management Tools'
 chapter
 in the book.

 http://www.symfony-project.org/book/1_2/16-Application-Management-Tools





 

--~--~-~--~~~---~--~~
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: jQuery + prototype problem

2009-03-27 Thread Nathan Rzepecki
You can not use JQuery and Prototype at the same time.  All the 
library's use one component of JS and they can not both use it at the 
same time.  Unfortunately you can only use one at a time

-
Nathan Rzepecki
http://www.lionslair.net.au



Sid Bachtiar wrote:
 Great tip!

 I encountered this problem too and in the end I gave up and either use
 one or the other.

 2009/3/28 Dean Farrell dfarr...@horizon-research.com:
   
 You probably need to use the jQuery.noConflict() function, as both libraries
 are trying to use $, and colliding with each other.  I put it in my page
 header.  Then you'll have to use jQuery() instead of $() for any jOuery
 based functions you run.



 Dean



 

 From: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com]
 On Behalf Of Guychmyrat Amanmyradov
 Sent: Friday, March 27, 2009 9:10 AM
 To: symfony-users@googlegroups.com
 Subject: [symfony-users] jQuery + prototype problem



 Hi.
 i have forum :

 ?php echo form_remote_tag(array(
 'update'   = 'wall',
 'url'  = 'wall/addcomment',
 'before'   = if(!\$F('comment')){return false;},
 'complete' = $('comment').value='';
 )) ?

 it was working fine. But after i install jQuery it is not working anymore as
 Ajax!

 Before, it brings result in ajax and updates wall div. But now, it goes to
 wall/addcomment not bringing result!



 

 Yahoo! Türkiye açýldý!
 Haber, Ekonomi, Videolar, Oyunlar hepsi Yahoo! Türkiye'de!
 www.yahoo.com.tr/font

 



   

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



[symfony-users] Re: schema.sql is empty. Anybody can a help???

2009-03-16 Thread Nathan Rzepecki
I use propel not doctrine

-
Nathan Rzepecki
http://www.lionslair.net.au



Schorsch wrote:
 Hey,

 do you have an non empty schema.yml file? Doctrine stores it's
 schema.yml in the config/doctrine folder. If the doctrine folder
 doesn't exist, you have to create manually before you start.



 On Mar 15, 6:22 pm, Carlos Henrique chasi...@gmail.com wrote:
   
  am following the tutorial for Jobeet/Doctrine on Day 3.
 After I created the schema.yml and run build-sql, the prompt is

 
 doctrine  generating sql for models
 doctrine  Generated SQL successfully for models
 
 But I cannot find mentioned sql file under data/sql. There is only
 one
 emply schema.sql residing.
 I am using Windows XAMPP distribution.

 Anybody can a help?
 
 

   

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



[symfony-users] Re: Save an embedded form that relies on the other form

2009-03-16 Thread Nathan Rzepecki
It is this line here that does it.

$entry-setServerId($this-getObject()-getId());

within

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

Because by the time that is called the main object is then saved.


-
Nathan Rzepecki
http://www.lionslair.net.au



maestro wrote:
 Still stuck!

 Looking a the sfPropelForm save() it is clear that the call to
 saveEmbeddedForms comes after the main object is getting saved. I see
 it also happening in the log file. Could it be something to do with
 the begin and transaction calls that surrounding doSave and
 saveEmbeddedForms? I mean, maybe the id of the main object isn't
 available until the db transaction gets committed. But, then am doing
 the exact same thing else where and it is working fine.

 hmm, need to take a break..





 On Mar 16, 7:10 pm, lionslair webmas...@lionslair.net.au wrote:
   
 I finally cracked in.  These two functions in my ServerForm class

   public function bind(array $taintedValues = null, array
 $taintedFiles = null)
   {
 $ret = parent::bind($taintedValues, $taintedFiles);
 foreach ($this-embeddedForms as $name = $form) {
   $this-embeddedForms[$name]-isBound = true;
   $this-embeddedForms[$name]-values = $this-values[$name];
 }

 return $ret;
   }

   public function saveEmbeddedForms($con = null, $forms = null)
   {
 foreach($this-getEmbeddedForms() as $closeForm)
 {

   $entry=$closeForm-save();
   $entry-setServerId($this-getObject()-getId());
   //mail('nat...@lionslair.net.au', 'debug', print_r
 ($entry, true));
   $entry-save();
 }
   }

 On Mar 16, 12:42 am, justin_davis jdavis1...@gmail.com wrote:

 
 I'm doing something like this, and this is my solution:
   
 Let's say you have two forms, one is an sfGuardUser form (Form 1), the
 other is a Profile form (Form 2) (representing those two models).
 When a new user is created, a new profile must be also created that
 depends on that record (Profile depends on sfGuardUser):
   
 (this is sfGuardUserForm.class.php):
   
   $profileForm = new ProfileForm();
   $profileForm-getObject()-setsfGuardUserId($this-getObject());
   $this-embedForm('profile', $profileForm);
   
 You'll also want to unset the sfGuardUserId field: unset($profileForm
 ['sf_guard_user_id']);
   
 So, it's basically creating a ProfileForm, getting the object related
 to it, then telling symfony to set that object's sfUserGuardId to
 equal the sfGuardUser object that this class represents.
   
 Does that make sense?  Hope this helps.  I'm somewhat of a newb
 myself, so I may be telling you something that doesn't apply.
   
 Good luck!
   
 Justin
   
 On Feb 5, 4:25 pm, Timmy m...@timothybowler.com wrote:
   
 I have two forms form 1 and form 2. Form 2 is embedded into form 1. On
 save form1 must be saved as a new row and therefore recieving a
 primary key, Afterwards this foreign key needs to be injected into
 form 2 before it can save.
 
 The only way i have figured out at the mo is after the form is valid.
 Instantiate the two models, populate them, add form2 model to form 1
 model then save.
 
 Isn't there an easier way?
 
 Thanx
 
 
 

   

--~--~-~--~~~---~--~~
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: Save an embedded form that relies on the other form

2009-03-16 Thread Nathan Rzepecki
No problem.

-
Nathan Rzepecki
http://www.lionslair.net.au



maestro wrote:
 Oppps, this is embarrassing. I was missing the autoIncrement: true, in
 my message schema.yml.
 Nathan thanx for your time..

 On Mar 16, 10:53 pm, maestro mustafa...@gmail.com wrote:
   
 but it is! it is right there in the db.. isn't this interesting!

 On Mar 16, 10:29 pm, Nathan Rzepecki webmas...@lionslair.net.au
 wrote:

 
 That means it is not yet saved.
   
 -
 Nathan Rzepeckihttp://www.lionslair.net.au
   
 maestro wrote:
   
 sadly $this-getObject()-getId() is returning a null in my case...
 although the rest of the object values are there.
 
 On Mar 16, 8:13 pm, Nathan Rzepecki webmas...@lionslair.net.au
 wrote:
 
 It is this line here that does it.
   
 $entry-setServerId($this-getObject()-getId());
   
 within
   
  public function saveEmbeddedForms($con = null, $forms = null)
   
 Because by the time that is called the main object is then saved.
   
 -
 Nathan Rzepeckihttp://www.lionslair.net.au
   
 maestro wrote:
   
 Still stuck!
 
 Looking a the sfPropelForm save() it is clear that the call to
 saveEmbeddedForms comes after the main object is getting saved. I see
 it also happening in the log file. Could it be something to do with
 the begin and transaction calls that surrounding doSave and
 saveEmbeddedForms? I mean, maybe the id of the main object isn't
 available until the db transaction gets committed. But, then am doing
 the exact same thing else where and it is working fine.
 
 hmm, need to take a break..
 
 On Mar 16, 7:10 pm, lionslair webmas...@lionslair.net.au wrote:
 
 I finally cracked in.  These two functions in my ServerForm class
   
   public function bind(array $taintedValues = null, array
 $taintedFiles = null)
   {
 $ret = parent::bind($taintedValues, $taintedFiles);
 foreach ($this-embeddedForms as $name = $form) {
   $this-embeddedForms[$name]-isBound = true;
   $this-embeddedForms[$name]-values = $this-values[$name];
 }
   
 return $ret;
   }
   
   public function saveEmbeddedForms($con = null, $forms = null)
   {
 foreach($this-getEmbeddedForms() as $closeForm)
 {
   
   $entry=$closeForm-save();
   $entry-setServerId($this-getObject()-getId());
   //mail('nat...@lionslair.net.au', 'debug', print_r
 ($entry, true));
   $entry-save();
 }
   }
   
 On Mar 16, 12:42 am, justin_davis jdavis1...@gmail.com wrote:
   
 I'm doing something like this, and this is my solution:
 
 Let's say you have two forms, one is an sfGuardUser form (Form 1), the
 other is a Profile form (Form 2) (representing those two models).
 When a new user is created, a new profile must be also created that
 depends on that record (Profile depends on sfGuardUser):
 
 (this is sfGuardUserForm.class.php):
 
   $profileForm = new ProfileForm();
   
 $profileForm-getObject()-setsfGuardUserId($this-getObject());
   $this-embedForm('profile', $profileForm);
 
 You'll also want to unset the sfGuardUserId field: unset($profileForm
 ['sf_guard_user_id']);
 
 So, it's basically creating a ProfileForm, getting the object related
 to it, then telling symfony to set that object's sfUserGuardId to
 equal the sfGuardUser object that this class represents.
 
 Does that make sense?  Hope this helps.  I'm somewhat of a newb
 myself, so I may be telling you something that doesn't apply.
 
 Good luck!
 
 Justin
 
 On Feb 5, 4:25 pm, Timmy m...@timothybowler.com wrote:
 
 I have two forms form 1 and form 2. Form 2 is embedded into form 1. On
 save form1 must be saved as a new row and therefore recieving a
 primary key, Afterwards this foreign key needs to be injected into
 form 2 before it can save.
   
 The only way i have figured out at the mo is after the form is valid.
 Instantiate the two models, populate them, add form2 model to form 1
 model then save.
   
 Isn't there an easier way?
   
 Thanx
   
 
 

   

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