[symfony-users] Routing problem with sfGuardUserProfile

2010-03-10 Thread NOOVEO - Christophe Brun
I'm trying to use sfDoctrineApplyPlugin, I have been asked to display 2
backend pages : one to handle administrators, the other one to handle
other users. 
I have generated 2 modules on the backend side. 
 
In routing.yml, the 2 routes are identical : 
utilisateurs:
  class: sfDoctrineRouteCollection
  options:
model:sfGuardUserProfile
module:   utilisateurs
prefix_path:  /utilisateurs
column:   id
with_wildcard_routes: true
 
administrateurs:
  class: sfDoctrineRouteCollection
  options:
model:sfGuardUser
module:   administrateurs
prefix_path:  /administrateurs
column:   id
with_wildcard_routes: true
 
In both config/generator.yml, the params are also identical : 
(utilisateurs)
  class: sfDoctrineGenerator
  param:
model_class:   sfGuardUserProfile
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  utilisateurs
with_doctrine_route:   true
actions_base_class:sfActions
 
(administrateurs)
  class: sfDoctrineGenerator
  param:
model_class:   sfGuardUser
theme: admin
non_verbose_templates: true
with_show: false
singular:  ~
plural:~
route_prefix:  administrateurs
with_doctrine_route:   true
actions_base_class:sfActions
 
 
But the behaviour of the application is not the same : if I try to list
the 'utilisateurs' backend page, symfony throws a routing error : 
The /utilisateurs/:id.:sf_format route has some missing mandatory
parameters
 
An url like backend_dev.php/utilisateurs/6/edit throws the same error. 
Any idea of what I am missing here ? 

-- 
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] Web Server Configuration

2010-03-10 Thread DEEPAK BHATIA
My hosts file is (/etc/hosts)

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1   nechclst.in
127.0.0.1   localhost.localdomain   localhost
127.0.0.1   deepaknew.nechclst.in   deepaknew
::1 localhost6.localdomain6 localhost6
127.0.0.1 test # added by Apache Friends XAMPP
10.0.1.66 www.jobeet.com.localhost

My Virtual host settings are


VirtualHost 127.0.0.1:8080
ServerName www.jobeet.com.localhost
DocumentRoot /home/sfprojects/jobeet/web
DirectoryIndex index.php
Directory /home/sfprojects/jobeet/web
AllowOverride All
Allow from All
/Directory
Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
AllowOverride All
Allow from All
/Directory
/VirtualHost
When I ping from other machine - ping www.jobeet.com.localhost , it doesn't
work.

On Mon, Mar 8, 2010 at 4:19 PM, Jerzy Biernacki
jerzy.bierna...@gmail.comwrote:

 Hi all,

 your project's hostname: www.jobeet.com.localhost
 your project's server IP name: 127.0.0.1 (local interface) AND (example) *
 192.168.1.1* (external interface)

 For every machine from your LAN accessing this project add to /etc/hosts
 (C:\windows\system32\drivers\etc\hosts AFAIR):

 192.168.1.1 www.jobeet.com*.localhost*

 What you described seams to me like wrongly configured IP-HOST mapping.
 When you are accessing the project from your LAN you are using correct IP,
 but *WRONG HOST* - apache (or whatever it is) is serving you default page
 (/var/www/index.html or whatever is set to be default). Just change the HOST
 and it should work :)

 Cheers,
 JMB

 2010/3/8 DEEPAK BHATIA toreachdee...@gmail.com

 What should be the virtual host?

 On Mon, Mar 8, 2010 at 1:06 PM, Buddhika Perera budd...@gmail.com
 wrote:
  Check with virtual host i used netbeans 6.8 for the coding its
  more easy than ever check out
  from the site ...there was a tutorial on how to use Symfony  with the
 Editor
 
 
 
 
  On Mon, Mar 8, 2010 at 12:23 PM, DEEPAK BHATIA toreachdee...@gmail.com
 wrote:
  Hi,
 
  I am using Symfony 1.4.
 
  In the section of configuration of Web Server in Jobeet Tutorial as
 given below
 
  When I access http://www.jobeet.com/ on some other machine on LAN, I
  get some output like
  Index of cgi-bin
 
  When I access http://www.jobeet.com.locahost/index.php on the local
  machine, I get symfony project successfully installed.
 
  QUESTION: How can I access my project as http://www.jobeet.com ? Which
  index.htm I need to modify/create ?
 
  ===Web Server Configuration==
 
  # Be sure to only have this line once in your configuration
 
  NameVirtualHost 127.0.0.1:8080
 
  # This is the configuration for your project
 
  Listen 127.0.0.1:8080
 
  VirtualHost 127.0.0.1:8080
  DocumentRoot /home/sfprojects/jobeet/web
  DirectoryIndex index.php
  Directory /home/sfprojects/jobeet/web
  AllowOverride All
  Allow from All
  /Directory
  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  AllowOverride All
  Allow from All
  /Directory
  /VirtualHost
 
  Added to the httpd.conf
 
  # This is the configuration for your project
  VirtualHost 127.0.0.1:80 http://127.0.0.1/
  ServerName www.jobeet.com.localhost
  !-- same configuration as before --
  /VirtualHost
 
  Added to the hosts file
  127.0.0.1 www.jobeet.com.localhost
 
  --
  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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en


 

Re: [symfony-users] Re: Error 500 when i try to login the web app in production

2010-03-10 Thread Eno
On Tue, 9 Mar 2010, Javier Garcia wrote:

 But i cannot write in httpd.conf:
 
 -rw---  1 root root   2123855 Mar  9 07:57 httpd.conf

You need to ask whoever is hosting the application to add the config 
directives to your vhost configuration (or switch on .htaccess for your 
vhost).



-- 


-- 
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] Login form database authentication

2010-03-10 Thread Trung Huynh
Hi

I'm trying to get a login form working with database authentication
and the right symfony way of achieving this without using sfGuard.
Overall, I'm trying to comprehend the way of doing things in
symfony, hopefully you guys can pinpoint me in the right direction.

action.class.php has a working executeLogin which makes use of lib/
form/LoginForm.class.php. I can login with a hardcoded dummy code, so
that works well.

However I'm struggling about how to go with the database
authentication. I've seen examples (symfony 1.0 example) that do the
authentication in the action.class.php/executeLogin(). However. I
don't think that is good since it's isn't the place to do the logic
things, right?

So I got this in:

lib/model/doctrine/MemberTable.class.php:
-
  public function getMemberByEmailAndPassword($email,$password)
  {
  $q = $this-createQuery('m')
-where('m.email = ?', $email)
-andWhere('m.password = ?', $password);

  return $q-execute();
  }
-


action.class.php: in my public function executeLogin():
-
$this-result = Doctrine_Core::getTable('member')-
getMemberByEmailAndPassword($tabform['email'],$tabform['password']);
-

Now I got doctrinecollection member object in $this-result[0].
I can do $this-result[0]getNickname(); but I think i'm not doing
this correctly, there must be a better way.

In this Symfony 1.0 cookbook example they use   $user =
UserPeer::doSelectOne($c); and eventually have:
$user-getPassword.

This Symfony 1.0  Cookbook example makes use of a class UserPeer and
doSelectOne. But it doesn't exist in Symfont 1.4. What are their
equivalents nowadays?

This example below is pretty much how I want it too but I shall put my
logic code into lib/model/doctrine to conform the MVC pattern.

Also it makes use of $request-setError('email', 'this user does not
exist'); Is it possible to do this in Symfony 1.4 as well.

public function executeLogin()
{
  // check if the user exists
  $c = new Criteria();
  $c-add(UserPeer::LOGIN, $this-getRequestParameter('login'));
  $user = UserPeer::doSelectOne($c);
  if ($user)
  {
// check if the password is correct
if ($this-getRequestParameter('password') == $user-
getPassword())
{
  // sign in
  $this-getContext()-getUser()-signIn();
  // proceed to home page
  return $this-redirect('main/index');
}
else
{
  $this-getRequest()-setError('password', 'wrong password');
}
  }
  else
  {
$this-getRequest()-setError('email', 'this user does not
exist');
  }

  // an error was found
  return $this-forward('security', 'index');
}


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


Re: [symfony-users] Re: Error 500 when i try to login the web app in production

2010-03-10 Thread Javier Garcia

On 03/10/2010 10:07 AM, Eno wrote:

You need to ask whoever is hosting the application to add the config
directives to your vhost configuration
   


Do you mean modify httpd.conf? I can not modify httpd.conf, not even if 
i ask to modify it.


On 03/10/2010 10:07 AM, Eno wrote:

You need to ask whoever is hosting the application to add the config
directives to your vhost configuration (or switch on .htaccess for your
vhost).
   


From my hosting provider told me i have enable .htaccess (mod_rewrite).

Javi

--
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: Symfony frontend sort by th

2010-03-10 Thread ziclo
Gareth,

Is your solution compatible with Doctrine ? I have a lot of errors
when i try to implement it.

Ziclo

On 5 mar, 07:17, Gareth McCumskey gmccums...@gmail.com wrote:
 In your view in the header cell:

 th?php echo 
 link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
 ? /th

 In your action:

 $this-data = TablePeer::getData($parameters, $request-getParameter('sort'));

 In your model for class TablePeer:

 public static function getData($parameters, $sort_by)
 {
   $c = new Criteria();
   //Set all criteria that needs setting
   $c-addAscendingOrderByColumn(self::$sort_by);
   $results = self::doSelect($c);

   return $results;

 }

 see? Easy! :)



 On Thu, Mar 4, 2010 at 5:46 PM, ziclo lauren...@gmail.com wrote:
  Does anyone has a tutorial about that ? The backend is usefull but a
  good tutorial would be appreciate in order to be able to do that kind
  of common functionnalities.

  Tnak you

  On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
  Hello,

  That what i'm going to do. Thank you

  On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

   Why not just implement it yourself? You don't need to have everything
   pre-written for it. Simply make the column heading a link pointing to
   an action that re-runs the query with the correct ORDER BY sql in
   it

   On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
Hi,

I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.

With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.

Does a tutorial exists about that ?

Thank you.

Ziclo

--
You received this message because you are subscribed to the Google 
Groups symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://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: Symfony frontend sort by th

2010-03-10 Thread Gareth McCumskey
Mine was written in Propel. You will need to use the Doctrine
equivalent methods in the correct places. I have never used Doctrine
(yet) so can't do that for you

On Wed, Mar 10, 2010 at 3:17 PM, ziclo lauren...@gmail.com wrote:
 Gareth,

 Is your solution compatible with Doctrine ? I have a lot of errors
 when i try to implement it.

 Ziclo

 On 5 mar, 07:17, Gareth McCumskey gmccums...@gmail.com wrote:
 In your view in the header cell:

 th?php echo 
 link_to(image_tag('sort_icon.png'),'module/action?sort=column_name')
 ? /th

 In your action:

 $this-data = TablePeer::getData($parameters, 
 $request-getParameter('sort'));

 In your model for class TablePeer:

 public static function getData($parameters, $sort_by)
 {
   $c = new Criteria();
   //Set all criteria that needs setting
   $c-addAscendingOrderByColumn(self::$sort_by);
   $results = self::doSelect($c);

   return $results;

 }

 see? Easy! :)



 On Thu, Mar 4, 2010 at 5:46 PM, ziclo lauren...@gmail.com wrote:
  Does anyone has a tutorial about that ? The backend is usefull but a
  good tutorial would be appreciate in order to be able to do that kind
  of common functionnalities.

  Tnak you

  On 18 fév, 11:16, ziclo lauren...@gmail.com wrote:
  Hello,

  That what i'm going to do. Thank you

  On 18 fév, 09:12, Gareth McCumskey gmccums...@gmail.com wrote:

   Why not just implement it yourself? You don't need to have everything
   pre-written for it. Simply make the column heading a link pointing to
   an action that re-runs the query with the correct ORDER BY sql in
   it

   On Sat, Feb 13, 2010 at 3:55 PM, ziclo lauren...@gmail.com wrote:
Hi,

I would like to be able to sort (order by ASC ou DESC) by clicking on
a colon title (th). The same way as the backend of the jobeet
tutorial.
I don't want it on the backend but on the frontend.

With doctrine i can use the pager without difficulties but i do not
know how to sort a list (result of a query) by a simple click on the
title of a colonn.

Does a tutorial exists about that ?

Thank you.

Ziclo

--
You received this message because you are subscribed to the Google 
Groups symfony users group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group 
athttp://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




-- 
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] Web Server Configuration

2010-03-10 Thread DEEPAK BHATIA
*** Please check ***

 My hosts file is (/etc/hosts)

 # Do not remove the following line, or various programs
 # that require network functionality will fail.
 127.0.0.1   nechclst.in
 127.0.0.1   localhost.localdomain   localhost
 127.0.0.1   deepaknew.nechclst.in   deepaknew
 ::1 localhost6.localdomain6 localhost6
 127.0.0.1 test # added by Apache Friends XAMPP
 10.0.1.66 www.jobeet.com.localhost

 My Virtual host settings are


 VirtualHost 127.0.0.1:8080
 ServerName www.jobeet.com.localhost
 DocumentRoot /home/sfprojects/jobeet/web
 DirectoryIndex index.php
 Directory /home/sfprojects/jobeet/web
 AllowOverride All
 Allow from All
 /Directory
 Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
 Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
 AllowOverride All
 Allow from All
 /Directory
 /VirtualHost
 When I ping from other machine - ping www.jobeet.com.localhost , it
 doesn't work.

   On Mon, Mar 8, 2010 at 4:19 PM, Jerzy Biernacki 
 jerzy.bierna...@gmail.com wrote:

 Hi all,

 your project's hostname: www.jobeet.com.localhost
 your project's server IP name: 127.0.0.1 (local interface) AND (example)
 *192.168.1.1* (external interface)

 For every machine from your LAN accessing this project add to /etc/hosts
 (C:\windows\system32\drivers\etc\hosts AFAIR):

 192.168.1.1 www.jobeet.com*.localhost*

 What you described seams to me like wrongly configured IP-HOST mapping.
 When you are accessing the project from your LAN you are using correct IP,
 but *WRONG HOST* - apache (or whatever it is) is serving you default page
 (/var/www/index.html or whatever is set to be default). Just change the HOST
 and it should work :)

 Cheers,
 JMB

 2010/3/8 DEEPAK BHATIA toreachdee...@gmail.com

 What should be the virtual host?

 On Mon, Mar 8, 2010 at 1:06 PM, Buddhika Perera budd...@gmail.com
 wrote:
  Check with virtual host i used netbeans 6.8 for the coding its
  more easy than ever check out
  from the site ...there was a tutorial on how to use Symfony  with the
 Editor
 
 
 
 
  On Mon, Mar 8, 2010 at 12:23 PM, DEEPAK BHATIA 
 toreachdee...@gmail.com wrote:
  Hi,
 
  I am using Symfony 1.4.
 
  In the section of configuration of Web Server in Jobeet Tutorial as
 given below
 
  When I access http://www.jobeet.com/ on some other machine on LAN, I
  get some output like
  Index of cgi-bin
 
  When I access http://www.jobeet.com.locahost/index.php on the local
  machine, I get symfony project successfully installed.
 
  QUESTION: How can I access my project as http://www.jobeet.com ?
 Which
  index.htm I need to modify/create ?
 
  ===Web Server Configuration==
 
  # Be sure to only have this line once in your configuration
 
  NameVirtualHost 127.0.0.1:8080
 
  # This is the configuration for your project
 
  Listen 127.0.0.1:8080
 
  VirtualHost 127.0.0.1:8080
  DocumentRoot /home/sfprojects/jobeet/web
  DirectoryIndex index.php
  Directory /home/sfprojects/jobeet/web
  AllowOverride All
  Allow from All
  /Directory
  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  AllowOverride All
  Allow from All
  /Directory
  /VirtualHost
 
  Added to the httpd.conf
 
  # This is the configuration for your project
  VirtualHost 127.0.0.1:80 http://127.0.0.1/
  ServerName www.jobeet.com.localhost
  !-- same configuration as before --
  /VirtualHost
 
  Added to the hosts file
  127.0.0.1 www.jobeet.com.localhost
 
  --
  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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 

[symfony-users] Form dependency injection

2010-03-10 Thread Steve Sanyal
Forms have dependencies on their widget, validator, help and error
message information.  I found that specifying these dependencies in
code was a lot more difficult to maintain - specifically for the
message information.

To solve this I created a helper class that injects the message
information into each form.  This has worked out well.

However, I've also now run into some cases where the messages may need
some code to run (eg: I need to put a link in the message, for which I
need a routing lookup).

Right now, my codebase has these kinds of messages directly in the
form code.  However, I ran into an issue with this - my backend app
was no longer compatible since the routing for the app was different.
To work around this, I just used the base form in my admin app rather
than the subclass.

Since form dependency information seems to be tied to the application,
would it not make sense to have a generalized dependency injection
mechanism to address this issue in the framework?  Has anyone else
come across this?

Cheers,
Steve

-- 
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: Error 500 when i try to login the web app in production

2010-03-10 Thread Gábor Fási
Then try what I said, and comment the Options.. line in your
.htaccess. I've seen that line cause troubles.

On Wed, Mar 10, 2010 at 13:34, Javier Garcia tirengar...@gmail.com wrote:
 On 03/10/2010 10:07 AM, Eno wrote:

 You need to ask whoever is hosting the application to add the config
 directives to your vhost configuration


 Do you mean modify httpd.conf? I can not modify httpd.conf, not even if i
 ask to modify it.

 On 03/10/2010 10:07 AM, Eno wrote:

 You need to ask whoever is hosting the application to add the config
 directives to your vhost configuration (or switch on .htaccess for your
 vhost).


 From my hosting provider told me i have enable .htaccess (mod_rewrite).

 Javi

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


Re: [symfony-users] Form dependency injection

2010-03-10 Thread Thomas Rabaix
Don't try to put to much view things into the form, most of your problems
can be addressed by using raw html into templates.

Now if you need some cross link application feature you can use this plugin
: http://www.symfony-project.org/plugins/swCrossLinkApplicationPlugin
http://www.symfony-project.org/plugins/swCrossLinkApplicationPlugin

On Wed, Mar 10, 2010 at 4:21 PM, Steve Sanyal steve.san...@gmail.comwrote:

 Forms have dependencies on their widget, validator, help and error
 message information.  I found that specifying these dependencies in
 code was a lot more difficult to maintain - specifically for the
 message information.

 To solve this I created a helper class that injects the message
 information into each form.  This has worked out well.

 However, I've also now run into some cases where the messages may need
 some code to run (eg: I need to put a link in the message, for which I
 need a routing lookup).

 Right now, my codebase has these kinds of messages directly in the
 form code.  However, I ran into an issue with this - my backend app
 was no longer compatible since the routing for the app was different.
 To work around this, I just used the base form in my admin app rather
 than the subclass.

 Since form dependency information seems to be tied to the application,
 would it not make sense to have a generalized dependency injection
 mechanism to address this issue in the framework?  Has anyone else
 come across this?

 Cheers,
 Steve

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
Thomas Rabaix
http://rabaix.net

-- 
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] After deploying, should i unfreeze the project in the remote host?

2010-03-10 Thread Javier Garcia

Hi,

just that. I suppose no.

Javi

--
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] (Doctrine) as keyword doesn't work as expected. Can't figure out a query :(

2010-03-10 Thread miguelSantirso
Hi, I have a starts_at field that keeps the date in which certain
event starts or has started (in UNIX seconds). Also, I have a
minutes_long field. I need to filter all the objects that are already
finished and I tried adding the following to my original query:

$q-addSelect('c.starts_at + c.minutes_long*60 AS finishes_at');
$q-addWhere(finishes_at = ?, time());

However, Doctrine doesn't seem to recognise finishes_at in the
addWhere statement. I don't know if this is the expected behavior of
Doctrine. If so, how could I write an equivalent query?

-- 
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] (Doctrine) as keyword doesn't work as expected. Can't figure out a query :(

2010-03-10 Thread Andrei Dziahel
Hi.

WHERE statement is not applicable to calculated columns. Use HAVING instead.

2010/3/10 miguelSantirso tirso...@gmail.com

 Hi, I have a starts_at field that keeps the date in which certain event
 starts or has started (in UNIX seconds). Also, I have a minutes_long field.
 I need to filter all the objects that are already finished and I tried
 adding the following to my original query:

 $q-addSelect('c.starts_at + c.minutes_long*60 AS finishes_at');
 $q-addWhere(finishes_at = ?, time());

 However, Doctrine doesn't seem to recognise finishes_at in the addWhere
 statement. I don't know if this is the expected behavior of Doctrine. If so,
 how could I write an equivalent query?

 --
 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.comsymfony-users%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/symfony-users?hl=en




-- 
With the best regards, Andrei.

-- 
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] Escape %2f in URL solution

2010-03-10 Thread Javier Sanchez
Hi all

This is my problem.

When i want to route with a parametrer slash / like :var =
subprojectslug/pageslug symfony encoded slash to %2f and give a 404
error because apache desactivate the AllowEncodedSlashes for security

I activate AllowEncodedSlashes On

But i can't match url in a redirect and the URL is too ugly.

Solution with AllowEncodedSlashes Off , go to core: sfRouting.class

protected function fixGeneratedUrl($url, $absolute = false)
{
...
$url = str_ireplace('%2F', '/', $url);

return $url;
}

This works... but, is a good solution? there are a better solution? is
a dangerous fix and can affect to my project in other side?

Thx
Javier Sanchez Lopez

-- 
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] yml validators in Symfony 1.4

2010-03-10 Thread SlimShaggy
Hi folks,

I'm trying to upgrade a project from 1.2 to 1.4
I've read that the validate/action.yml files are no longer supported.
What is the alternative, then ?

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


Re: [symfony-users] (Doctrine) as keyword doesn't work as expected. Can't figure out a query :(

2010-03-10 Thread Jim Krehl

On 03/10/2010 01:10 PM, miguelSantirso wrote:

Hi, I have a starts_at field that keeps the date in which certain
event starts or has started (in UNIX seconds). Also, I have a
minutes_long field. I need to filter all the objects that are already
finished and I tried adding the following to my original query:

$q-addSelect('c.starts_at + c.minutes_long*60 AS finishes_at');
$q-addWhere(finishes_at= ?, time());

However, Doctrine doesn't seem to recognise finishes_at in the
addWhere statement. I don't know if this is the expected behavior of
Doctrine. If so, how could I write an equivalent query?
   


Is MySQL your db?  I don't believe MySQL supports using column aliases 
in a where clause [1].  Try changing $q-addWhere to $q-addHaving ?


jimmyk

[1] A /|select_expr|/ can be given an alias using |AS /|alias_name|/|. 
The alias is used as the expression's column name and can be used in 
|GROUP BY|, |ORDER BY|, or |HAVING| clauses. - from 
http://dev.mysql.com/doc/refman/5.0/en/select.html


--
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] yml validators in Symfony 1.4

2010-03-10 Thread Gábor Fási
The form framework.

On Tue, Mar 9, 2010 at 14:01, SlimShaggy filthy.m...@gmail.com wrote:
 Hi folks,

 I'm trying to upgrade a project from 1.2 to 1.4
 I've read that the validate/action.yml files are no longer supported.
 What is the alternative, then ?

 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


-- 
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] Need Insight On Backend Forms VS Frontend Forms

2010-03-10 Thread Darren884
For you seasoned Symfony users, I need some insight. I have been
having a dilemma that I need advice on. I  my backend I have a
customer form that handles the managing of customers throughout the
site. It contains fields that only the backend should display such as
IP, last login, etc...

My dilemma is how can I use the same form class in my frontend without
using the validators set in there or even displaying them?

Another problem is the password. Basically I want to allow the
customer to update their own information in my frontend, however when
they leave the password blank I want it to remain the same as before.
I have a validator on the password field now so its giving me a
headache.

Any insight is greatly appreciated.

Also I am using Doctrine and 1.4.

Thanks,
Darren

-- 
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: (Doctrine) as keyword doesn't work as expected. Can't figure out a query :(

2010-03-10 Thread miguelSantirso
I changed the addWhere to addHaving:

$q-addSelect('c.starts_at + c.minutes_long*60 AS
finishes_at');
$q-addHaving(finishes_at = ?, time());

And It doesn't work yet. I get the following error:

SQLSTATE[HY000]: General error: 1 no such column: c__0

I am using sqllite, could that be the problem?

On Mar 10, 7:21 pm, Jim Krehl jim...@harmonixmusic.com wrote:
 On 03/10/2010 01:10 PM, miguelSantirso wrote:

  Hi, I have a starts_at field that keeps the date in which certain
  event starts or has started (in UNIX seconds). Also, I have a
  minutes_long field. I need to filter all the objects that are already
  finished and I tried adding the following to my original query:

  $q-addSelect('c.starts_at + c.minutes_long*60 AS finishes_at');
  $q-addWhere(finishes_at= ?, time());

  However, Doctrine doesn't seem to recognise finishes_at in the
  addWhere statement. I don't know if this is the expected behavior of
  Doctrine. If so, how could I write an equivalent query?

 Is MySQL your db?  I don't believe MySQL supports using column aliases
 in a where clause [1].  Try changing $q-addWhere to $q-addHaving ?

 jimmyk

 [1] A /|select_expr|/ can be given an alias using |AS /|alias_name|/|.
 The alias is used as the expression's column name and can be used in
 |GROUP BY|, |ORDER BY|, or |HAVING| clauses. - 
 fromhttp://dev.mysql.com/doc/refman/5.0/en/select.html

-- 
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] Need Insight On Backend Forms VS Frontend Forms

2010-03-10 Thread Daniel Lohse
Just subclass your backendForm to frontendForm and use the new useFields method 
to a few unwanted widgets and their validators. As for the password field: I 
think I added a updatePasswordColumn($value) method to my form class and when 
it was blank ($value === '') I returned false in this method. That way a blank 
password does not override the old one. For this to work you'll need to make 
both your password and your password_again optional so it doesn't give a 
'Required.' error. Does this make sense?

In case you're wondering, what these update%columnName%Column method is: you 
can add those to your form class and they get called when a value is changed in 
the form widget so you can reformat etc. But returning false in such a method 
removes the value from the cleaned values and isn't included in the update to 
the database. I don't know if that's documented somewhere but it should be in 
the What's new? documents.


Cheers, Daniel

On 10.03.2010, at 19:31, Darren884 wrote:

 For you seasoned Symfony users, I need some insight. I have been
 having a dilemma that I need advice on. I  my backend I have a
 customer form that handles the managing of customers throughout the
 site. It contains fields that only the backend should display such as
 IP, last login, etc...
 
 My dilemma is how can I use the same form class in my frontend without
 using the validators set in there or even displaying them?
 
 Another problem is the password. Basically I want to allow the
 customer to update their own information in my frontend, however when
 they leave the password blank I want it to remain the same as before.
 I have a validator on the password field now so its giving me a
 headache.
 
 Any insight is greatly appreciated.
 
 Also I am using Doctrine and 1.4.
 
 Thanks,
 Darren
 
 -- 
 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: Need Insight On Backend Forms VS Frontend Forms

2010-03-10 Thread Darren884
Thank you so much Daniel for the awesome response. I understand
clearly now.

On Mar 10, 11:08 am, Daniel Lohse annismcken...@googlemail.com
wrote:
 Just subclass your backendForm to frontendForm and use the new useFields 
 method to a few unwanted widgets and their validators. As for the password 
 field: I think I added a updatePasswordColumn($value) method to my form class 
 and when it was blank ($value === '') I returned false in this method. That 
 way a blank password does not override the old one. For this to work you'll 
 need to make both your password and your password_again optional so it 
 doesn't give a 'Required.' error. Does this make sense?

 In case you're wondering, what these update%columnName%Column method is: you 
 can add those to your form class and they get called when a value is changed 
 in the form widget so you can reformat etc. But returning false in such a 
 method removes the value from the cleaned values and isn't included in the 
 update to the database. I don't know if that's documented somewhere but it 
 should be in the What's new? documents.

 Cheers, Daniel

 On 10.03.2010, at 19:31, Darren884 wrote:

  For you seasoned Symfony users, I need some insight. I have been
  having a dilemma that I need advice on. I  my backend I have a
  customer form that handles the managing of customers throughout the
  site. It contains fields that only the backend should display such as
  IP, last login, etc...

  My dilemma is how can I use the same form class in my frontend without
  using the validators set in there or even displaying them?

  Another problem is the password. Basically I want to allow the
  customer to update their own information in my frontend, however when
  they leave the password blank I want it to remain the same as before.
  I have a validator on the password field now so its giving me a
  headache.

  Any insight is greatly appreciated.

  Also I am using Doctrine and 1.4.

  Thanks,
  Darren

  --
  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: Escape %2f in URL solution

2010-03-10 Thread Richtermeister
Hey Javier,

I've come across this solution (simple string replace) a couple of
times, and it works well for me so far, so I guess it's ok.

Daniel


On Mar 10, 10:03 am, Javier Sanchez javija...@gmail.com wrote:
 Hi all

 This is my problem.

 When i want to route with a parametrer slash / like :var =
 subprojectslug/pageslug symfony encoded slash to %2f and give a 404
 error because apache desactivate the AllowEncodedSlashes for security

 I activate AllowEncodedSlashes On

 But i can't match url in a redirect and the URL is too ugly.

 Solution with AllowEncodedSlashes Off , go to core: sfRouting.class

 protected function fixGeneratedUrl($url, $absolute = false)
 {
 ...
 $url = str_ireplace('%2F', '/', $url);

     return $url;

 }

 This works... but, is a good solution? there are a better solution? is
 a dangerous fix and can affect to my project in other side?

 Thx
 Javier Sanchez Lopez

-- 
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: Error 500 when i try to login the web app in production

2010-03-10 Thread Javier Garcia

More news:

when i get that 500 error this line below is written also in web/error_log:

[10-Mar-2010 14:37:57] PDO Connection Error: SQLSTATE[HY000] [2002] 
Can't connect to local MySQL server through socket 
'/opt/lampp/var/mysql/mysql.sock' (2)


Even if i have written this in databases.yml:

dev:

test:

all:
  doctrine:
class: sfDoctrineDatabase
param:
  dsn: mysql:host=localhost;dbname=tirengar_rs
  username: tirengar
  password: mypassword

Any idea?

Gabor, i commented the line with Options but the error is the same.

Javi



On 03/10/2010 04:31 PM, Gábor Fási wrote:

Then try what I said, and comment the Options.. line in your
.htaccess. I've seen that line cause troubles.

On Wed, Mar 10, 2010 at 13:34, Javier Garciatirengar...@gmail.com  wrote:
   

On 03/10/2010 10:07 AM, Eno wrote:
 

You need to ask whoever is hosting the application to add the config
directives to your vhost configuration

   

Do you mean modify httpd.conf? I can not modify httpd.conf, not even if i
ask to modify it.

On 03/10/2010 10:07 AM, Eno wrote:
 

You need to ask whoever is hosting the application to add the config
directives to your vhost configuration (or switch on .htaccess for your
vhost).

   

 From my hosting provider told me i have enable .htaccess (mod_rewrite).

Javi

--
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] symfony 1.3.3 doctrine inheritance custom primary key and formfilters

2010-03-10 Thread lxtechie
Hi

If been trying to use doctrine's inheritance feature . I add my own
primary key in the child table (in this case my_id) but if I try and
use a filter in the backend I get the following error :
SQLSTATE[HY093]: Invalid parameter number: parameter was not defined

my schema.yml file:

SysRoot:
  columns:
   reason:
 type: string(255)

Article:
  inheritance:
type: concrete
extends:   SysRoot
  columns:
my_id:
  type: integer(8)
  primary: true
  autoincrement: true
author_id: integer
title:
  type: string(255)
  notnull: true


I think the formfiltergenerator is not using the correct primary key
since the parent table has a auto generated pk (id) . Am I doing
something wrong or is there perhaps a workaround?

Thanx
Best Regards
lxtechie

-- 
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: Symfony 2 + Doctrine 2 : what about behaviours ?

2010-03-10 Thread theredled
@Raphael
I'm talking about Doctrine's behaviors :
http://www.doctrine-project.org/documentation/manual/1_2/en/behaviors

@rooster:
Okay, I'll wait and see what Doctrine extensions and Sf bundles will
bring :D
Nothing in Sf 2's core I guess...

On 9 mar, 22:38, rooster (Russ) russmon...@gmail.com wrote:
 Hi,

 Despite the fact there won't be behaviours as such, there will almost
 certainly be Doctrine extensions which emulate what you would expect
 from behaviours, and I think for those symfony-specific cases there
 will be Bundles for sure.

 We have already implemented a changelog behaviour in Doctrine 2,
 however it's not stable to release yet since the Doctrine codebase
 keeps changing :)

 On Mar 8, 3:35 pm, theredled benoit.guc...@gmail.com wrote:



  Hi,

  Behaviours feature will be removed from Doctrine 2. As they are part
  of the domain classes, now separated from the ORM itself, they are no
  more part of Doctrine's job. That's a good reason.

  But this feature was really useful to enhance reusability. So if it is
  not part of the job of an ORM, I came to think it can be for sure part
  of the job of a complete framework :D

  Will Symfony provide an alternative to behaviours ?

  Thanks

  Benoit G.

-- 
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] Memory usage...

2010-03-10 Thread Bruno Reis
Hi all... how much memory a normal sf + doctrine thread uses?

We are having serious problems here with an application. I seems like it´s
leaking memory, we updated php to 5.3 but had no success at all. Apache
threads start with 16 MB and soon get to 50MB.

Does anyone know what might be happening?

-- 
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: Memory usage...

2010-03-10 Thread aalexand
The memory footprint depends on the application goals and size really,
but if you're trying to create something simple the chances are you've
got a problem in the materialisation of queried database objects in
the doctrine layer or in your action logic.

Can you be more specific about your set-up / application
functionality?

Cheers,
Alex

On Mar 11, 1:37 am, Bruno Reis bruno.p.r...@gmail.com wrote:
 Hi all... how much memory a normal sf + doctrine thread uses?

 We are having serious problems here with an application. I seems like it´s
 leaking memory, we updated php to 5.3 but had no success at all. Apache
 threads start with 16 MB and soon get to 50MB.

 Does anyone know what might be happening?

-- 
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] Jobeet Tutorial

2010-03-10 Thread DEEPAK BHATIA
Hi,

I have created the jobeet tutorial but following command is failing

php symfony propel:generate-module --with-show --non-verbose-templates
frontend job JobeetJob

Error Message:-

[?php use_stylesheets_for_form($form) ?]
[?php use_javascripts_for_form($form) ?]


Fatal error: Class 'JobeetJobForm' not found in
/home/sfprojects/jobeet/lib/vendor/symfony/lib/generator/sfModelGenerator.class.php
on line 331

Best Regards

Deepak Bhatia

-- 
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] propel:data-load gets a cli error

2010-03-10 Thread manguito
After entering the propel:data-load task, using the command line
interface or neatbeans I get a CLI error
error signature  ModName: php_pdo_mysql.dll
I use PHP 5.2.10 (manually installed), Apache 2.2.13 and Mysql 5.1
Anybody willing to help me?
manguito

-- 
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: Jobeet Tutorial

2010-03-10 Thread Parijatha Kumar
Hi,

Before you build the modules, you have to build the form classes
first. That means before you issue your propel:generate-module
command, you should issue propel:build-form command. That works for me
with doctrine also. Thank you.

-- Parijatha Kumar

On Mar 11, 10:59 am, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 Hi,

 I have created the jobeet tutorial but following command is failing

 php symfony propel:generate-module --with-show --non-verbose-templates
 frontend job JobeetJob

 Error Message:-

 [?php use_stylesheets_for_form($form) ?]
 [?php use_javascripts_for_form($form) ?]

 Fatal error: Class 'JobeetJobForm' not found in
 /home/sfprojects/jobeet/lib/vendor/symfony/lib/generator/sfModelGenerator.c 
 lass.php
 on line 331

 Best Regards

 Deepak Bhatia

-- 
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] Help required for generating custom templates (Symfony 1.4.3 with Doctrine)

2010-03-10 Thread Parijatha Kumar
Hi,

I am a new comer to Symfony world. I am building a web application for
our organisation with Symfony 1.4.3+Doctrine. I came across a problem.
The default templates generated from Symfony CLI display the 'ID'
column as a link to showSuccess template by default. But i don't want
that. Instead I have manually modified some of my templates to include
one more column called 'Actions' which displays 'View' and 'Edit' as
links to showSuccess and editSuccess templates respectively. Moreover
I have removed the 'ID' column completely from the templates and
instead added a general 'Serial Number' column without any link. I
feel this would be more user friendly than the usual template.
Now how can I generate the templates automatically, by default, with
my customisations from the Symfony CLI ? Do I have to modify any
source files or do I have to include any configuration files ? I can't
modify all my templates manually one by one, it will consume a lot of
time. Please help.

-- Parijatha Kumar

-- 
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: Jobeet Tutorial

2010-03-10 Thread DEEPAK BHATIA
Thanks, it is working now :-)

On Thu, Mar 11, 2010 at 12:18 PM, Parijatha Kumar
parijathaku...@gmail.comwrote:

 Hi,

 Before you build the modules, you have to build the form classes
 first. That means before you issue your propel:generate-module
 command, you should issue propel:build-form command. That works for me
 with doctrine also. Thank you.

 -- Parijatha Kumar

 On Mar 11, 10:59 am, DEEPAK BHATIA toreachdee...@gmail.com wrote:
  Hi,
 
  I have created the jobeet tutorial but following command is failing
 
  php symfony propel:generate-module --with-show --non-verbose-templates
  frontend job JobeetJob
 
  Error Message:-
 
  [?php use_stylesheets_for_form($form) ?]
  [?php use_javascripts_for_form($form) ?]
 
  Fatal error: Class 'JobeetJobForm' not found in
 
 /home/sfprojects/jobeet/lib/vendor/symfony/lib/generator/sfModelGenerator.c
 lass.php
  on line 331
 
  Best Regards
 
  Deepak Bhatia

  --
 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.comsymfony-users%2bunsubscr...@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: Web Server Configuration

2010-03-10 Thread deresh
try changing your host file line adressing jobeet from

10.0.1.66 www.jobeet.com.localhost

to

127.0.0.1 www.jobeet.com.localhost

becouse you have set your virtual host on apache to listen to local
( 127.0.0.1) IP not the external interface one ( 10.0.1.66)

when you fix that part you should have access to your app with url:

http://www.jobeet.com:8080/

becouse your local apache listens on port 8080 not the default port 80




On 10 ožu, 15:23, DEEPAK BHATIA toreachdee...@gmail.com wrote:
 *** Please check ***



  My hosts file is (/etc/hosts)

  # Do not remove the following line, or various programs
  # that require network functionality will fail.
  127.0.0.1   nechclst.in
  127.0.0.1   localhost.localdomain   localhost
  127.0.0.1   deepaknew.nechclst.in   deepaknew
  ::1 localhost6.localdomain6 localhost6
  127.0.0.1 test # added by Apache Friends XAMPP
  10.0.1.66www.jobeet.com.localhost

  My Virtual host settings are

  VirtualHost 127.0.0.1:8080
  ServerNamewww.jobeet.com.localhost
  DocumentRoot /home/sfprojects/jobeet/web
  DirectoryIndex index.php
  Directory /home/sfprojects/jobeet/web
  AllowOverride All
  Allow from All
  /Directory
  Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
  AllowOverride All
  Allow from All
  /Directory
  /VirtualHost
  When I ping from other machine - pingwww.jobeet.com.localhost, it
  doesn't work.

    On Mon, Mar 8, 2010 at 4:19 PM, Jerzy Biernacki 
  jerzy.bierna...@gmail.com wrote:

  Hi all,

  your project's hostname:www.jobeet.com.localhost
  your project's server IP name: 127.0.0.1 (local interface) AND (example)
  *192.168.1.1* (external interface)

  For every machine from your LAN accessing this project add to /etc/hosts
  (C:\windows\system32\drivers\etc\hosts AFAIR):

  192.168.1.1www.jobeet.com*.localhost*

  What you described seams to me like wrongly configured IP-HOST mapping.
  When you are accessing the project from your LAN you are using correct IP,
  but *WRONG HOST* - apache (or whatever it is) is serving you default page
  (/var/www/index.html or whatever is set to be default). Just change the 
  HOST
  and it should work :)

  Cheers,
  JMB

  2010/3/8 DEEPAK BHATIA toreachdee...@gmail.com

  What should be the virtual host?

  On Mon, Mar 8, 2010 at 1:06 PM, Buddhika Perera budd...@gmail.com
  wrote:
   Check with virtual host i used netbeans 6.8 for the coding its
   more easy than ever check out
   from the site ...there was a tutorial on how to use Symfony  with the
  Editor

   On Mon, Mar 8, 2010 at 12:23 PM, DEEPAK BHATIA 
  toreachdee...@gmail.com wrote:
   Hi,

   I am using Symfony 1.4.

   In the section of configuration of Web Server in Jobeet Tutorial as
  given below

   When I accesshttp://www.jobeet.com/on some other machine on LAN, I
   get some output like
   Index of cgi-bin

   When I accesshttp://www.jobeet.com.locahost/index.phpon the local
   machine, I get symfony project successfully installed.

   QUESTION: How can I access my project ashttp://www.jobeet.com?
  Which
   index.htm I need to modify/create ?

   ===Web Server Configuration==

   # Be sure to only have this line once in your configuration

   NameVirtualHost 127.0.0.1:8080

   # This is the configuration for your project

   Listen 127.0.0.1:8080

   VirtualHost 127.0.0.1:8080
   DocumentRoot /home/sfprojects/jobeet/web
   DirectoryIndex index.php
   Directory /home/sfprojects/jobeet/web
   AllowOverride All
   Allow from All
   /Directory
   Alias /sf /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
   Directory /home/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
   AllowOverride All
   Allow from All
   /Directory
   /VirtualHost

   Added to the httpd.conf

   # This is the configuration for your project
   VirtualHost 127.0.0.1:80 http://127.0.0.1/
   ServerNamewww.jobeet.com.localhost
   !-- same configuration as before --
   /VirtualHost

   Added to the hosts file
   127.0.0.1www.jobeet.com.localhost

   --
   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.comsymfony-users%2bunsubscr...@goog­legroups.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