[symfony-users] Re: Problem with doctrine:build-schema

2010-11-27 Thread lawrence


I have been struggling with this same issue. I have written this up on
Symfony Experts. I am offering a $20 prize for a solution:

http://www.symfonyexperts.com/question/show/id/156

Any help is greatly appreciated. I have been stuck on this for hours.



On Nov 16, 6:45 am, Pratik Mazumder pmazumder2...@gmail.com wrote:
 No Alex, I don't have tabs. These are white spaces only !!!

 On Tue, Nov 16, 2010 at 5:11 PM, Dominik Tuleweit symf...@tuleweit.comwrote:







  You have tabs for idention, take whitespaces instead:

  all:
    doctrine:
      class: sfDoctrineDatabase
      param:
        dsn: 'mysql:host=localhost;dbname=CHCISDB'
        username: root
        password: null

  Am 16.11.2010 um 12:37 schrieb Pratik Mazumder:

  Hi Alexander

  Changed the indentions but still doesn't work :(

  Pratik

  On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé 
  alexandre.sal...@gmail.com wrote:

  It's about indentation :

  all:
     doctrine:
       class: sfDoctrineDatabase
       param:
         dsn: 'mysql:host=localhost;dbname=CHCISDB'
         username: root
         password: null

  2010/11/16 Pratik pmazumder2...@gmail.com

   Hi

  I am new to symfony. I have a database created in mysql. While trying
  to build the schema.yml by running php symfony doctrine:build-schema I
  get the following error:

  doctrine generating yaml schema from database

   Missing class name.

  The content of the databases.yml is:

  all:
     doctrine:
     class: sfDoctrineDatabase
     param:
       dsn: 'mysql:host=localhost;dbname=CHCISDB'
       username: root
       password: null

  Can anybody please help?

  Thanks

  Pratik

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

  --
  Alexandre Salomé
 http://alexandre-salome.fr

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


[symfony-users] Re: Problem with doctrine:build-schema

2010-11-27 Thread lawrence

Any progress with this? I am desperate for an answer.


On Nov 16, 6:45 am, Pratik Mazumder pmazumder2...@gmail.com wrote:
 No Alex, I don't have tabs. These are white spaces only !!!

 On Tue, Nov 16, 2010 at 5:11 PM, Dominik Tuleweit symf...@tuleweit.comwrote:







  You have tabs for idention, take whitespaces instead:

  all:
    doctrine:
      class: sfDoctrineDatabase
      param:
        dsn: 'mysql:host=localhost;dbname=CHCISDB'
        username: root
        password: null

  Am 16.11.2010 um 12:37 schrieb Pratik Mazumder:

  Hi Alexander

  Changed the indentions but still doesn't work :(

  Pratik

  On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé 
  alexandre.sal...@gmail.com wrote:

  It's about indentation :

  all:
     doctrine:
       class: sfDoctrineDatabase
       param:
         dsn: 'mysql:host=localhost;dbname=CHCISDB'
         username: root
         password: null

  2010/11/16 Pratik pmazumder2...@gmail.com

   Hi

  I am new to symfony. I have a database created in mysql. While trying
  to build the schema.yml by running php symfony doctrine:build-schema I
  get the following error:

  doctrine generating yaml schema from database

   Missing class name.

  The content of the databases.yml is:

  all:
     doctrine:
     class: sfDoctrineDatabase
     param:
       dsn: 'mysql:host=localhost;dbname=CHCISDB'
       username: root
       password: null

  Can anybody please help?

  Thanks

  Pratik

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

  --
  Alexandre Salomé
 http://alexandre-salome.fr

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


[symfony-users] Re: Problem with doctrine:build-schema

2010-11-27 Thread lawrence

Are there any other scripts I might be able to use to generate the
schema?  doctrine:build-schema does not work


On Nov 16, 6:45 am, Pratik Mazumder pmazumder2...@gmail.com wrote:
 No Alex, I don't have tabs. These are white spaces only !!!

 On Tue, Nov 16, 2010 at 5:11 PM, Dominik Tuleweit symf...@tuleweit.comwrote:







  You have tabs for idention, take whitespaces instead:

  all:
    doctrine:
      class: sfDoctrineDatabase
      param:
        dsn: 'mysql:host=localhost;dbname=CHCISDB'
        username: root
        password: null

  Am 16.11.2010 um 12:37 schrieb Pratik Mazumder:

  Hi Alexander

  Changed the indentions but still doesn't work :(

  Pratik

  On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé 
  alexandre.sal...@gmail.com wrote:

  It's about indentation :

  all:
     doctrine:
       class: sfDoctrineDatabase
       param:
         dsn: 'mysql:host=localhost;dbname=CHCISDB'
         username: root
         password: null

  2010/11/16 Pratik pmazumder2...@gmail.com

   Hi

  I am new to symfony. I have a database created in mysql. While trying
  to build the schema.yml by running php symfony doctrine:build-schema I
  get the following error:

  doctrine generating yaml schema from database

   Missing class name.

  The content of the databases.yml is:

  all:
     doctrine:
     class: sfDoctrineDatabase
     param:
       dsn: 'mysql:host=localhost;dbname=CHCISDB'
       username: root
       password: null

  Can anybody please help?

  Thanks

  Pratik

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

  --
  Alexandre Salomé
 http://alexandre-salome.fr

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


[symfony-users] database configuration question

2010-04-09 Thread lawrence
There is a $60 award for a question about database configuration on
Symfony Experts:

http://www.symfonyexperts.com/question/show/id/36

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

To unsubscribe, reply using remove me as the subject.


[symfony-users] Re: if anyone would like to sign up on our site, we could use some Symfony experts

2010-02-28 Thread lawrence


On Feb 23, 3:59 am, Eno symb...@gmail.com wrote:
 I dont suppose anyone knows of a similar site forAndroidquestions? :-)



We will be launching an Android site at the end of March.

-- 
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: How to get user object on libs to not get the erro The default context does not exist.

2010-02-22 Thread lawrence


On Feb 19, 12:08 pm, Nei Rauni Santos nra...@gmail.com wrote:
 It worked for me, do you think it's a good solution?

 ?php

 class tools
 {

   /*
    * This code is used to allow get the user object on sf 1.3
    * I usually used to $sf_user = sfContext::getInstance()-getUser();
    * but it throw exception with the message: The default context does not
 exist.
    * on enviroment test
    * */
   public static function getUser(){

     $configuration =
 sfApplicationConfiguration::getApplicationConfiguration(
 sfConfig::get('sf_app') );
     $context = sfContext::createInstance($configuration);
     return $context-getUser();

   }

 now, at my libs i use tools:getUser()



Do you need to call the user? Do you need data from the user object?
If not, you can use a mock object. If you do, then, your unit test is
really a functional test, not a unit test. You might as well be
running in the test in the context of the whole site.

-- 
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 at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] if anyone would like to sign up on our site, we could use some Symfony experts

2010-02-20 Thread lawrence

Hey, everyone, we are looking for some Symfony programmers to answer
questions on our new Symfony site. Darren Hoyt and I are often asked
for help with small programming or design tasks, simple problems that
require maybe 5 minutes of our time. We find it isn't always easy to
charge for the small stuff. Since we do a lot of work with WordPress,
we recently built WP Questions, a place where WordPress experts can
earn some money by answering people's emergency questions about
WordPress:

http://www.wpquestions.com/

There are a lot of free forums on the web, and tons of information
about WordPress. We don't think WP Questions competes with the free
WordPress forums, so much as it supplements them. WP Questions is for
emergencies. When someone has the luxury of time, they can use the
free forums.

Today we are launching Symfony Experts, which is the same kind of
site, but aimed at Symfony:

http://www.symfonyexperts.com/

As I said above about WordPress, this site is not meant to replace the
free forums and mailist lists. Symfony Experts is a supplemental site
- a place a programmer can turn when they've got an urgent problem.

We have a bit of a chicken-and-egg problem when launching these sites,
since the experts aren't interested till their are customers and the
cusomters aren't interested till their are experts. Still, our
preference is to get some experts signed up first, before we start
marketing this thing heavily to all programmers working with Symfony.
Please consider signing up now. Once we have about 10 good Symfony
programmers signed up, we'll begin marketing the site. It is free to
sign up.

The people asking the questions put up prize money for whoever answers
them. You can look at WP Questions to see the kinds of money people
has so far offered. Darren Hoyt and I are charging 9% plus 50 cents on
top of the prize money offered (so a customer who offers a prize of
$20 pays $22.30). PayPal takes roughly 5% of our money, so we are left
with roughly 4% of the prize as our profit. We'd like to split that
money with anyone who can help bring traffic to the site. Toward that
end, we have a variety of affilate programs:

http://www.symfonyexperts.com/page/static/name/Affiliates

More details are here:

http://blog.symfonyexperts.com/?p=4

For our customers who are paying to ask questions, this tutorial
explains how to ask a question:

http://www.symfonyexperts.com/page/static/name/HowToAskAQuestion

For our customers who are paying to ask questions, this tutorial
explains how to assign prize money to an expert who has answered your
question:

http://www.symfonyexperts.com/page/static/name/HowToAssignPrizeMoney

By the way, next month we will be launching similar sites for MySql
and Javascript. And in a bit of what the engineers at Microsoft would
call eat your own dog food I'll be posting a bunch of questions on
Symfony Experts, to get advice about how to build out our network of
sites.

We built our site using Symfony, for reasons I described here:

http://symfonynerds.com/blog/?p=323























-- 
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 at 
http://groups.google.com/group/symfony-users?hl=en.



[symfony-users] Re: Free opensource Symfony-friendly PHP IDE: NetBeans 6.8

2010-01-06 Thread lawrence


 NetBeans 6.8 has built-in Symfony support. I have composed small blog-
 post about setting up symfony project in NetBeans:

 http://www.fractalizer.ru/frpost_393/free-opensource-symfony-friendly...

 I consider now NetBeans as a replacement for Zend Studio ;)


Yes, people should consider this, especially if you do programming in
other languages besides PHP. For years I preferred simple text editors
like Kwrite and Kate for programming. But this last year I became a
fan of NetBeans.
-- 
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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: Accessing arrays from templates turns them into sfOutputEscaperArrayDecorator objects?

2010-01-06 Thread lawrence


On Jan 4, 11:58 pm, Eno symb...@gmail.com wrote:

  actions.class.php:
  $this-content_tabs = array('key1' = 'value1', 'key2' = 'value2');

 Maybe something like this?

 $this-content_tabs[] = new array('key1' = 'value1', 'key2' = 'value2');


This is PHP. Why new array?
-- 
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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] created_at is intermittently blank

2010-01-05 Thread lawrence

I've a problem with the created_at  field defined in my schema.yml  on
this site:

http://www.wpquestions.com/

I've this table:

  sf_guard_user_profile:
_attributes: { phpName: sfGuardUserProfile }
id:   ~
user_id:  { type: integer, foreignTable: sf_guard_user,
foreignReference: id, required: true }
status:   { type: varchar(255), required: false }
first_name:   { type: varchar(255), required: false }
last_name:{ type: varchar(255), required: false }
email:{ type: varchar(255), required: false }
url:  { type: varchar(255), required: false }
description:{ type: longvarchar, required: false }
created_at:   ~
updated_at:~
cash_total:   { type: float, required: false }
image:{ type: VARCHAR, size:255 }
secret_signup_key: { type: VARCHAR, size:255 }
twitter_address:  { type: VARCHAR, size:255 }
landing_page:  { type: VARCHAR, size:255 }


The registration form is here:

http://www.wpquestions.com/user/register

When I look in the database, I see that about 60% of the users have
blank values for the created_at field. The other 40% have the value
filled in automatically, as one might expect.

Why would this field be intermittently blank?

-- 
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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] is anyone else having trouble with url_for()?

2010-01-04 Thread lawrence

We are having a serious problem with url_for() on our site. Sometimes
it does not correctly render the HTML. I saw it myself, but only in
Google Chrome. But then our customers began reporting it in FireFox:

--

I noticed it happening a few times in various locations, on the top
experts “+” bit and under the sponsor . When I’ve just looked the
following has appeared on the front page:

?
ui=2view=attth=1257035cb4bc9c21attid=0.1disp=attdrealattid=ii_1257035cb4bc9c21zw

I’ve attached the ‘view source’ of that page. I haven’t been
through it but thought it may help you track the error down.

--

This is a very intermittent problem - if you hit refresh it will
disappear.

I believe the problem is also true of all the form rendering widgets.
A customer just tried to pay, via the form that sends them to PayPal,
and they ran into this error:

We cannot process this transaction because there is a problem with
the PayPal email address supplied by the seller. Please contact the
seller to resolve the problem. If this payment is for an eBay listing,
you can contact the seller via the Ask Seller a Question link on the
listing page. When you have the correct email address, payment can be
made at www.paypal.com.

I exchanged email with the customer and they re-described the same
problem that other customers have complained of.

As I say, the problem is very intermittent. A true heisenbug. If you
look at the site, you probably won't see anything wrong:

http://www.wpquestions.com/

But enough customers have complained that this has become a serious
problem for us.

Not sure what to do. I plan to tear out every use of url_for() and
simply hardcode the URLs, but I can't get rid of the form widgets. At
the very least, I need to populate forms with whatever values are
appropriate to the circumstances.


Is anyone else having this problem?

--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: is anyone else having trouble with url_for()?

2010-01-04 Thread lawrence


 Could be the dot in URL 
 issue?http://bluehorn.co.nz/2008/12/04/how-to-handle-dot-in-symfony-url/



No dots in any urls. And I think I'm having the same problem with the
form rendering widgets.

In fact, I think we are having a problem with every Symfony command
that renders HTML.

As I said before, the problem is intermittent. But it just stopped a
customer from completing a sale, so I regard the problem as serious.


--- lawrence













 On Tue, Jan 5, 2010 at 8:44 AM, lawrence lawrence.krub...@gmail.com wrote:

  We are having a serious problem with url_for() on our site. Sometimes
  it does not correctly render the HTML. I saw it myself, but only in
  Google Chrome. But then our customers began reporting it in FireFox:

  --

  I noticed it happening a few times in various locations, on the top
  experts “+” bit and under the sponsor . When I’ve just looked the
  following has appeared on the front page:

     ?
  ui=2view=attth=1257035cb4bc9c21attid=0.1disp=attdrealattid=ii_1257035cb4bc9c21zw

     I’ve attached the ‘view source’ of that page. I haven’t been
  through it but thought it may help you track the error down.

  --

  This is a very intermittent problem - if you hit refresh it will
  disappear.

  I believe the problem is also true of all the form rendering widgets.
  A customer just tried to pay, via the form that sends them to PayPal,
  and they ran into this error:

  We cannot process this transaction because there is a problem with
  the PayPal email address supplied by the seller. Please contact the
  seller to resolve the problem. If this payment is for an eBay listing,
  you can contact the seller via the Ask Seller a Question link on the
  listing page. When you have the correct email address, payment can be
  made atwww.paypal.com.

  I exchanged email with the customer and they re-described the same
  problem that other customers have complained of.

  As I say, the problem is very intermittent. A true heisenbug. If you
  look at the site, you probably won't see anything wrong:

 http://www.wpquestions.com/

  But enough customers have complained that this has become a serious
  problem for us.

  Not sure what to do. I plan to tear out every use of url_for() and
  simply hardcode the URLs, but I can't get rid of the form widgets. At
  the very least, I need to populate forms with whatever values are
  appropriate to the circumstances.

  Is anyone else having this problem?

  --

  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.

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: is anyone else having trouble with url_for()?

2010-01-04 Thread lawrence


On Jan 4, 3:04 pm, Sheraz Sharif sharif.she...@gmail.com wrote:
 I don't think your view source attachment made it into the list. Can yo try
 to repost here or link to it?

 Also in your original message you post this:

    ?
 ui=2view=attth=
 1257035cb4bc9c21attid=0.1disp=attdrealattid=ii_1257035cb4bc9c21zw

 is that a url generated in your backend that goes into the url_for helper?


Sorry, it is what the customer sent to us. You look here and scroll
down to Tom de Bruin sent us a detailed bug report:

http://blog.wpquestions.com/2009/12/09/some-responses-to-your-questions-and-feedback/


Basically, an HTML element will fail to render correctly, and some of
the HTML will appear on screen. It is almost as if the closing  is
forgotten. But if you hit refresh, or View Source then the problem
is vanishes.

--- lawrence










 On Mon, Jan 4, 2010 at 2:54 PM, lawrence lawrence.krub...@gmail.com wrote:

   Could be the dot in URL issue?
 http://bluehorn.co.nz/2008/12/04/how-to-handle-dot-in-symfony-url/

  No dots in any urls. And I think I'm having the same problem with the
  form rendering widgets.

  In fact, I think we are having a problem with every Symfony command
  that renders HTML.

  As I said before, the problem is intermittent. But it just stopped a
  customer from completing a sale, so I regard the problem as serious.

  --- lawrence

   On Tue, Jan 5, 2010 at 8:44 AM, lawrence lawrence.krub...@gmail.com
  wrote:

We are having a serious problem with url_for() on our site. Sometimes
it does not correctly render the HTML. I saw it myself, but only in
Google Chrome. But then our customers began reporting it in FireFox:

--

I noticed it happening a few times in various locations, on the top
experts “+” bit and under the sponsor . When I’ve just looked the
following has appeared on the front page:

   ?

  ui=2view=attth=1257035cb4bc9c21attid=0.1disp=attdrealattid=ii_1257035cb4bc9c21zw

   I’ve attached the ‘view source’ of that page. I haven’t been
through it but thought it may help you track the error down.

--

This is a very intermittent problem - if you hit refresh it will
disappear.

I believe the problem is also true of all the form rendering widgets.
A customer just tried to pay, via the form that sends them to PayPal,
and they ran into this error:

We cannot process this transaction because there is a problem with
the PayPal email address supplied by the seller. Please contact the
seller to resolve the problem. If this payment is for an eBay listing,
you can contact the seller via the Ask Seller a Question link on the
listing page. When you have the correct email address, payment can be
made atwww.paypal.com.

I exchanged email with the customer and they re-described the same
problem that other customers have complained of.

As I say, the problem is very intermittent. A true heisenbug. If you
look at the site, you probably won't see anything wrong:

   http://www.wpquestions.com/

But enough customers have complained that this has become a serious
problem for us.

Not sure what to do. I plan to tear out every use of url_for() and
simply hardcode the URLs, but I can't get rid of the form widgets. At
the very least, I need to populate forms with whatever values are
appropriate to the circumstances.

Is anyone else having this problem?

--

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

   --
   Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

  --

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

 --
 Sheraz Sharif
 sharif.she...@gmail.comhttp://sherazsharif.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-us...@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: is anyone else having trouble with url_for()?

2010-01-04 Thread lawrence


On Jan 4, 4:31 pm, Gábor Fási maerl...@gmail.com wrote:
  ui=2view=attth=
  1257035cb4bc9c21attid=0.1disp=attdrealattid=ii_1257035cb4bc9c21zw

 This is a partial view attachment link from gmail's web interface -
 how did it end up on your site?


Interesting. It is possible that he made a mistake when he copy and
pasted?

Usually, the HTML I see on screen looks like this:

input type=text name=search value= /

I mean, it appears like HTML, but it is visible, instead of being
rendered.





--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] anonymous visits getting into a module marked credentials: admin. Why?

2009-12-13 Thread Lawrence
I create a new module. Then I create  a folder called config in that
module, and in a file called security.yml I add:

all:
  is_secure:   on
  credentials: admin


Then I run symfony cc.

And yet, even when I'm not logged in, I can still point my browser at
every page in the module. Did I forget something?

--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




[symfony-users] Re: anonymous visits getting into a module marked credentials: admin. Why?

2009-12-13 Thread Lawrence
I'm using Symfony 1.2.5

On Dec 13, 7:42 pm, Lawrence lkrub...@geocities.com wrote:
 I create a new module. Then I create  a folder called config in that
 module, and in a file called security.yml I add:

 all:
   is_secure:   on
   credentials: admin

 Then I run symfony cc.

 And yet, even when I'm not logged in, I can still point my browser at
 every page in the module. Did I forget something?

--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] config/error/erro.html.php cannot be shown

2009-11-27 Thread Lawrence Krubner
 apps/frontend/config/settings.yml
 all:
  .actions:
error_404_module: default
error_404_action: error404


Don't you want to change the error module? I usually create a module
called error:

error_404_module: error


I put all of my error templates in there.





On Fri, Nov 27, 2009 at 1:08 AM, isyairazu isyair...@gmail.com wrote:
 Hello everyone,

 Why can not I customize the error page?

 Symfony1.2

 config/error/error.html.php
 ?php echo 'test ok' ?

 apps/frontend/config/settings.yml
 all:
  .actions:
    error_404_module: default
    error_404_action: error404

 $ ./symfony cc

 access prod-env
 http://eample.com/invalid.html
 = Displayed Oops! Page Not Found (symfony's default)

 I want to show test ok.

 Where of me is foolish?

 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-us...@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.




--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] Re: is sfLucenePlugin dead? what are people using for search?

2009-11-26 Thread Lawrence Krubner
Thanks, Thomas, I look forward to using it. But what is the correct
URL for the newest (reasonably stable)  version?


On Thu, Nov 26, 2009 at 4:01 AM, Thomas Rabaix thomas.rab...@gmail.com wrote:
 Hello,

 I am not working anymore on the Zend_Search version as it suffers from
 performance issues. Now, the svn version should works fine with Propel
 and Doctrine.

 Now, I have started a new branch to handle Solr engine (which is based
 on Java and Lucene), the current version on the svn should work fine
 (used in production). I am currently working on unit test, removing
 sfContext dependency and much more.

 However, if you find critical bugs in the Zend_Search version, please
 send me a patch.

 Thomas

 On Thu, Nov 26, 2009 at 5:35 AM, Richtermeister nex...@gmail.com wrote:
 Yes, the plugin is available for propel 1.2 via svn only from what I
 can tell. Still works just as advertised. Not that even the svn 1.2
 doctrine version actually works for propel as well. So, all is good :)

 Daniel


 On Nov 25, 12:30 pm, larry lkrub...@geocities.com wrote:
 I should add, I'm working with Propel. I see that Thomas Rabaix did
 some work to get the plugin working with Doctrine. There was a
 conversation about that here:

 http://groups.google.com/group/symfony-users/browse_thread/thread/148...

 But I am curious if any work was ever done to get the plugin to work
 with sf 1.2 and Propel?

 On Nov 25, 3:23 pm, larry lkrub...@geocities.com wrote:

  I unthinkingly started to install the sfLucenePlugin:

 http://www.symfony-project.org/plugins/sfLucenePlugin/0_1_6?tab=plugi...

  Go this error:

    You try to install a symfony 1.0
  plugin.
    Please read the help message of this task to know how to install a
  plugin for the current version of symfony. 

  I double-checked the README and I saw that I needed to use the new
  plugin version:

 http://www.symfony-project.org/plugins/sfLucenePlugin11

  But that page simply says:

  The plugin sfLucenePlugin11 does not exist. 

  The 0.1.6 describes itself as ready for sf 1.2:

   sfLucenePlugin  0.1.6beta  for sf 1.2sf 1.1sf 1.0 MIT

  But that seems unlikely because it was released on 05/04/2008 - long
  before 1.2 was released. Who is adding in this meta information?

  Anyway, it seems as if the plugin is dead?

  So I am curious, what are people using for search, in Symfony
  projects?

  (I searched the archives of this mailist group to see previous
  discussions of this plugin. I was surprised to see that this plugin is
  rarely talked about and when it is, the posts tend to be solitary
  questions that never get a response:

 http://groups.google.com/group/symfony-users/browse_thread/thread/74e...

 http://groups.google.com/group/symfony-users/browse_thread/thread/74e...

 --

 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 at 
 http://groups.google.com/group/symfony-users?hl=en.






 --
 Thomas Rabaix
 http://rabaix.net

 --

 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 at 
 http://groups.google.com/group/symfony-users?hl=en.




--

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 at 
http://groups.google.com/group/symfony-users?hl=en.




Re: [symfony-users] File uploading

2009-11-26 Thread Lawrence Krubner
 Hey guys,

 I need to allow users to upload files. Thing is, I am not using the SF
 Forms, and my forms are as basic as they can be. I want to make use of
 something that is the equivalent of $this-getrequest()-moveFile() but that
 seems to be deprecated.



I don't understand your question. If you do not want to use Symfony
forms, then you would just write your upload code as if it was normal
PHP code. I mean, you would use whatever PHP code you normally use for
uploading files.


When I'm not using Symfony forms, I have often used code like this:


if ($request-getFiles('question')) {
  $uploadedFileArray = $request-getFiles('question');
  // $pathToTemporaryFile will equal something like
/home/wpquestions/tmp/phpm9Lnd4
  $pathToTemporaryFile = $uploadedFileArray['tmp_name']['image'];
  $fileMimeType = $uploadedFileArray['type']['image'];
  $fileOriginalName = $uploadedFileArray['name']['image'];
  $fileUploadError = $uploadedFileArray['error']['image'];

  //  what if the user does not upload an image? we do not want
this field blanked, if they have
  // previously uploaded an image, so lets save this value
  $previousImage = $question-getImage();

  $newImage = new Image();
  $nameOfNewProfileImageSuccessfullyUploaded =
$newImage-executeUpload($pathToTemporaryFile, $fileMimeType,
$this-getUser()-getUsername(), $fileOriginalName);
  if ($nameOfNewProfileImageSuccessfullyUploaded) {
$question-setImage($nameOfNewProfileImageSuccessfullyUploaded);
// what follows is for creating a user gallery of images
$newImage-setImageName($nameOfNewProfileImageSuccessfullyUploaded);
$newImage-setUserId($this-getUser()-getGuardUser()-getId());
$newImage-save();
  } else {
$this-logMessage(In question/executeStep3 we tried to save
'$pathToTemporaryFile' but upload or saving failed., 'debug');
  }

  // if the user didn't upload an image, then reset the image name
to whatever existed previously
 // ($fileUploadError will equal 0 if there were no errors, but if
the user didn't upload anything, this
// equal 4
  if ($fileUploadError) {
$question-setImage($previousImage);
  }
}



To resize the image upon upload, I use both the eCrop plugin, and the
sfThumbnail plugin, which I use inside my Image model class, like so:

  /*
  * 2009-08-29 -
  *
  * $absolutePathToFile will equal something like
/home/wpquestions/tmp/phpm9Lnd4
  *
  * this is being called in content/updateUser
  *
  */
  public function executeUpload($absolutePathToFile, $fileMimeType,
$username, $fileOriginalName)
  {
if ($fileOriginalName) {
  $username = trim($username);
  $username = str_replace( , _, $username);
  $fileName = basename($absolutePathToFile);
  $originalFileExtensionArray = explode(., $fileOriginalName);
  $originalFileExtension = array_pop($originalFileExtensionArray);
  $newNameForBaseImage = $username.'_'.$fileName.'.'.$originalFileExtension;

  if (!stristr($fileOriginalName, .bmp)) {
$c = new eCrop($absolutePathToFile);

$c-cropLargestSquareArea(sfConfig::get('sf_upload_dir').'/crop_'.$newNameForBaseImage,
eCrop::CROP_CENTER, eCrop::CROP_CENTER, false);
$c-setThumbSize(48, 48);

$c-cropLargestSquareArea(sfConfig::get('sf_upload_dir').'/crop_small_'.$newNameForBaseImage,
eCrop::CROP_CENTER, eCrop::CROP_CENTER);

$c = new eCrop($absolutePathToFile);
$c-setThumbSize(160, 160);

$c-cropLargestSquareArea(sfConfig::get('sf_upload_dir').'/crop_medium_'.$newNameForBaseImage,
eCrop::CROP_CENTER, eCrop::CROP_CENTER);

$c = new eCrop($absolutePathToFile);
$c-setThumbSize(300, 300);

$c-cropLargestSquareArea(sfConfig::get('sf_upload_dir').'/crop_bigger_'.$newNameForBaseImage,
eCrop::CROP_CENTER, eCrop::CROP_CENTER);




// Create the medium thumbnail
$thumbnail = new sfThumbnail(300, 300);
$thumbnail-loadFile($absolutePathToFile);

$thumbnail-save(sfConfig::get('sf_upload_dir').'/bigger_'.$newNameForBaseImage,
$fileMimeType);

// Create the medium thumbnail
$thumbnail = new sfThumbnail(160, 160);
$thumbnail-loadFile($absolutePathToFile);

$thumbnail-save(sfConfig::get('sf_upload_dir').'/medium_'.$newNameForBaseImage,
$fileMimeType);

// Create the small thumbnail
$thumbnail = new sfThumbnail(80, 80);
$thumbnail-loadFile($absolutePathToFile);

$thumbnail-save(sfConfig::get('sf_upload_dir').'/small_'.$newNameForBaseImage,
$fileMimeType);
  }

  // Move the uploaded file to the 'uploads' directory
  $success = copy($absolutePathToFile,
sfConfig::get('sf_upload_dir').'/'.$newNameForBaseImage);
  if ($success) {
return $newNameForBaseImage;
  } else {
   return false;
  }
}
  }


If you were using Symfony forms, you would probably put this code in
the form class, rather 

[symfony-users] any plugins offering a GUI form builder for non-programmers

2009-10-04 Thread lawrence


I've a friend who is in charge of overseeing a web start-up. They are
still assembling their tech team, but their recruiters are already
active gathering up corporations and talents into a database. As a
stop-gap (since he has no tech team), he has started building forms
using Zoho.com. The recruiters will for now use those forms. But I
wanted to switch him over to using Symfony forms. I think I could
quickly take Symfony's auto generation tools and create a very simple
GUI and mix them together to create a primitive GUI form creator, but
I'm wondering if someone else has already created such a thing?

--~--~-~--~~~---~--~~
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] what plugins or code do symfony developers prefer for image cropping?

2009-09-29 Thread lawrence


A client has asked me to build an image gallery. I'm curious what code
or plugins Symfony developers typically use for this (assuming there
is any typical usage).

Have developers here used the eCropPlugin, and do you have an opinion
about it?

http://www.symfony-project.org/plugins/eCropPlugin/prototype
--~--~-~--~~~---~--~~
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] where does symfony hard-code paths?

2009-06-15 Thread Lawrence

This was a surprising problem. I suppose it shows how poorly I
understand Symfony.

We were doing development on our server at this path:

/home/mypail/home/sfprojects/bw2/

On the server, in the directory that is available on the web, we
created an alias so that the above path could be reached at an url
like:

http://www.domain.com/v1/

After 2 months of hard-work, it was time to let some people test the
site. Of course, we didn't want beta-testers looking at a site that
the programmers were working on, since there was always the chance of
some transitory bug arising during work. So I created a new directory,
and then I copied everything over:

cp -r /home/mypail/home/sfprojects/bp2/* /home/mypail/home/sfprojects/
betatest/

Then I created an alias so that our beta testers could see this site
by pointing their browsers here:

http://www.domain.com/v1/

But when I ssh'ed to the server and cd'ed to here:

/home/mypail/home/sfprojects/betatest/

Every command I entered went back to the other, earlier path. For
instance, if I went here:

/home/mypail/home/sfprojects/betatest/

and did this:

# symfony cc

then I got this error:

Fatal error: Cannot redeclare class ProjectConfiguration in /home/
mypail/home/sfprojects/bp2/config/ProjectConfiguration.class.php on
line 28

That is the path of the other site.


I did all the obvious things:

1.) I deleted everything in the cache folder.

2.) I chased down every reference to the first site in the config
files:

grep bp2 config/*

I looked in the symfony file itself, but I didn't see anything
hardcoded there, other than the shebang line.

Still the problem persisted.

Finally, I tracked down, and changed, every single instance of bp2:

grep -R bp2 *

I deleted everything in the log folder, I deleted an error_log file
that someone had started in the web directory. I deleted a backup of
the database that had bp2 in it.

None of these files struck me as important, but once I had deleted or
changed every single instance of 'bp2', the symfony cc command began
to work again.

But where was the reference to the other path? It wasn't in the cache
and it wasn't in any of the config files, because I took care of those
early on. So where was it? Where else would Symfony store a hard-coded
path?

--~--~-~--~~~---~--~~
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] how can we find out if an URL is pointing to a template? (if we want to delete the template?)

2009-05-25 Thread Lawrence


Recently, I was working on a site, and we deleted a template that we
no longer wanted. But it turned out, in an obscure area of the site,
there was a link going to that template. So when people clicked on
that link, they got an error page.

The site is under rapid evolution and we are constantly adding and
deleting templates. We are writing functional tests to ensure that
every page we want always returns a 200 response, but how do we test
to find all links pointing at a given template, when we delete
template?


--~--~-~--~~~---~--~~
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] What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Lawrence

We are now unable to run commands such as:

symfony propel:build-all-load

Because this seems to output between all the major steps:

X-Powered-By: PHP/5.2.9
Content-type: text/html; charset=iso-8859-1

Which causes this:

Fatal error: Class 'Content-type' not found in /home/apartments/php/
symfony/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php on
line 253


What would cause such output?

--~--~-~--~~~---~--~~
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: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Lawrence



On May 18, 9:15 am, Marek m0k...@gmail.com wrote:
 what does php -v tells you? I get:

 PHP 5.2.9 (cli) (built: Apr  1 2009 16:50:35)
 Copyright (c) 1997-2009 The PHP Group
 Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

 The important part is cli after version number. That means Command
 Line Interface. If you have cgi, that's causing it to output headers.




mybai...@mybailiwick.com [~/home/sfprojects/bw2]# php -v
PHP 5.2.9 (cgi-fcgi) (built: May 18 2009 02:46:53)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies


But this just started a few days ago. The problem wasn't there last
week.








 On 18. Máj, 08:02 h., Lawrence lkrub...@geocities.com wrote:

  We are now unable to run commands such as:

  symfony propel:build-all-load

  Because this seems to output between all the major steps:

  X-Powered-By: PHP/5.2.9
  Content-type: text/html; charset=iso-8859-1

  Which causes this:

  Fatal error: Class 'Content-type' not found in /home/apartments/php/
  symfony/plugins/sfPropelPlugin/lib/addon/sfPropelData.class.php on
  line 253

  What would cause such output?
--~--~-~--~~~---~--~~
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 backend questions?

2009-05-18 Thread Lawrence

As Eno says, you would create a plugin to share a module between the
backend and frontend. For the sake of simplicity, I usually create
duplicate, redundant modules on the frontend and backend. Once the
project is up and running, if there is time, I pull them out and make
them a plugin.

Fabien Potencier wrote:

Applications share nothing, but the model classes. But, even if the
symfony documentation is crystal clear on the subject, many developers
want to share more than just the model. 

http://www.symfony-project.org/blog/2009/02/17/cross-application-links






On May 18, 2:02 pm, torso petteri.torsso...@gmail.com wrote:
 Hi

 I am going to do a backend application which can do frontend pages. I
 need to know is it possible to do modules on backend.

 For example:

 I have apps which are backend and frontend. On backend I have module
 admin, which can do new frontend modules like home, contacts, etc and
 those are shwoing in url likewww.example.com/homeorwww.example.com/contacts.
 What is the simpliest way to do it? Or should I use drupal?

 Thanks for your answers.
--~--~-~--~~~---~--~~
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: What might cause output to appear when running a command line script? We're getting: Content-type: text/html; charset=iso-8859-1

2009-05-18 Thread Lawrence



On May 18, 4:43 pm, Eno symb...@gmail.com wrote:
 On Mon, 18 May 2009, Lawrence wrote:
  mybai...@mybailiwick.com [~/home/sfprojects/bw2]# php -v
  PHP 5.2.9 (cgi-fcgi) (built: May 18 2009 02:46:53)
  Copyright (c) 1997-2009 The PHP Group
  Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

  But this just started a few days ago. The problem wasn't there last
  week.

 So there's been no software updates? What's weird is, on most platforms,
 the CGI binary is called php-cgi and the command-line is called just php.

Well, I don't know. We keep the Symfony project in Subversion, but we
don't keep the whole server in Subversion, so there could have been
updates outside of the Symfony project. For that matter, if someone
edited any of the core Symfony files, that too would not show up in
Subversion.


 Obviously, on your system, php is a CGI binary. On my system, php is a
 symbolic link to /usr/lib/php5/bin/php - maybe on yours its erroneously
 pointing to php-cgi instead. Or maybe you have an alias in play. I would
 also check what symfony is using as a path to the php binary.

On our server:

$ which php
/usr/bin/php


$ file /usr/bin/php
/usr/bin/php: symbolic link to `/ramdisk/bin/php5'

$ file /ramdisk/bin/php5
/ramdisk/bin/php5: ELF 64-bit LSB executable, AMD x86-64, version 1
(SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs),
not stripped








--~--~-~--~~~---~--~~
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: how to change an integer form input to a string?

2009-05-18 Thread Lawrence


On May 18, 5:19 am, Gareth McCumskey gmccums...@gmail.com wrote:
 Did you rebuild model after changing schema? (propel:build-model)

I just rebuilt the model and that seems to have fixed the problem. I
had assumed that the conversion to an integer would have happened in
the form class - in the validators. But I guess the model classes do
this too.








 On Mon, May 18, 2009 at 7:13 AM, Lawrence lkrub...@geocities.com wrote:

  I've got a field that was mistakenly defined in the schema as an
  integer. So the base class looks like this (I'm leaving out the
  irrelevant fields):

     $this-setWidgets(array(
       'payment_amount'    = new sfWidgetFormInput(),
     ));

     $this-setValidators(array(
       'payment_amount'    = new sfValidatorInteger(),
     ));

  This field is suppose to be an amount of cash, so it needs to have a
  decimal in it. When I first tried it, I input 1.5 and I got the error
  Must be an integer.

  So I overrode it:

     $this-widgetSchema['payment_amount'] = new sfWidgetFormInput
  ();
     $this-validatorSchema['payment_amount'] = new sfValidatorString()

  I no longer get an error but when the form submits, the decimal is
  stripped off and I'm left with an integer.

  I've changed schema.yml so that payment_amount is now a float. I also
  changed the database itself, so that payment_amount is now a float.

  Yet the decimal still gets stripped off and it is rendered as an
  integer. Can anyone tell me where else I need to change this?

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



[symfony-users] how to change an integer form input to a string?

2009-05-17 Thread Lawrence

I've got a field that was mistakenly defined in the schema as an
integer. So the base class looks like this (I'm leaving out the
irrelevant fields):

$this-setWidgets(array(
  'payment_amount'= new sfWidgetFormInput(),
));

$this-setValidators(array(
  'payment_amount'= new sfValidatorInteger(),
));

This field is suppose to be an amount of cash, so it needs to have a
decimal in it. When I first tried it, I input 1.5 and I got the error
Must be an integer.

So I overrode it:

$this-widgetSchema['payment_amount'] = new sfWidgetFormInput
();
$this-validatorSchema['payment_amount'] = new sfValidatorString()

I no longer get an error but when the form submits, the decimal is
stripped off and I'm left with an integer.

I've changed schema.yml so that payment_amount is now a float. I also
changed the database itself, so that payment_amount is now a float.

Yet the decimal still gets stripped off and it is rendered as an
integer. Can anyone tell me where else I need to change this?

--~--~-~--~~~---~--~~
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] we are going to convert a site from Propel to Doctrine. What are the pain points?

2009-04-25 Thread Lawrence Krubner


We are going to convert a site from using Propel to using Doctrine.
Have others done this? Can you suggest what the pain points are?

I haven't looked, but I assume the Doctrine interface is different and
therefore we need to crawl through our code changing a lot of method
calls.


--~--~-~--~~~---~--~~
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: Propel question: how to get AND instead of OR

2009-04-23 Thread Lawrence Krubner

getNewCriterion() ???

Where is this documented?


On Apr 22, 11:40 pm, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com
wrote:
 hi
    i think this should work

    $this-howManyToPage = 6;
    $c = new Criteria();
    $criterion = $c-getNewCriterion(WeblogPeer::CATEGORY, 'general',
 Criteria::NOT_EQUAL);
    $criterion-addAnd($c-getNewCriterion(WeblogPeer::CATEGORY, 'featured',
 Criteria::NOT_EQUAL););
 //   $criterion-addOr($c-getNewCriterion(WeblogPeer::CATEGORY, 'featured',
 Criteria::NOT_EQUAL););
    $c-add($criterion);
    $c-add(WeblogPeer::ACTIVE, 0, Criteria::NOT_EQUAL);
    $c-addDescendingOrderByColumn(WeblogPeer::CREATED_AT);
    $this-sendDataToPager(Weblog, $c);

 On Thu, Apr 23, 2009 at 8:20 AM, Lawrence Krubner 
 lkrub...@geocities.comwrote:





  I have this code:

     $this-howManyToPage = 6;
     $c = new Criteria();
     $c-add(WeblogPeer::CATEGORY, general, Criteria::NOT_EQUAL);
     $c-add(WeblogPeer::CATEGORY, featured, Criteria::NOT_EQUAL);
     $c-add(WeblogPeer::ACTIVE, 0, Criteria::NOT_EQUAL);
     $c-addDescendingOrderByColumn(WeblogPeer::CREATED_AT);
     $this-sendDataToPager(Weblog, $c);

  I want to screen out all items that have a CATEGORY of 'general' or
  'equal'. The two lines that I have are acting more like an OR than an
  AND.

  Also, where do I find the SQL that is actually executed by Propel, in
  Symfony 1.2? In Symfony 1.1 All I had to do was look at my dev
  controller and then click on the debugging log option up in the
  right corner. That used to list the SQL that was actually executed.
  But now there is no SQL there. Where do I look for it?

 --
 Regards,
 Dheeraj
--~--~-~--~~~---~--~~
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: Propel question: how to get AND instead of OR

2009-04-23 Thread Lawrence Krubner

Thanks much for this. I wish Criteria/Propel was better documented.


On Apr 22, 11:40 pm, Dheeraj Kumar Aggarwal dheerajcom...@gmail.com
wrote:
 hi
    i think this should work

    $this-howManyToPage = 6;
    $c = new Criteria();
    $criterion = $c-getNewCriterion(WeblogPeer::CATEGORY, 'general',
 Criteria::NOT_EQUAL);
    $criterion-addAnd($c-getNewCriterion(WeblogPeer::CATEGORY, 'featured',
 Criteria::NOT_EQUAL););
 //   $criterion-addOr($c-getNewCriterion(WeblogPeer::CATEGORY, 'featured',
 Criteria::NOT_EQUAL););
    $c-add($criterion);
    $c-add(WeblogPeer::ACTIVE, 0, Criteria::NOT_EQUAL);
    $c-addDescendingOrderByColumn(WeblogPeer::CREATED_AT);
    $this-sendDataToPager(Weblog, $c);

 On Thu, Apr 23, 2009 at 8:20 AM, Lawrence Krubner 
 lkrub...@geocities.comwrote:





  I have this code:

     $this-howManyToPage = 6;
     $c = new Criteria();
     $c-add(WeblogPeer::CATEGORY, general, Criteria::NOT_EQUAL);
     $c-add(WeblogPeer::CATEGORY, featured, Criteria::NOT_EQUAL);
     $c-add(WeblogPeer::ACTIVE, 0, Criteria::NOT_EQUAL);
     $c-addDescendingOrderByColumn(WeblogPeer::CREATED_AT);
     $this-sendDataToPager(Weblog, $c);

  I want to screen out all items that have a CATEGORY of 'general' or
  'equal'. The two lines that I have are acting more like an OR than an
  AND.

  Also, where do I find the SQL that is actually executed by Propel, in
  Symfony 1.2? In Symfony 1.1 All I had to do was look at my dev
  controller and then click on the debugging log option up in the
  right corner. That used to list the SQL that was actually executed.
  But now there is no SQL there. Where do I look for it?

 --
 Regards,
 Dheeraj
--~--~-~--~~~---~--~~
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] Oddly enough, sfPager isn't working, though I copied the code over from a site that was working

2009-04-23 Thread Lawrence Krubner


Hmm. Odd. Go here and scroll to the bottom of the page:

http://lawrence.sds5.com/esociety/web/

You'll see these links, created by sfPager:

«  1 - 2  »

But click on the 2, and it doesn't work. You're still on the front
page.

Most of my code is copy-n-paste of the code snippets on the Symfony
site. Not sure what is up.

In the indexSuccess.php template I have this:

p
?php if ($pager-haveToPaginate()): ?
hr /

?php echo link_to('laquo;', 'content/showNews?page='.$pager-
getFirstPage()) ?
?php echo link_to('lt;', 'content/showNews?page='.$pager-
getPreviousPage()) ?
?php $links = $pager-getLinks(); foreach ($links as $page): ?
?php echo ($page == $pager-getPage()) ? $page : link_to($page,
'content/showNews?page='.$page) ?
?php if ($page != $pager-getCurrentMaxLink()): ? - ?php 
endif ?
?php endforeach ?
?php echo link_to('gt;', 'content/showNews?page='.$pager-
getNextPage()) ?
?php echo link_to('raquo;', 'content/showNews?page='.$pager-
getLastPage()) ?
?php endif ?
/p




And in the actions class, I have this:

  public function sendDataToPager($class, Criteria $c, $peerMethod=)
{
// 02-12-09 - Lets do the pagination.
// Lets go with 30 results per page
// This is for all of the above list actions that have a lot to
show
if (!$this-howManyToPage) $this-howManyToPage = 30;
$pager = new sfPropelPager($class, $this-howManyToPage);
if ($peerMethod) $pager-setPeerMethod($peerMethod);
$pager-setCriteria($c);
//Set the first page to 1
$pager-setPage($this-getRequestParameter('page', 1));
$pager-init();
$this-pager = $pager;
  }



The code has worked before, in other contexts, so I'm unclear why it
is not working now.


--~--~-~--~~~---~--~~
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: Oddly enough, sfPager isn't working, though I copied the code over from a site that was working

2009-04-23 Thread Lawrence Krubner



On Apr 23, 7:56 am, Eno symb...@gmail.com wrote:
 On Thu, 23 Apr 2009, LawrenceKrubnerwrote:
  The code has worked before, in other contexts, so I'm unclear why it
  is not working now.

 Are you sure there are  30 items?

 You probably should have some code that doesn't show the next link if
 you're on the last page OR there are less than 30 items to show.


Well, remember, the whole thing is wrapped in this if block:

  ?php if ($pager-haveToPaginate()): ?

so if those links appear at all, that means there is something to
paginate.






--~--~-~--~~~---~--~~
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: http://www.symfony-project.org/plugins/ Unavailable

2009-04-22 Thread Lawrence Krubner



On Apr 22, 12:13 am, Sherif sherifgmans...@gmail.com wrote:
 I'm unable to login tohttp://www.symfony-project.org/plugins/(its
 been like that for a few hours now). When you try to login, you get a
 500 Server error. Just posting it here if anyone knows someone who
 can fix this, that would be great

Yeah, we were just talking about that, here on the symfony_users
group, a few hours ago.

What I did was delete all cookies from symfony-project.org. That did
not enable me to log in, but it did at least allow me to see the
pages.

--~--~-~--~~~---~--~~
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: How do I set a field value on a form?

2009-04-22 Thread Lawrence Krubner



On Apr 22, 7:36 am, Adrien Mogenet adrien.moge...@gmail.com wrote:
 Be careful Mark, I think that by this way you'll get the same issue
 that I got...

 =http://groups.google.fr/group/symfony-users/browse_thread/thread/8473...

 setDefault() didn't work for me within the form to force a value got
 from session ; but it worked when I call this method from the action
 class.

 I'm still looking for a way to force this setting within the form..


I'm just asking out of pure curiosity, but what advantage do you get
from setting this value in the form, rather than the action?












 On 22 avr, 12:34, Mark Smith marksmith5...@jungle-monkey.com wrote:

  I have a form with a list of services on it. When the user submits the
  form, I want it to remember what item on the list was selected. Even
  if it's several page requests later.

  I'm storing the index in session and trying to apply it to the form
  field. Sending it in the constructor is probably tidier anyway, so I'm
  changing it to do that.

  But for future reference, you are saying $form-setDefault('field',
  'value'); will work even after it's constructed and configure() has
  been called?

  On Apr 22, 10:38 am, Bernhard Schussek bschus...@gmail.com wrote:

   Hi Mark,

   On Wed, Apr 22, 2009 at 10:23 AM, Mark Smith

   marksmith5...@jungle-monkey.com wrote:
So you are saying the only way to change a form field once the object
exists, is to completely rebuild the form?

   No. The question is _when_ you want to change the form. You can change
   the default values any time in the object lifecycle before you render
   the form. Note that the default values are not displayed anymore once
   you call -bind().

   If you need more help, please provide a little more information on
   what you are trying to achieve. Otherwise it's hard to give you
   specific advice.

   Bernhard
--~--~-~--~~~---~--~~
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: Admin linking.

2009-04-22 Thread Lawrence Krubner



On Apr 22, 10:07 am, Valkerian valker...@gmail.com wrote:
 Morning all. I'm going to throw out a really simple question here
 about the backend admin.
 If I want to prefill a field when creating a new item, how do I do
 that via a link?
 Say I have a contact form and I want to link to it such that the first
 name will be filled with 
 Joe.http://localhost/backend_dev.php/contact/new?first_name=Joe
 Something like that, but that doesn't work. Symfony 1.2/Doctrine BTW.

As near as I can understand you, you are either asking

1.) How can I use Javascript to set a value based on someone clicking
a link?

or

2.) How can I force a value into a form based on a value being passed
through the URL.

The first question should probably be asked in another forum.

The second question has the answer of In your action, fetch the value
from the URL and then assign it to the form. This was just discussed,
here on symfony_users, just a few hours ago.






--~--~-~--~~~---~--~~
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 question: how to get AND instead of OR

2009-04-22 Thread Lawrence Krubner

I have this code:

$this-howManyToPage = 6;
$c = new Criteria();
$c-add(WeblogPeer::CATEGORY, general, Criteria::NOT_EQUAL);
$c-add(WeblogPeer::CATEGORY, featured, Criteria::NOT_EQUAL);
$c-add(WeblogPeer::ACTIVE, 0, Criteria::NOT_EQUAL);
$c-addDescendingOrderByColumn(WeblogPeer::CREATED_AT);
$this-sendDataToPager(Weblog, $c);


I want to screen out all items that have a CATEGORY of 'general' or
'equal'. The two lines that I have are acting more like an OR than an
AND.

Also, where do I find the SQL that is actually executed by Propel, in
Symfony 1.2? In Symfony 1.1 All I had to do was look at my dev
controller and then click on the debugging log option up in the
right corner. That used to list the SQL that was actually executed.
But now there is no SQL there. Where do I look for it?


--~--~-~--~~~---~--~~
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] what kind of errors should I expect upgrading from Symfony 1.1 to 1.2?

2009-04-21 Thread Lawrence Krubner


So, I had a working site on an old server, running Symfony 1.1. I've
moved the site to a new server, running Symfony 1.2. Now I get errors
like this:

Fatal error: Call to undefined method BasePeer::getmapbuilder() in /
home/lawrence/public_html/esociety/lib/model/om/BaseCommentPeer.php on
line 69

http://lawrence.sds5.com/esociety/web/test_dev.php/comment/index


Is that a problem because of the upgrade? What sort of problems should
I expect?


--~--~-~--~~~---~--~~
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: Something I don't understand with form default values

2009-04-21 Thread Lawrence Krubner

Which version of Symfony?

You should always be able to force a default value from the action.
Always. I've done this many times.



On Apr 20, 5:42 pm, Adrien Mogenet adrien.moge...@gmail.com wrote:
 As I tought it changed nothing...  :-/

 --
 Adrien

 On 20 avr, 23:28, FlyLM [ML] flylm...@gmail.com wrote:

  2009/4/20 Adrien Mogenet adrien.moge...@gmail.com

   Hi all,

   there is something - strange ? - that I don't understand.
   Let say I have a field updated_by within the class user.

   In the class form :

   public function configure()
   {
     ..
     $this-setDefault('updated_by', '42');
     ...
   }

  Try this :

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



[symfony-users] Re: Error: Unable to open PDO connection

2009-04-21 Thread Lawrence Krubner



On Apr 21, 4:57 am, Lee Bolding l...@leesbian.net wrote:
 On 21 Apr 2009, at 07:41, Lawrence Krubner wrote:



  500 | Internal Server Error | PropelException
  Unable to open PDO connection [wrapped: SQLSTATE[28000] [1045] Access
  denied for user 'lawrence'@'localhost' (using password: NO)]
  stack trace

 snip

  If I ssh to the server, I can use the current username and password to
  log into MySql from the command line, so I know that I've got the
  correct username and password for this database. And I've got the
  right database name.

 Is there a password? the error message states that you're trying to  
 connect without a password.

 I think that's your problem.

 FWIW, in future, I'd attempt one massive set of changes at a time -  
 seems you've changed your server architecture AND upgraded to a  
 different version of Symfony both at the same time. That's gonna make  
 your troubleshooting a world more painful - how do you know which of  
 those changes is causing specific errors?

Well, for many weeks I asked Can we please upgrade to Symfony 1.2?
and I was told There is no point upgrading now, since we are moving
to a new server very soon. We will install 1.2 on the new server.

So, I agree, not ideal, though I suppose an economist might argue that
this was optimal in terms of allocating scarce resources.

--~--~-~--~~~---~--~~
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 would I get a Template not set error message?

2009-04-21 Thread Lawrence Krubner

So, I've been having some troubles. We just moved a new site (we'd
barely started work on it, really) from a server that had been running
Symfony 1.1 to a new server running 1.2. As Lee Bolding said, moving
and upgrading at the same time guarantees some pain. But I've been
reading tutorials and forum posts and now it seems we've most of the
issues worked out.

But here is one that still puzzles me. The front page gives a
Template not set error:

http://lawrence.sds5.com/esociety/web/test_dev.php/

Other pages render:

http://lawrence.sds5.com/esociety/web/test_dev.php/comment/index

So this problem is just with the front page. Perhaps basic routing
stuff changed between version 1.1 and 1.2? This is the whole of my
routing.yml file:

# default rules
homepage:
  url:   /
  param: { module: dashboard, action: index }

default_symfony:
  url:   /symfony/:action/*
  param: { module: default }

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*


This page was working on the old server, but now it is not.


In the actions.class.php of the dashboard module, I attempted to make
the template explicit:


  public function executeIndex($request)
  {
 $this-setTemplate('index');
  }

This has no effect.

Any ideas what I should look to fix?


--~--~-~--~~~---~--~~
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 would I get a Template not set error message?

2009-04-21 Thread Lawrence Krubner



On Apr 21, 1:36 pm, Lawrence Krubner lkrub...@geocities.com wrote:
 So, I've been having some troubles. We just moved a new site (we'd
 barely started work on it, really) from a server that had been running
 Symfony 1.1 to a new server running 1.2. As Lee Bolding said, moving
 and upgrading at the same time guarantees some pain. But I've been
 reading tutorials and forum posts and now it seems we've most of the
 issues worked out.

 But here is one that still puzzles me. The front page gives a
 Template not set error:

 http://lawrence.sds5.com/esociety/web/test_dev.php/

 Other pages render:

 http://lawrence.sds5.com/esociety/web/test_dev.php/comment/index

 So this problem is just with the front page. Perhaps basic routing
 stuff changed between version 1.1 and 1.2? This is the whole of my
 routing.yml file:

 # default rules
 homepage:
   url:   /
   param: { module: dashboard, action: index }

 default_symfony:
   url:   /symfony/:action/*
   param: { module: default }

 default_index:
   url:   /:module
   param: { action: index }

 default:
   url:   /:module/:action/*

 This page was working on the old server, but now it is not.

 In the actions.class.php of the dashboard module, I attempted to make
 the template explicit:

   public function executeIndex($request)
   {
          $this-setTemplate('index');
   }

 This has no effect.

 Any ideas what I should look to fix?


Okay, I got this working now.

In fact, the whole site is working. We've successfully upgraded from
Symfony 1.1 to 1.2.

I'll say again, the upgrade is much harder than what I'd expect from a
small increment number upgrade.





--~--~-~--~~~---~--~~
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] is anyone currently able to reach the Plugins page on Symfony-Project.org?

2009-04-21 Thread Lawrence Krubner

When I go here:

http://www.symfony-project.org/plugins/

I get this error:

Content Encoding Error

The page you are trying to view cannot be shown because it uses an
invalid or unsupported form of compression.

The page you are trying to view cannot be shown because it uses an
invalid or unsupported form of compression.

* Please contact the website owners to inform them of this
problem.


This started about 5 minutes ago. I've been on the plugins page all
day, not having any trouble.

Is anyone else having this problem?

--~--~-~--~~~---~--~~
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] what is the best wiki plugin for Symfony 1.2?

2009-04-21 Thread Lawrence Krubner



I'm building a site using Symfony 1.2. The client has asked for a
simple wiki where staff can collect business information. Does anyone
recommend any of the wiki plugins?

I just looked over the plugin page. Seems like there are few wiki
plugins for 1.2.





--~--~-~--~~~---~--~~
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: is anyone currently able to reach the Plugins page on Symfony-Project.org?

2009-04-21 Thread Lawrence Krubner


Odd. I got that error as soon as I tried to log in.

I finally fixed it by deleting all cookies from the symfony-
project.org site.



On Apr 21, 5:07 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
 I can view the page fine

 On Wed, Apr 22, 2009 at 9:00 AM, Lawrence Krubner



 lkrub...@geocities.com wrote:

  When I go here:

 http://www.symfony-project.org/plugins/

  I get this error:

  Content Encoding Error

  The page you are trying to view cannot be shown because it uses an
  invalid or unsupported form of compression.

  The page you are trying to view cannot be shown because it uses an
  invalid or unsupported form of compression.

     * Please contact the website owners to inform them of this
  problem.

  This started about 5 minutes ago. I've been on the plugins page all
  day, not having any trouble.

  Is anyone else having this problem?

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
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: is anyone currently able to reach the Plugins page on Symfony-Project.org?

2009-04-21 Thread Lawrence Krubner



On Apr 21, 10:18 pm, Eno symb...@gmail.com wrote:
 On Tue, 21 Apr 2009, Lawrence Krubner wrote:
  I finally fixed it by deleting all cookies from the symfony-
  project.org site.

 I tried that. I still get the error upon login.


Yes, I'm unable to login. But at least, when I deleted all the
cookies, I was able to see the pages. Not login, but see the pages.


--~--~-~--~~~---~--~~
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] i seem unable to get the settings right for security.yml

2009-04-21 Thread Lawrence Krubner


I've a website with 1 app and inside of that are 8 modules. One module
is open to the public, and the others are to be behind a password. I
seem unable to figure out how to say this in security.yml.

I realize I can set these things by creating a file inside of a config
of each module, but I thought there was a way to set these things from
the apps security.yml file?

For instance, if I want to lock down the whole module called weblog,
I tried this:

weblog:
  all:
is_secure: on


and this:

weblog:
is_secure: on



but neither worked.
--~--~-~--~~~---~--~~
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] what are the best tutorials on how to build a full public profile system for users, based off of sfGuard?

2009-04-21 Thread Lawrence Krubner


I've been asked to build, not quite an online social network, more
like a system where users can sign up and create public profile pages.
I'm starting with sfGuard as my base. Can anyone point me to some of
the better tutorials and blog posts on this subject?


--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 1:49 am, Kevin Barsotti kevin.barso...@tribaldawn.com
wrote:
 This happened to me once due to a permissions problem, Symfony (or
 whatever user Symfony/PHP/Apache is running as) could not write to the
 cache directories, producing a system error that, in production, was an
 empty screen.  When you run cc do you see any permission errors fly by
 along with all the output?

Thanks for responding.

To answer your question, no. There was at one point an error about
Could not write to cache file /etc/etc/etc. Something like that. I
deleted the file and then ran cc again, and everything was fine.
This is the output I now get:

lawre...@paris:~/public_html/esociety$ php symfony cc
 cache Clearing cache type all for test app and test env
 file+ /home/lawrence/public_html/esociety/data/test_test-cli.lck
 chmod 777 /home/lawrence/public_html/esociety/data/test_test-cli.lck
 file- /home/lawrence/public_html/esoc.../config_config_handlers.yml.php
 file- /home/lawrence/public_html/esoc.../test/config/config_app.yml.php
 file- /home/lawrence/public_html/esoc.../config/config_settings.yml.php
 file- /home/lawrence/public_html/esociety/data/test_test-cli.lck
 cache Clearing cache type all for test app and dev env
 file+ /home/lawrence/public_html/esociety/data/test_dev-cli.lck
 chmod 777 /home/lawrence/public_html/esociety/data/test_dev-cli.lck
 file- /home/lawrence/public_html/esoc.../config_config_handlers.yml.php
 file- /home/lawrence/public_html/esoc...t/dev/config/config_app.yml.php
 file- /home/lawrence/public_html/esoc.../config/config_settings.yml.php
 file- /home/lawrence/public_html/esociety/data/test_dev-cli.lck










 Lawrence Krubner wrote:
  Wow, this just keeps getting weirder. I went into Subversion and
  rolled the site back to a version that I know used to work. Then I ran
  this command:

  php symfony cc

  And yet I'm still getting a blank white screen. And yet, the whole
  site is in Subversion and this version used to work.

  On Apr 20, 1:11 am, Lawrence Krubner lkrub...@geocities.com wrote:

  and, I should add, when I look in my PHP error logs, the last entry is
  from 2 weeks ago. There are no errors from tonight. How can that be?
  How can I get a blank white screen, yet nothing gets recorded to the
  error logs?

  and yes, I've cleared the cache. many times.

  On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:

  Just setting up a new site. Was working and now it isn't. I forget
  what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

  I tried installing sfErrorHandler so I could get more intelligent
  error messages. I installed the files of sfErrorHandler (copied them
  over from another project, and I modified settings.yml so it now has
  this:

  all:
    .settings:
      enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
  sfErrorHandler]

  I still get a plain white screen. Can anyone suggest what I do next?

  This error reminds of what I face when I have a syntax error in a yml
  file. Does anyone know where I can test my yml files for parse errors?

 --
 Kevin Barsotti
 Operations Director
 Tribal Dawn, LLC www.tribaldawn.com
 412.736.1357
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 1:49 am, Kevin Barsotti kevin.barso...@tribaldawn.com
wrote:
 This happened to me once due to a permissions problem, Symfony (or
 whatever user Symfony/PHP/Apache is running as) could not write to the
 cache directories, producing a system error that, in production, was an
 empty screen.  When you run cc do you see any permission errors fly by
 along with all the output?


And also, I should add, I did find a parse error in settings.yml, but
I fixed it and then re-ran cc. And I still get this blank white
page:

http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index








 Lawrence Krubner wrote:
  Wow, this just keeps getting weirder. I went into Subversion and
  rolled the site back to a version that I know used to work. Then I ran
  this command:

  php symfony cc

  And yet I'm still getting a blank white screen. And yet, the whole
  site is in Subversion and this version used to work.

  On Apr 20, 1:11 am, Lawrence Krubner lkrub...@geocities.com wrote:

  and, I should add, when I look in my PHP error logs, the last entry is
  from 2 weeks ago. There are no errors from tonight. How can that be?
  How can I get a blank white screen, yet nothing gets recorded to the
  error logs?

  and yes, I've cleared the cache. many times.

  On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:

  Just setting up a new site. Was working and now it isn't. I forget
  what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

  I tried installing sfErrorHandler so I could get more intelligent
  error messages. I installed the files of sfErrorHandler (copied them
  over from another project, and I modified settings.yml so it now has
  this:

  all:
    .settings:
      enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
  sfErrorHandler]

  I still get a plain white screen. Can anyone suggest what I do next?

  This error reminds of what I face when I have a syntax error in a yml
  file. Does anyone know where I can test my yml files for parse errors?

 --
 Kevin Barsotti
 Operations Director
 Tribal Dawn, LLC www.tribaldawn.com
 412.736.1357
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 1:49 am, Kevin Barsotti kevin.barso...@tribaldawn.com
wrote:
 This happened to me once due to a permissions problem, Symfony (or
 whatever user Symfony/PHP/Apache is running as) could not write to the
 cache directories, producing a system error that, in production, was an
 empty screen.  When you run cc do you see any permission errors fly by
 along with all the output?


The sysadmin might have chrooted the directory I'm working, so that
the project now points to a local copy of the core symfony framework,
rather than pointing to the standard location:

/usr/share/php/symfony

Not sure if that could be causing a problem. At least one site on this
server continued to work after he did the chroot bit.


--- lawrence












 Lawrence Krubner wrote:
  Wow, this just keeps getting weirder. I went into Subversion and
  rolled the site back to a version that I know used to work. Then I ran
  this command:

  php symfony cc

  And yet I'm still getting a blank white screen. And yet, the whole
  site is in Subversion and this version used to work.

  On Apr 20, 1:11 am, Lawrence Krubner lkrub...@geocities.com wrote:

  and, I should add, when I look in my PHP error logs, the last entry is
  from 2 weeks ago. There are no errors from tonight. How can that be?
  How can I get a blank white screen, yet nothing gets recorded to the
  error logs?

  and yes, I've cleared the cache. many times.

  On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:

  Just setting up a new site. Was working and now it isn't. I forget
  what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

  I tried installing sfErrorHandler so I could get more intelligent
  error messages. I installed the files of sfErrorHandler (copied them
  over from another project, and I modified settings.yml so it now has
  this:

  all:
    .settings:
      enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
  sfErrorHandler]

  I still get a plain white screen. Can anyone suggest what I do next?

  This error reminds of what I face when I have a syntax error in a yml
  file. Does anyone know where I can test my yml files for parse errors?

 --
 Kevin Barsotti
 Operations Director
 Tribal Dawn, LLC www.tribaldawn.com
 412.736.1357
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner


I guess the real question is, how do I get Symfony to talk to me? A
blank white screen does not give me any clue about what to fix. I
can't get sfErrorHander to work - nothing works.

And whatever the error is, it seems like Symfony is suppressing it,
since no errors appear in the PHP logs.




On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:
 Just setting up a new site. Was working and now it isn't. I forget
 what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

 I tried installing sfErrorHandler so I could get more intelligent
 error messages. I installed the files of sfErrorHandler (copied them
 over from another project, and I modified settings.yml so it now has
 this:

 all:
   .settings:
     enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
 sfErrorHandler]

 I still get a plain white screen. Can anyone suggest what I do next?

 This error reminds of what I face when I have a syntax error in a yml
 file. Does anyone know where I can test my yml files for parse errors?
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:
 Just setting up a new site. Was working and now it isn't. I forget
 what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

 I tried installing sfErrorHandler so I could get more intelligent
 error messages. I installed the files of sfErrorHandler (copied them
 over from another project, and I modified settings.yml so it now has
 this:

 all:
   .settings:
     enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
 sfErrorHandler]

 I still get a plain white screen. Can anyone suggest what I do next?

 This error reminds of what I face when I have a syntax error in a yml
 file. Does anyone know where I can test my yml files for parse errors?





Here are some of the things I'm assuming. Someone please tell me where
I might be wrong.

Given a blank white screen, there are 3 main things I should check:

1.) clear the cache

2.) look for parse errors in yml files

3.) look for permission errors

but I have done all these things. So what is next? What 4th area
typically causes problems?

--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:
 Just setting up a new site. Was working and now it isn't. I forget
 what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

 I tried installing sfErrorHandler so I could get more intelligent
 error messages. I installed the files of sfErrorHandler (copied them
 over from another project, and I modified settings.yml so it now has
 this:

 all:
   .settings:
     enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
 sfErrorHandler]

 I still get a plain white screen. Can anyone suggest what I do next?

 This error reminds of what I face when I have a syntax error in a yml
 file. Does anyone know where I can test my yml files for parse errors?





Here are some of the things I'm assuming. Someone please tell me where
I might be wrong.

Given a blank white screen, there are 3 main things I should check:

1.) clear the cache

2.) look for parse errors in yml files

3.) look for permission errors

but I have done all these things. So what is next? What 4th area
typically causes problems?

--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner


Interesting. I kept looking in the error log and I was frustrated that
there was no error. But now, I just looked in the access log. The
access is being recorded, but it is sending a 500 response (is that
technically correct? Do 500 errors belong in the access log, instead
of the error log? I find that surprising). But for some reason, the
500 error doesn't appear on screen:

http://lawrence.sds5.com/esociety/web/test_dev.php

All I get is a blank white screen.

What could choke a 500 response before it is sent to the browser?



On Apr 20, 9:03 am, Jeremy Benoist jeremy.beno...@gmail.com wrote:
 Hi,

 I recently got a similar problem on the same env : Apache/2.2.8
 (Ubuntu) + PHP/5.2.4-2ubuntu5.5.

 When I took a look to frontend.log, there were this error :
 ALERT - canary mismatch on efree() - heap overflow detected
 sfYamlParser.class.php

 Never really find how to fix it ... I just reload apache, and the
 problem is gone.
 But sometimes, it comes back...

 On 20 avr, 11:24, Lee Bolding l...@leesbian.net wrote:

  On 20 Apr 2009, at 07:24, Lawrence Krubner wrote:

   Given a blank white screen, there are 3 main things I should check:

   1.) clear the cache

   2.) look for parse errors in yml files

   3.) look for permission errors

   but I have done all these things. So what is next? What 4th area
   typically causes problems?

  You've already answered your own question

  On 20 Apr 2009, at 07:20, Lawrence Krubner wrote:

   The sysadmin might have chrooted the directory I'm working, so that
   the project now points to a local copy of the core symfony framework,
   rather than pointing to the standard location:

   /usr/share/php/symfony

  The 4th thing to check is other people 'fixing' my application that  
  wasn't broke

  I'm pretty sure this is the root of your problem. Find your SysAdmin -  
  beat them with a stale baguette, like one of our cops would beat a G20  
  protester

  Whenever we have our SysAdmins play with our applications, it's done  
  whilst a developer is with them - so that they can be sure to check  
  everything that could cause the application to break - and to actually  
  test that it still works afterwards.

  It certainly sounds like a permissions issue - make sure you've done a  
  chmod -R 777 on both log/ and cache/

  Other than that, make sure you've got a sensible error logging level  
  set, and that display_errors in on...

  It's going to be a silly error - so you just need to think through  
  everything logically :)
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-20 Thread Lawrence Krubner



On Apr 20, 5:24 am, Lee Bolding l...@leesbian.net wrote:
 On 20 Apr 2009, at 07:24, Lawrence Krubner wrote:

  Given a blank white screen, there are 3 main things I should check:

  1.) clear the cache

  2.) look for parse errors in yml files

  3.) look for permission errors

  but I have done all these things. So what is next? What 4th area
  typically causes problems?

 You've already answered your own question

 On 20 Apr 2009, at 07:20, Lawrence Krubner wrote:

  The sysadmin might have chrooted the directory I'm working, so that
  the project now points to a local copy of the core symfony framework,
  rather than pointing to the standard location:

  /usr/share/php/symfony

 The 4th thing to check is other people 'fixing' my application that
 wasn't broke

 I'm pretty sure this is the root of your problem. Find your SysAdmin -
 beat them with a stale baguette, like one of our cops would beat a G20
 protester

 Whenever we have our SysAdmins play with our applications, it's done
 whilst a developer is with them - so that they can be sure to check
 everything that could cause the application to break - and to actually
 test that it still works afterwards.


Okay, it seems you were right. Talked to the sysadmin. He thought the
issue was arising from suexec he imposed on the server. Finally got
something to appear on the front page:

http://lawrence.sds5.com/esociety/web/test_dev.php


though the inner pages are still  blank white:

http://lawrence.sds5.com/esociety/web/comment/index















 It certainly sounds like a permissions issue - make sure you've done a
 chmod -R 777 on both log/ and cache/

 Other than that, make sure you've got a sensible error logging level
 set, and that display_errors in on...

 It's going to be a silly error - so you just need to think through
 everything logically :)
--~--~-~--~~~---~--~~
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] when I try to use propel:build-model I get error

2009-04-20 Thread Lawrence Krubner


If I run this command:

php symfony propel:build-model

I get this error:

  Some problems occurred when executing the
task:
build-propel.xml:465:22: Execution of the target buildfile failed.
Aborting.
If the exception message is not clear enough, read the output of
the task for more information

What would cause this?

I've already changed all the permissions to 0777:

drwxrwxrwx  2 lawrence lawrence 4096 2009-04-20 22:26 .
drwxr-xr-x 12 lawrence lawrence 4096 2009-04-20 22:22 ..
-rwxrwxrwx  1 lawrence lawrence  122 2009-04-20 22:15 databases.yml
-rwxrwxrwx  1 lawrence lawrence  216 2009-04-20 22:14
ProjectConfiguration.class.php
-rwxrwxrwx  1 lawrence lawrence 2461 2009-04-20 22:15 propel.ini
-rwxrwxrwx  1 lawrence lawrence   28 2009-04-20 22:15 properties.ini
-rwxrwxrwx  1 lawrence lawrence   56 2009-04-20 22:15
rsync_exclude.txt
-rwxrwxrwx  1 lawrence lawrence 3445 2009-04-20 22:15 schema.yml



The full output is below:


 schemaconverting /home/lawrence/publ...ciety/config/schema.yml to XML
 schemaputting /home/lawrence/public_h...ety/config/generated-schema.xml
 propelRunning om phing task
[propel-om] Could not perform XLST transformation.  Make sure PHP has
been compiled/configured to support XSLT.
[phingcall] Error importing plugins/sfPropelPlugin/lib/propel/builder/
SfPeerBuilder.php
Execution of target om failed for the following reason: /usr/share/
php/symfony/plugins/sfPropelPlugin/lib/vendor/propel-generator/build-
propel.xml:465:22: Execution of the target buildfile failed. Aborting.
[phing] /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/
propel-generator/build-propel.xml:465:22: Execution of the target
buildfile failed. Aborting.

  Some problems occurred when executing the
task:
build-propel.xml:465:22: Execution of the target buildfile failed.
Aborting.
If the exception message is not clear enough, read the output of
the task for more information

 file- /home/lawrence/public_html/esociety/config/generated-schema.xml

--~--~-~--~~~---~--~~
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: when I try to use propel:build-model I get error

2009-04-20 Thread Lawrence Krubner



On Apr 20, 11:13 pm, Eno symb...@gmail.com wrote:
 On Mon, 20 Apr 2009, Lawrence Krubner wrote:
  [propel-om] Could not perform XLST transformation.  Make sure PHP has
  been compiled/configured to support XSLT.

 I think perhaps the error above is the problem?

Thanks for the response, but that is not the problem. Apparently the
issue with XSLT is not very important. I just tested this by going
back to the old server, where all of the code had been working without
a problem, and running the same command, against the schema.yml:

php symfony propel:build-model


And I see the same error:

[propel-om] Processing: generated-schema.xml
[propel-om] Could not perform XSLT transformation.  Make sure PHP has
been compiled/configured to support XSLT.


Except on this older server, the code works perfectly and Symfony
continues past the mistake and generates the model classes.

On the new server, it dies.

The older server runs Symfony 1.1 and the new server runs Symfony 1.2.
Would that cause this problem?




--~--~-~--~~~---~--~~
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: when I try to use propel:build-model I get error

2009-04-20 Thread Lawrence Krubner



On Apr 20, 11:13 pm, Eno symb...@gmail.com wrote:
 On Mon, 20 Apr 2009, Lawrence Krubner wrote:
  [propel-om] Could not perform XLST transformation.  Make sure PHP has
  been compiled/configured to support XSLT.

 I think perhaps the error above is the problem?


On the older server, where everything works, I can try this command,
and the code runs, even though that same error appears:


lawre...@paris:~/public_html/esociety$ php symfony propel:build-model
 schemaconverting /home/lawrence/publ...ciety/config/schema.yml to XML
 schemaputting /home/lawrence/public_h...ety/config/generated-schema.xml
Buildfile: /usr/share/php/symfony/plugins/sfPropelPlugin/lib/vendor/
propel-generator/build.xml
[resolvepath] Resolved /home/lawrence/public_html/esociety/config to /
home/lawrence/public_html/esociety/config

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

propel-project-builder  check-project-set:

propel-project-builder  set-project-dir:

propel-project-builder  check-buildprops-exists:

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

propel-project-builder  check-buildprops:

propel-project-builder  configure:
 [echo] Loading project-specific props from /home/lawrence/
public_html/esociety/config/propel.ini
 [property] Loading /home/lawrence/public_html/esociety/config/
propel.ini

propel-project-builder  om:
[phing] Calling Buildfile '/usr/share/php/symfony/plugins/
sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml' with
target 'om'
 [property] Loading /usr/share/php/symfony/plugins/sfPropelPlugin/lib/
vendor/propel-generator/./default.properties

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

propel  om-check:

propel  om:
 [echo] +--+
 [echo] |  |
 [echo] | Generating Peer-based Object Model for   |
 [echo] | YOUR Propel project! (NEW OM BUILDERS)!  |
 [echo] |  |
 [echo] +--+
[phingcall] Calling Buildfile '/usr/share/php/symfony/plugins/
sfPropelPlugin/lib/vendor/propel-generator/build-propel.xml' with
target 'om-template'
 [property] Loading /usr/share/php/symfony/plugins/sfPropelPlugin/lib/
vendor/propel-generator/./default.properties

propel  om-template:
[propel-om] Target database type: mysql
[propel-om] Target package: lib.model
[propel-om] Using template path: /usr/share/php/symfony/plugins/
sfPropelPlugin/lib/vendor/propel-generator/templates
[propel-om] Output directory: /home/lawrence/public_html/esociety
[propel-om] Processing: generated-schema.xml
[propel-om] Could not perform XSLT transformation.  Make sure PHP has
been compiled/configured to support XSLT.
[propel-om] Processing Datamodel : JoinedDataModel
[propel-om]   - processing database : propel
[propel-om] + alumni
[propel-om] - BaseAlumniPeer [builder: SfPeerBuilder]
[propel-om] - BaseAlumni [builder: SfObjectBuilder]
[propel-om] - AlumniMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) AlumniPeer
[propel-om] - (exists) Alumni
[propel-om] + comments
[propel-om] - BaseCommentPeer [builder: SfPeerBuilder]
[propel-om] - BaseComment [builder: SfObjectBuilder]
[propel-om] - CommentMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) CommentPeer
[propel-om] - (exists) Comment
[propel-om] + contacts
[propel-om] - BaseContactPeer [builder: SfPeerBuilder]
[propel-om] - BaseContact [builder: SfObjectBuilder]
[propel-om] - ContactMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) ContactPeer
[propel-om] - (exists) Contact
[propel-om] + events
[propel-om] - BaseEventPeer [builder: SfPeerBuilder]
[propel-om] - BaseEvent [builder: SfObjectBuilder]
[propel-om] - EventMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) EventPeer
[propel-om] - (exists) Event
[propel-om] + options
[propel-om] - BaseOptionPeer [builder: SfPeerBuilder]
[propel-om] - BaseOption [builder: SfObjectBuilder]
[propel-om] - OptionMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) OptionPeer
[propel-om] - (exists) Option
[propel-om] + sponsors
[propel-om] - BaseSponsorPeer [builder: SfPeerBuilder]
[propel-om] - BaseSponsor [builder: SfObjectBuilder]
[propel-om] - SponsorMapBuilder [builder: SfMapBuilderBuilder]
[propel-om] - (exists) SponsorPeer
[propel-om] - (exists) Sponsor
[propel-om] + staff
[propel-om] - BaseStaffPeer [builder: SfPeerBuilder]
[propel-om] - BaseStaff [builder: SfObjectBuilder]
[propel-om] - StaffMapBuilder [builder: SfMapBuilderBuilder]
[propel-om

[symfony-users] i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-19 Thread Lawrence Krubner


Just setting up a new site. Was working and now it isn't. I forget
what I did to break it. I now get a blank white screen when I go here:

http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

I tried installing sfErrorHandler so I could get more intelligent
error messages. I installed the files of sfErrorHandler (copied them
over from another project, and I modified settings.yml so it now has
this:

all:
  .settings:
enabled_modules:   [default, sfMediaLibrary, sfFormExtra,
sfErrorHandler]


I still get a plain white screen. Can anyone suggest what I do next?

This error reminds of what I face when I have a syntax error in a yml
file. Does anyone know where I can test my yml files for parse errors?
--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-19 Thread Lawrence Krubner

and, I should add, when I look in my PHP error logs, the last entry is
from 2 weeks ago. There are no errors from tonight. How can that be?
How can I get a blank white screen, yet nothing gets recorded to the
error logs?

and yes, I've cleared the cache. many times.


On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:
 Just setting up a new site. Was working and now it isn't. I forget
 what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

 I tried installing sfErrorHandler so I could get more intelligent
 error messages. I installed the files of sfErrorHandler (copied them
 over from another project, and I modified settings.yml so it now has
 this:

 all:
   .settings:
     enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
 sfErrorHandler]

 I still get a plain white screen. Can anyone suggest what I do next?

 This error reminds of what I face when I have a syntax error in a yml
 file. Does anyone know where I can test my yml files for parse errors?
--~--~-~--~~~---~--~~
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] what does this mean: Argument 1 passed to sfPatternRouting::configureRoute() must be an instance of sfRoute

2009-04-19 Thread Lawrence Krubner


Check out the error that I'm getting here:

http://lawrence.sds5.com/bocahoops/web/frontend_dev.php

Catchable fatal error: Argument 1 passed to
sfPatternRouting::configureRoute() must be an instance of sfRoute,
string given, called in /home/lawrence/symfony/lib/routing/
sfPatternRouting.class.php on line 245 and defined in /home/lawrence/
symfony/lib/routing/sfPatternRouting.class.php on line 256


What would cause this error?

This is what I have in routing.yml:


# default rules
homepage:
  url:   /
  param: { module: content, action: newsList }

default_symfony:
  url:   /symfony/:action/*
  param: { module: default }

default_index:
  url:   /:module
  param: { action: index }

default:
  url:   /:module/:action/*

login_redirect:
  url:   /dashboard/login/originalUri/:redirectUrl
  param: { module: dashboard, action: redirectAfterLogin }


--~--~-~--~~~---~--~~
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: i get a blank white screen, even in dev mode, even with sfErrorHandler installed

2009-04-19 Thread Lawrence Krubner


Wow, this just keeps getting weirder. I went into Subversion and
rolled the site back to a version that I know used to work. Then I ran
this command:

php symfony cc

And yet I'm still getting a blank white screen. And yet, the whole
site is in Subversion and this version used to work.





On Apr 20, 1:11 am, Lawrence Krubner lkrub...@geocities.com wrote:
 and, I should add, when I look in my PHP error logs, the last entry is
 from 2 weeks ago. There are no errors from tonight. How can that be?
 How can I get a blank white screen, yet nothing gets recorded to the
 error logs?

 and yes, I've cleared the cache. many times.

 On Apr 20, 1:01 am, Lawrence Krubner lkrub...@geocities.com wrote:

  Just setting up a new site. Was working and now it isn't. I forget
  what I did to break it. I now get a blank white screen when I go here:

 http://lawrence.sds5.com/esociety/web/test_dev.php/weblog/index

  I tried installing sfErrorHandler so I could get more intelligent
  error messages. I installed the files of sfErrorHandler (copied them
  over from another project, and I modified settings.yml so it now has
  this:

  all:
    .settings:
      enabled_modules:       [default, sfMediaLibrary, sfFormExtra,
  sfErrorHandler]

  I still get a plain white screen. Can anyone suggest what I do next?

  This error reminds of what I face when I have a syntax error in a yml
  file. Does anyone know where I can test my yml files for parse errors?
--~--~-~--~~~---~--~~
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] how do you create an OR statement using Propel?

2009-04-04 Thread Lawrence Krubner


If I want SQL that has an OR in it, like this:

select * from teams where game_id=5 OR game_id=7

How do I get that with Propel. This is not covered in Chapter 8 of the
Symfony book.
--~--~-~--~~~---~--~~
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: in my error logs: Action uploads/assets does not exist.

2009-03-21 Thread Lawrence Krubner



On Mar 21, 1:49 am, Eno symb...@gmail.com wrote:
 On Fri, 20 Mar 2009, Lawrence Krubner wrote:
  I've got the sfMediaLibraryPlugin installed, and it uploads files to
  uploads/assets, but I don't see how that can be an issue. I've haven't
  been using or testing the plugin, yet these errors appear.

 How do you know that noone else is calling that action? Script kiddies
 attack web servers all the time, so check your web server access and error
 logs.


That is my error log . That is where I'm seeing it, is in my error
log. I'm wondering why it is there.

This is a dev site. Unless the client was up late tonight and decided
to poke at the site, I'm the only who is poking at it. But let's
assume, for a moment, that the client is up late and poking at the
site. How do I find where in the code that non-existent action was
called? I need to find that and fix it. But I don't know how to find
it.
--~--~-~--~~~---~--~~
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] how do I update 23 records with one query? That is, all the players on a particular team?

2009-03-21 Thread Lawrence Krubner


When I look in Chapter 8 of the book, I realize that Criteria seems to
be mostly about building SELECT statements:

http://www.symfony-project.org/book/1_1/08-Inside-the-Model-Layer

When I look to see how I should update a record, I find a lot of
information about updating a particular record, which I already know
how to do. But how do I update many records? I want this SQL:

UPDATE player SET mufson_award_winner='' WHERE new_team_id='712'

How do I get that?

Right now, this is the code I have. I can not figure out how to
replace the magic part.


// 03-20-09 - normally, one player per team wins the Mufson award.
Sometimes, when there
// are syblings on a team, they will give the award to both
syblings. Here we are getting
// an array of ids of the players who've won the Mufson Award. We
must update the
// mufson_award_winner field in the player database table
$arrayWhoWonTheMufsonAward = $request-getParameter
('whoWonTheMufsonAward');
if (isset($arrayWhoWonTheMufsonAward)) {
  if (is_array($arrayWhoWonTheMufsonAward)) {
// First, we must ensure that none of the players are marked
as winners of the
// the Mufson award. We will blank anyone currently chosen as
a winner. Then
// we will assign the winner.
$c = new Criteria();
$c-add(NewPlayerPeer::NEW_TEAM_ID, $request-getParameter
('id'));

[now something magic happens and all the players on the team
have their mufson_award_winner field blanked]

for ($i=0; $i  count($arrayWhoWonTheMufsonAward); $i++) {
  $playerId = $arrayWhoWonTheMufsonAward[$i];
  $playerModelClass = new NewPlayer();
  $playerModelClass-setNew(false);
  $playerModelClass-setId($playerId);
  $playerModelClass-setMufsonAwardWinner(1);
  $playerModelClass-save();
}
  }
}
--~--~-~--~~~---~--~~
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: Pake V's Phing?

2009-03-21 Thread Lawrence Krubner



On Mar 13, 8:34 am, Lee Bolding l...@leesbian.net wrote:
 FWIW, I chose Phing.

 Seems pretty cool - just trying to work out how to make a wrapper so I  
 can deploy my application like so :

 ./deploy.sh --target=[dev|test|stage|prod] --tag=svn_tag



Lee, can you tell us why you chose Phing? What steered you away from
pake?








--~--~-~--~~~---~--~~
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: Re : [symfony-users] sfGuardExtraPlugin

2009-03-21 Thread Lawrence Krubner



On Mar 20, 7:18 pm, ckemmler ckemm...@gmail.com wrote:
 Thanks!

 Did that.

 I have two problems now

 1. the README there tells me:

   * Add method `retrieveByUsernameOrEmailAddress` to get a user by
 email or username in lib/model/sfGuardPlugin/sfGuardUserPeer.class
 e.q.

 [PHP]
 static public function retrieveByUsernameOrEmailAddress
 ($usernameOrEmail, $isActive = true )
 {
   $c = new Criteria();
 $c-add(self::USERNAME, $usernameOrEmail);
 $c-add(self::EMAIL, $usernameOrEmail);
 $c-add(self::IS_ACTIVE, $isActive);

 return self::doSelectOne($c);
 }

 but I don't have a lib/model/sfGuardPlugin/sfGuardUserPeer.class

 What am I supposed to do then?


Do you have

/plugins/lib/models/sfGuardPlugins/sfGuardUserPeer.class?
--~--~-~--~~~---~--~~
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: Re : [symfony-users] sfGuardExtraPlugin

2009-03-21 Thread Lawrence Krubner



On Mar 20, 7:57 pm, ckemmler ckemm...@gmail.com wrote:
 This might be more interesting: I just tried to trigger the register
 action by going to:

 http://localhost/web/frontend_dev.php/sfGuardRegister/register

 This got me:

 Fatal error: Class 'sfGuardFormRegister' not found in /eclipse/
 workspace/twittbook/plugins/sfGuardExtraPlugin/modules/sfGuardRegister/
 lib/BasesfGuardRegisterActions.class.php on line 26

 which seems to indicate that the action is indeed recognized and
 executed, but it can't find a class that's defined in the modules lib
 directory: sfGuardFormRegister

Did you enable the plugin in your apps settings.yml file?


--~--~-~--~~~---~--~~
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] in my error logs: Action uploads/assets does not exist.

2009-03-20 Thread Lawrence Krubner

As far as I know, I never call an action called uploads/assets. Yet
I'm getting this in my error logs:

[21-Mar-2009 00:21:10] Action uploads/assets does not exist.


I thought maybe I'd accidentally typed this into some module so I did
this:

cd /apps/frontend/modules

grep -R uploads\/assets *

I got this:

content/actions/actions.class.php:  $path = 
/bocahoops/web/
uploads/assets/$file;
content/actions/.svn/text-base/actions.class.php.svn-base:
$path = /bocahoops/web/uploads/assets/$file;
content/templates/.svn/text-base/showTeamSuccess.php.svn-base:  
img
src=/bocahoops/web/uploads/assets/?php echo date(Y) ?/?php echo
$new_team-getTeamnumber() ?.jpg alt=?php echo $new_team-
getTeamname() ? //p
content/templates/showTeamSuccess.php:  img 
src=/bocahoops/web/
uploads/assets/?php echo date(Y) ?/?php echo $new_team-
getTeamnumber() ?.jpg alt=?php echo $new_team-getTeamname() ? /
/p


Nothing there. Just paths, no actions. So then:

cd /lib/

grep -R uploads\/assets *

Nothing.

I've got the sfMediaLibraryPlugin installed, and it uploads files to
uploads/assets, but I don't see how that can be an issue. I've haven't
been using or testing the plugin, yet these errors appear.

How can I find out what code is calling this action?





--~--~-~--~~~---~--~~
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: One module, many forms

2009-03-18 Thread Lawrence Krubner



On Mar 17, 7:23 pm, Tomasz Ignatiuk tomek.ignat...@gmail.com wrote:
 Hi

 I have a module called Documents. In this modul I use few kinds of
 documents. They use the same table in db but different fields. So that
 I created few Forms for them.

 I overridden executeNew() in order to call proper form class. And it
 works well. Proper form object is created, template displayed,
 document saved.

 I overridden executeEdit() in order to call proper form class. And it
 works well. Proper form object is created, template displayed with
 data. But after saving Symfony still uses the DocumentForm class
 instead of for example DocumentMyVerForm class. I overriden
 executeUpdate action in order to use proper form class but it still
 uses main DocumentForm. Any ideas how to set it up?

Can we see what the code is for your update method? Are you sure you
are explicitly calling your new child class in the update method?


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

2009-03-11 Thread Lawrence Krubner



On Mar 11, 3:41 am, ken marfillas...@gmail.com wrote:
 Im currently creating my own doctrine admin theme and added tabbing
 functionality but I just came across a problem and I cant find any
 answer in the net.

 How do I pass additional query_string to form_tag_for in _form.php
 template? There seems to be no way according to the api.

I'm struggling with the same thing. I ended up hard coding the form
tag. I've adopted this method for dealing with the limits of Symfony.
When in doubt, I go back to using plain PHP and HTML.
--~--~-~--~~~---~--~~
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] no key_method in version 1.1 of Symfony?

2009-03-11 Thread Lawrence Krubner


I would like to have this in my child form class:

  public function configure()
  {
$this-widgetSchema['teamnumber'] = new sfWidgetFormPropelSelect(array
('model' = 'NewTeam', 'add_empty' = true, 'key_method' =
'getTeamnumber', 'choices' = 'Choose a team'));
  }

I need for this drop down select box to use teamnumber instead of
the id primary key of the new_team database table. However, I'm using
Symfony 1.1. The above gives me an exception:

[InvalidArgumentException]
sfWidgetFormPropelSelect does not support the following options:
'key_method'.

I see the key_method here:

http://www.tig12.net/downloads/apidocs/symfony/plugins/sfPropelPlugin/lib/widget/sfWidgetFormPropelSelect.class.html

However, I think that is for the 1.2 version of Symfony. When I look
here:

http://www.symfony-project.org/api/1_1/sfWidgetFormPropelSelect

That is clearly for the 1.1 version, and key_method is not mentioned.

Is it correct to say that in version 1.1 the sfWidgetFormPropelSelect
always assumes it should be using the primary key in the database
table that it gets its data from?



--~--~-~--~~~---~--~~
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] I can not get a class in the lib directory to autoload

2009-03-11 Thread Lawrence Krubner

I created a new version of sfWidgetFormPropelSelect. I put
sfWidgetFormPropelSelectForTeams.class.php in the /lib directory. The
class name is sfWidgetFormPropelSelectForTeams.

If I read here:

http://www.symfony-project.org/book/1_2/19-Mastering-Symfony-s-Configuration-Files#chapter_19_extending_the_autoloading_feature

I see this:

Autoloading works for all .php files containing classes and/or
interfaces.

By default, classes stored in the following directories in your
projects benefit from the autoloading automatically:

myproject/lib/
myproject/lib/model
myproject/apps/frontend/lib/
myproject/apps/frontend/modules/mymodule/lib

So shouldn't my file autoload?

In my child form class, I have this:

  public function configure()
  {
$this-widgetSchema['teamnumber'] = new
sfWidgetFormPropelSelectForTeams(array('model' = 'NewTeam',
'add_empty' = true, 'choices' = 'Choose a team'));
  }

I get this error:

Fatal error: Class 'sfWidgetFormPropelSelectForTeams' not found in /
home/lawrence/public_html/bocahoops/lib/form/NewCoachForm.class.php on
line 18

Why isn't the autoloading working?

--~--~-~--~~~---~--~~
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: a plugin to generate Google Sitemaps

2009-03-11 Thread Lawrence Krubner



On Mar 11, 8:53 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
  the plugin has also no orm depensies.

 Just an update, I added auto detection to detect if DbFinder exists
 and use it otherwise use Propel.



This is fantastic. Thanks. It looks like a good plugin, in the first
place, and having it use DbFinder is a great additional feature.










 On Wed, Mar 11, 2009 at 10:04 PM, gimler gordon.fra...@web.de wrote:

  it generate sitemap with this standard (use by google, yahoo,
  microsoft)
 http://www.sitemaps.org/

  it is working wih 1.0, 1.1 and 1.2 there exist also a package for each
  version.

  the plugin has also no orm depensies.

  i use it allready in production on my projects.

  you can also add in the addDefaultUrls method some urls that has a
  model but no modul.
  seehttp://www.symfony-project.org/plugins/isicsSitemapXMLPlugin/0_9_1?ta...

  greetings
  Gimler

  On 11 Mrz., 09:13, Sid Bachtiar sid.bacht...@gmail.com wrote:
  Hi,

  But does it generate Google format sitemap? Also it isn't flagged as
  for Symfony 1.2.

  I was looking for something that just work with sfSimpleBlogPlugin and
  thought few others would be looking for similar plugin that just work
  with sfSimpleBlogPlugin.

  I like it though, especially the idea of nothing to do if the module
  already implements the interface.

  sfSimpleGoogleSitemapPlugin is more app.yml and model driven than module 
  driven.

 http://onlinesid.com/blog/sfsimplegooglesitemapplugin

  On Wed, Mar 11, 2009 at 6:50 PM, gimler gordon.fra...@web.de wrote:

   there is allready a plugin to generate sitemaps
  http://www.symfony-project.org/plugins/isicsSitemapXMLPlugin

   greetings
   Gimler

   On 11 Mrz., 01:01, Sid Bachtiar sid.bacht...@gmail.com wrote:
   I developed a simple one last night. I called in
   sfSimpleGoogleSitemapPlugin. Only for Symfony 1.2 and Propel for now.
   It was developed for sfSimpleBlogPlugin but can be configured to read
   from any model (check the README in the package for more info).

   I tried to submit it to Symfony plugin repository but I messed it up,
   so now waiting for the admin to help me sort it out :(

   In the meantime:

  http://onlinesid.com/blog/sfsimplegooglesitemapplugin

   See it in action:

  http://onlinesid.com/gsitemap

   On Sun, Mar 8, 2009 at 3:37 PM, Lawrence Krubner 
   lkrub...@geocities.com wrote:

On Mar 7, 8:42 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
I'm looking for it too, to be integrated with sfSimpleBlogPlugin. I
don't think there is one at the moment.

On Sun, Mar 8, 2009 at 2:38 PM, 
LawrenceKrubnerlkrub...@geocities.com wrote:

 I haven't been able to find a plugin that generates a 
 GoogleSitemap.
 (or rather,  sitemapfor those search engines that use the format
 developed by Google). Is there one?

One of the strengths and weaknesses of Symfony right now seems to be
the lack of plugins. On the one hand, it doesn't have the wealth of
plugins that WordPress or Drupal has. On the other hand, it has a much
more intelligent system for managing dependencies for plugins, and it
has the chance to gain a reputation for high-quality plugins that
really work. It has the chance to do everything the right way.

In the short term, I suppose we must write these plugins ourselves.

   --
   Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

  --
  Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
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: pkContextCMS: the first beta is out!

2009-03-11 Thread Lawrence Krubner



On Mar 11, 6:00 pm, Tom Boutell t...@punkave.com wrote:
 The first beta release of pkContextCMS is out.

 pkContextCMS is a CMS based on Symfony 1.2 and Doctrine.

 Notable features include:

     * Editing takes place “in context.” sfSimpleCMS followed this
 principle for editing slots; we extend it to adding, managing and
 reordering pages
     * Much easier to manage your site in normal cases where the URL
 mirrors the logical structure of the site (but you can still customize
 slugs)
     * Easy version control for the contents of every “slot” (editable
 piece of content)
     * “Areas,” continuous columns in which editors can add a variety
 of slots of different types (managed media slideshows interleaved with
 rich text, for instance)
     * Editing privileges for specific parts of the site can be easily
 assigned to specific users
     * All slot types, including the standard rich text and plaintext
 types, are implemented as Symfony modules with all the flexibility
 that implies
     * New slots can implement custom data storage via Doctrine column
 aggregation inheritance. (English translation: “oooh, cool!”)

 I STRONGLY encourage you to check out the sample project via
 subversion rather than installing the dependencies yourself at this
 stage. But the README covers both options in detail.

 For a more detailed discussion and links to the plugin on the Symfony
 site, please read:

 http://window.punkave.com/2009/03/11/pkcontextcms-a-sneak-preview-for...

This is great, Tom. I'll give it a try this weekend.

Should feedback happen on this mailist, or move to your site?




--~--~-~--~~~---~--~~
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: Model Peer question about default values

2009-03-11 Thread Lawrence Krubner

I'm guessing that if a value is equal to the default value, then the
Model class should assume that this value has never been set before.

Think about it the other way around: how should the Model code
determine when a value has been previously set?

Also, I'm curious, does the default value appear in the form when
you're creating a new entry?

On Mar 11, 6:51 pm, Benjamin agtle...@gmail.com wrote:
 In my schema for a members table I have the default value for country
 set to 223.  The BaseMembers.php class contains a setCountry method.
 This method flags the column as modified if it is not equal to the
 previous value.  It also flags the column as modified if it is equal
 to the default value, even if the value has not been changed.  Why
 would it do this?  This is causing the country field to be updated in
 the update queries when it actually hasn't been changed.  I was able
 to override this by modifing the function and placing it into the
 Members class, but I'm really wondering why it's setup like this.

 /**
  * Set the value of [country] column.
  *
  * @param      int $v new value
  * @return     Members The current object (for fluent API support)
  */
 public function setCountry($v)
 {
     if ($v !== null) {
         $v = (int) $v;
     }

     if ($this-country !== $v || $v === 223) { //  $v === 223 is the
 problem code
         $this-country = $v;
         $this-modifiedColumns[] = MembersPeer::COUNTRY;
     }

     if ($this-aCountries !== null  $this-aCountries-getId() !==
 $v) {
         $this-aCountries = null;
     }

     return $this;

 } // setCountry()
--~--~-~--~~~---~--~~
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: Add values after form submit

2009-03-11 Thread Lawrence Krubner



On Mar 10, 12:58 pm, HAUSa
jeroen_heeft_behoefte_aan_r...@hotmail.com wrote:
 I got a form, in which users can select multiple values for a field
 using sfWidgetFormChoiceMany().

 Now, is it possible to add more values to the submitted array on
 submit? I'm not talking about default values when the form shows, but
 specifically when the form gets submitted. So the default values are
 added afterwards.

If I understand you, then easy enough. In your actions.class.php file,
just alter your executeUpdate method.

I needed to add a date that was one day in the future,as a default
value, so I did this:

  public function executeUpdate($request)
  {
$this-forward404Unless($request-isMethod('post'));

$this-form = new NewNewsForm(NewNewsPeer::retrieveByPk($request-
getParameter('id')));

$submittedValuesArray = $request-getParameter('new_news');
/*
* 03-09-09 - if I do this:
* print_r($submittedValuesArray);
* die( stopped execution );
*
* I get an array like this:
*
* Array ( [title] = Sagisaws beat the Apaches [description] =
*A hard fought game, yesterday, down in Del Ray.
*  [active] = 1 [id] = )
*
*/

if ($submittedValuesArray[id] == ) $submittedValuesArray[date]
= date(Y-m-d h:m:i, time() + 86400);

$this-form-bind($submittedValuesArray);
if ($this-form-isValid())
{
  $new_news = $this-form-save();

  $this-redirect('newnews/edit?id='.$new_news-getId());
}

$this-setTemplate('edit');
  }

--~--~-~--~~~---~--~~
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: Bigger or smaller modules ?

2009-03-10 Thread Lawrence Krubner



On Mar 9, 11:11 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
  I probably caused myself 30 minutes of
  extra work, because I had to set security for each of the 27 modules
  individually, instead of being able to lock them down at the level of
  the app.

 Why couldn't you set it from security.yml of the app level?

Because I only had one app in the entire project, and it included the
public-facing portion of the site - the portion of the site that the
public was suppose to see. If I locked down the app, I'd also be
locking down the project, and I'd be cutting the public off from
seeing what they are suppose to see. I could then go through, one by
one, and open up those modules that the public should see, but that
would cost me about the same delay that doing it the opposite way also
cost me.

--- lawrence








 In the apps/yourapp/config/security.yml you can write

 default:
   security: on

 And that will lock all modules in the app.

 On Tue, Mar 10, 2009 at 4:04 PM, Lawrence Krubner



 lkrub...@geocities.com wrote:

  On Mar 9, 9:05 pm, Patrick Fong patr...@ddns.com.au wrote:
  Hi Guys,

  I'm looking for a bit of guidance in the design on my application, mainly
  how much to place in a particular module. The case that I am currently
  looking at is my user module. As well as the standard, profile, credentials
  etc, my user has preferences  and other properties but I am unsure whether
  or not I should encapsulate crud for all of these user properties through
  one big 'user' module/action or separate them out into separate
  modules/actions 'user_profile', 'user_preferences' etc. Is there any
  standard approach ?

  I've been wondering the same, mostly about apps. Apparenty most
  developers prefer to have 2 apps:  a frontend and a backend. For my
  first two symfony projects, I simply did these as two modules inside
  of one app.

  My current project has 27 database tables, so I created 27 modules. I
  then created 2 extra modules: dashboard for the backend and
  content for the frontend. I then grouped the 27 modules on the
  dashboard. On the dashboard, I probably caused myself 30 minutes of
  extra work, because I had to set security for each of the 27 modules
  individually, instead of being able to lock them down at the level of
  the app. Otherwise, I haven't seen much of a downside to keeping
  everything in one app.

  It would be good to know what is considered best practice in this
  area. One of the main purposes of using framework like CakePHP or
  symfony or Ruby On Rails is to have a project that works like other
  projects. Especially where PHP is concerned, I think most large firms
  are embracing frameworks as a way to escape the anarchy that was
  previously associated with PHP projects.

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
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] what background image do people normally use for sfWidgetFormJqueryDate?

2009-03-10 Thread Lawrence Krubner

I've implemented this widget on a form:

http://www.symfony-project.org/book/forms/1_2/en/A-Widgets#chapter_a_sub_sfwidgetformjquerydate

I am surprised that this doesn't have any background. It is
transparent, and it looks wrong. Check out this screenshot:

http://lawrence.sds5.com/date_widget_looks_wrong.gif

What image do people normally use as a background?


--~--~-~--~~~---~--~~
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: what background image do people normally use for sfWidgetFormJqueryDate?

2009-03-10 Thread Lawrence Krubner



On Mar 10, 2:10 am, Lawrence Krubner lkrub...@geocities.com wrote:
 I've implemented this widget on a form:

 http://www.symfony-project.org/book/forms/1_2/en/A-Widgets#chapter_a_...

 I am surprised that this doesn't have any background. It is
 transparent, and it looks wrong. Check out this screenshot:

 http://lawrence.sds5.com/date_widget_looks_wrong.gif

 What image do people normally use as a background?

Also, on this page:

http://www.symfony-project.org/book/forms/1_2/en/A-Widgets#chapter_a_sub_sfwidgetformjquerydate

This bit of info is offered:

Option  Description
image   The image path to represent the widget (false by default)
config  A JavaScript array that configures the JQuery date widget
culture The user culture


I'm wondering about the array that can be passed to the config of the
date widget? I tried to look up this date widget, but I got too many
results:

http://www.google.com/search?q=JQuery+date+widgetie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a

Where should I look for information?

--~--~-~--~~~---~--~~
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: i can not login, using the simple, built in security that Symfony has be default

2009-03-10 Thread Lawrence Krubner

I figured out what happened.

The damn thing is that the word all repeats itself in the built-in
settings.yml file that comes with Symfony. When you first install your
project, you've got this in your file:

all:
  .settings:
enabled_modules:   [default, sfMediaLibrary]

# Form security secret (CSRF protection)
csrf_secret:   false # Unique secret to enable CSRF
protection or false to disable

# Output escaping settings
escaping_strategy:  false# Determines how
variables are made available to templates. Accepted values: on, off.

#all:
#  .actions:
#error_404_module:   default   # To be called when a 404 error
is raised
#   error_404_action:   error404  # Or when the requested URL
doesn't match any route
#
#login_module:   default   # To be called when a non-
authenticated user
#login_action:   login # Tries to access a secure page
#
#secure_module:  default   # To be called when a user
doesn't have
#secure_action:  secure # The credentials required for an
action



What I did was uncomment the commented part, so now I had the all
repeating twice, and the second one overwrote the first one:


all:
  .settings:
enabled_modules:   [default, sfMediaLibrary]

# Form security secret (CSRF protection)
csrf_secret:   false # Unique secret to enable CSRF
protection or false to disable

# Output escaping settings
escaping_strategy:  false# Determines how
variables are made available to templates. Accepted values: on, off.

all:
  .actions:
error_404_module:   default   # To be called when a 404 error
is raised
   error_404_action:   error404  # Or when the requested URL
doesn't match any route

login_module:   default   # To be called when a non-
authenticated user
login_action:   login # Tries to access a secure page

secure_module:  default   # To be called when a user
doesn't have
secure_action:  secure # The credentials required for an
action


I didn't realize the problem till I tried to go back into
sfMediaLibrary and got this error:

[sfConfigurationException]
The module sfMediaLibrary is not enabled.

The second all is wiping out the line that enables the modules,
including the default module.

This is a stupid way to set up the built-in settings.yml file, in my
opinion.







On Mar 6, 6:06 am, Lawrence Krubner lkrub...@geocities.com wrote:
 On Mar 6, 2:04 am, Sid Bachtiar sid.bacht...@gmail.com wrote:

  No, AFAIK there isn't default login form. You need sfGuardPlugin or
  build your own.

 Where does the login form go? Symfony redirects me to this URL:

 frontend_dev.php/symfony/login

 But where is themodulecalled symfony?

 Symfony is redirecting me from this URL:

 frontend_dev.php/newnews/edit

 I don't want people to reach that URL unless they are logged in. So
 symfony is correctly keeping out of that URL. But it redirects me to
 an unknownmodule.

 I created a loginSuccess.php template and put in the newnewsmodule,
 but that had no effect.



  On Fri, Mar 6, 2009 at 7:59 PM, LawrenceKrubnerlkrub...@geocities.com 
  wrote:

   Check out this screenshot:

  http://lawrence.sds5.com/no_login.gif

   I find this odd. I've got amoduleI want to lock down to people who
   are logged in. I've got this in themodule'sconfig/security.yml:

   read:
    is_secure:   on

   update:
    is_secure:   on

   delete:
    is_secure:   on

   edit:
    is_secure:   on

   all:
    is_secure:  off

   I've got this in the apps settings.yml:

   all:
    .actions:
      error_404_module:       default   # To be called when a 404 error
   is raised
      error_404_action:       error404  # Or when the requested URL
   doesn't match any route

      login_module:           default   # To be called when a non-
   authenticated user
      login_action:           login     # Tries to access a secure page

      secure_module:          default   # To be called when a user
   doesn't have
      secure_action:          secure    # The credentials required for
   an action

   If I go to themodule, I'm told the page is not public. This is
   expected behavior. I then click on the link Proceed to login. What I
   get is what you see in the screenshot. It continues to tell me that
   the page is not public. Shouldn't it offer me a login form? I thought
   there was a default login form built into the defaultmodule?


--~--~-~--~~~---~--~~
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: how do I set a default value for a hidden input?

2009-03-10 Thread Lawrence Krubner



On Mar 9, 12:00 pm, CyrilQ cyril.quin...@gmail.com wrote:
 Hello, i was surprised when reading that setDefault does not exist in
 symfony 1.1.
 I downloaded it and you are right, there is no setDefault on
 sfWidgetSchema class, but i found one in sfForm :

   /**
    * Sets a default value for a form field.
    *
    * @param string $name    The field name
    * @param mixed  $default The default value
    */
   public function setDefault($name, $default)
   {
     $this-defaults[$name] = $default;

     $this-resetFormFields();
   }

 So maybe you should try using $this - setDefault() in your form class
 wich extends sfForm ?


That's interesting. I'll give that a try.

For now, I set a default value in the action, as you can see below. I
needed a date set one day in the future (ial) so I set it up like
this:

  public function executeUpdate($request)
  {
$this-forward404Unless($request-isMethod('post'));

$this-form = new NewNewsForm(NewNewsPeer::retrieveByPk($request-
getParameter('id')));

$submittedValuesArray = $request-getParameter('new_news');
/*
* 03-09-09 - if I do this:
* print_r($submittedValuesArray);
* die( stopped execution );
*
* I get an array like this:
*
* Array (
*[title] = Sagisaws beat the Apaches
*[description] =  A hard fought game, yesterday, down
in Del Ray.
*[active] = 1
*[id] =
* )
*
* This is not the correct way to do this, but I'm going to add the
date here.
* If id is not set, in other words, if we are just creating the entry
for the
* first time, then we add a date.
*/
if ($submittedValuesArray[id] == ) $submittedValuesArray
[date] = date(Y-m-d h:m:i)  + 86400;

$this-form-bind($submittedValuesArray);
if ($this-form-isValid())
{
  $new_news = $this-form-save();

  $this-redirect('newnews/edit?id='.$new_news-getId());
}

$this-setTemplate('edit');
  }












 On Mar 7, 3:26 am, LawrenceKrubnerlkrub...@geocities.com wrote:

I'm using Symfony 1.1.7
--~--~-~--~~~---~--~~
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: how do I set a default value for a hidden input?

2009-03-10 Thread Lawrence Krubner



On Mar 9, 12:00 pm, CyrilQ cyril.quin...@gmail.com wrote:
 Hello, i was surprised when reading that setDefault does not exist in
 symfony 1.1.
 I downloaded it and you are right, there is no setDefault on
 sfWidgetSchema class, but i found one in sfForm :

   /**
    * Sets a default value for a form field.
    *
    * @param string $name    The field name
    * @param mixed  $default The default value
    */
   public function setDefault($name, $default)
   {
     $this-defaults[$name] = $default;

     $this-resetFormFields();
   }

 So maybe you should try using $this - setDefault() in your form class
 wich extends sfForm ?


Okay, I tried this and it works. Damn frustrating that I missed that
in the API.













 On Mar 7, 3:26 am, Lawrence Krubner lkrub...@geocities.com wrote:

  On Mar 6, 7:39 am, Alan Bem alan@gmail.com wrote:

   Look at this example:

   $this-setWidget('referer', new sfWidgetFormInputHidden());
   $this-setDefault('referer',
   sfContext::getInstance()-getRequest()-getReferer());

  Sorry, but that doesn't work. The setDefault method is only
  available in symfony 1.2. I'm trying to figure out how to do this in
  symfony 1.1.7

   On Fri, Mar 6, 2009 at 1:16 PM, Lawrence Krubner 
   lkrub...@geocities.comwrote:

I've tried this:

  $this-widgetSchema['date'] = new sfWidgetFormInputHidden();
  $this-widgetSchema['date']-setDefault(date(Y-m-d h:m:i));

but I get this error:

Fatal error: Call to undefined method
sfWidgetFormInputHidden::setDefault() in /home/lawrence/public_html/
bocahoops/lib/form/NewNewsForm.class.php on line 32

So I tried this:

  $this-widgetSchema['date'] = new sfWidgetFormInputHidden(array(),
array(value, date(Y-m-d h:m:i)));

And that didn't work either.

How do I set a default value on a hidden input?

I'm using Symfony 1.1.7
--~--~-~--~~~---~--~~
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] how do I capture the page a user is going to, so after they log in, I can send them there?

2009-03-10 Thread Lawrence Krubner


If someone tries to go to a secure page, I want to stop them and force
them to login. Once they are logged in, I want to send them to
wherever it was they were trying to go. How do I do this?

I thought I needed to get REQUEST_URI, but I find it is not mentioned
on the Symfony site:

http://www.google.com/search?q=REQUEST_URI+site%3Asymfoy-project.orgie=utf-8oe=utf-8aq=trls=org.mozilla:en-US:officialclient=firefox-a
--~--~-~--~~~---~--~~
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] how to match a new routing rule to an URL?

2009-03-10 Thread Lawrence Krubner


In routing.yml, I tried to make up a new rule:

login_redirect:
  url:   /dashboard/login/originalUri/:redirectUrl
  param: { module: dashboard, action: redirectAfterLogin


I was hoping it would match this  URL:

http://lawrence.sds5.com/bocahoops/web/frontend_dev.php/dashboard/login/originalUri/http://lawrence.sds5.com/bocahoops/web/frontend_dev.php/dashboard/newCoachList

No go.

How is it not matching? I also tried this:

  url:   /dashboard/login/originalUri/*

That is 3 literals that match, and then a match against anything. I
would assume this rule would match against anything that has those 3
literals in it. But no go. Why?

--~--~-~--~~~---~--~~
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] Drop down select boxes are not showing the current value

2009-03-09 Thread Lawrence Krubner

This is worrisome. I'm setting up a site to manage the teams in high
school basketball tournament in Florida. I've got two database tables:

  new_game:
_attributes: { idMethod: native }
id: { type: INTEGER, required: true, autoIncrement: true,
primaryKey: true }
location: { type: INTEGER, foreignTable: new_location,
foreignReference: id, required: true, default: '' }
date: { type: TIMESTAMP, default: '' }
team1: { type: INTEGER, foreignTable: new_team, foreignReference:
id, required: true, default: '' }
team2: { type: INTEGER, foreignTable: new_team, foreignReference:
id, required: true, default: '' }
team1_score: { type: INTEGER, default: '' }
team2_score: { type: INTEGER, default: '' }


  new_team:
_attributes: { idMethod: native }
id: { type: INTEGER, required: true, autoIncrement: true,
primaryKey: true }
teamname: { type: VARCHAR, size: '255' }
teamnumber: { type: INTEGER }
type: { type: VARCHAR, size: '255', required: true, default: '' }


So, as you can see, the game table is suppose to have two fields that
point to the team table. In the form class, both of these are set up
as drop down select boxes:

$this-setWidgets(array(
  'id'  = new sfWidgetFormInputHidden(),
  'location'= new sfWidgetFormInput(),
  'date'= new sfWidgetFormInput(),
  'team1'   = new sfWidgetFormPropelSelect(array('model' =
'NewTeam', 'add_empty' = false)),
  'team2'   = new sfWidgetFormPropelSelect(array('model' =
'NewTeam', 'add_empty' = false)),
  'team1_score' = new sfWidgetFormInput(),
  'team2_score' = new sfWidgetFormInput(),
));

Please note that I'm using Symfony 1.1, so some of the form widgets
from 1.2 are not available to me.

The game table is not showing the current values in the select boxes.
Is this normal behavior? Seems like a bug. For instance, I've one
entry where team1 has a value of 55, and team2 has a value of 145. I
implemented the __toString method in NewTeam, so that the user can see
the names of the teams:

  public function __toString()
  {
$locationList = NewLocationPeer::doSelect(new Criteria());
$arrayOfLocations = array();

foreach ($locationList as $location):
$id = $location-getId();
$name = $location-getName();

$arrayOfLocations[$id] = $name;
endforeach;

return $arrayOfLocations;
  }

Is this the correct way to implement the __toString method? I could
not find an example of how to do this in the docs.

When I'm creating a new entry in the game table, all works well. The
two drop down select boxes give me a list of all the teams. I choose
the names of the 2 teams who are playing the game, and then the ids
for those teams are put in the database. But when I'm editing an
existing entry, the drop down boxes don't show the current values.

For instance, in one entry, the two teams are these:

6th Man Club
The Beacon Group

But in the drop down select boxes, I only see the first team which
always appears:

The Carters
The Carters

What is going on here?
--~--~-~--~~~---~--~~
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: Drop down select boxes are not showing the current value

2009-03-09 Thread Lawrence Krubner



On Mar 9, 9:13 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
 What's your action code like? For editing...


Good question. I haven't changed the code, it is the default generated
by the Propel crud generator:

  public function executeEdit($request)
  {
$this-form = new NewGameForm(NewGamePeer::retrieveByPk($request-
getParameter('id')));
  }


Do I need to implement some magic to get the right values to the drop
down select boxes?




 On Tue, Mar 10, 2009 at 1:52 PM, Lawrence Krubner



 lkrub...@geocities.com wrote:

  This is worrisome. I'm setting up a site to manage the teams in high
  school basketball tournament in Florida. I've got two database tables:

   new_game:
     _attributes: { idMethod: native }
     id: { type: INTEGER, required: true, autoIncrement: true,
  primaryKey: true }
     location: { type: INTEGER, foreignTable: new_location,
  foreignReference: id, required: true, default: '' }
     date: { type: TIMESTAMP, default: '' }
     team1: { type: INTEGER, foreignTable: new_team, foreignReference:
  id, required: true, default: '' }
     team2: { type: INTEGER, foreignTable: new_team, foreignReference:
  id, required: true, default: '' }
     team1_score: { type: INTEGER, default: '' }
     team2_score: { type: INTEGER, default: '' }

   new_team:
     _attributes: { idMethod: native }
     id: { type: INTEGER, required: true, autoIncrement: true,
  primaryKey: true }
     teamname: { type: VARCHAR, size: '255' }
     teamnumber: { type: INTEGER }
     type: { type: VARCHAR, size: '255', required: true, default: '' }

  So, as you can see, the game table is suppose to have two fields that
  point to the team table. In the form class, both of these are set up
  as drop down select boxes:

     $this-setWidgets(array(
       'id'          = new sfWidgetFormInputHidden(),
       'location'    = new sfWidgetFormInput(),
       'date'        = new sfWidgetFormInput(),
       'team1'       = new sfWidgetFormPropelSelect(array('model' =
  'NewTeam', 'add_empty' = false)),
       'team2'       = new sfWidgetFormPropelSelect(array('model' =
  'NewTeam', 'add_empty' = false)),
       'team1_score' = new sfWidgetFormInput(),
       'team2_score' = new sfWidgetFormInput(),
     ));

  Please note that I'm using Symfony 1.1, so some of the form widgets
  from 1.2 are not available to me.

  The game table is not showing the current values in the select boxes.
  Is this normal behavior? Seems like a bug. For instance, I've one
  entry where team1 has a value of 55, and team2 has a value of 145. I
  implemented the __toString method in NewTeam, so that the user can see
  the names of the teams:

   public function __toString()
   {
         $locationList = NewLocationPeer::doSelect(new Criteria());
     $arrayOfLocations = array();

     foreach ($locationList as $location):
                 $id = $location-getId();
                 $name = $location-getName();

                 $arrayOfLocations[$id] = $name;
     endforeach;

     return $arrayOfLocations;
   }

  Is this the correct way to implement the __toString method? I could
  not find an example of how to do this in the docs.

  When I'm creating a new entry in the game table, all works well. The
  two drop down select boxes give me a list of all the teams. I choose
  the names of the 2 teams who are playing the game, and then the ids
  for those teams are put in the database. But when I'm editing an
  existing entry, the drop down boxes don't show the current values.

  For instance, in one entry, the two teams are these:

  6th Man Club
  The Beacon Group

  But in the drop down select boxes, I only see the first team which
  always appears:

  The Carters
  The Carters

  What is going on here?

 --
 Blue Horn Ltd - System Developmenthttp://bluehorn.co.nz
--~--~-~--~~~---~--~~
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: Bigger or smaller modules ?

2009-03-09 Thread Lawrence Krubner



On Mar 9, 9:05 pm, Patrick Fong patr...@ddns.com.au wrote:
 Hi Guys,

 I'm looking for a bit of guidance in the design on my application, mainly
 how much to place in a particular module. The case that I am currently
 looking at is my user module. As well as the standard, profile, credentials
 etc, my user has preferences  and other properties but I am unsure whether
 or not I should encapsulate crud for all of these user properties through
 one big 'user' module/action or separate them out into separate
 modules/actions 'user_profile', 'user_preferences' etc. Is there any
 standard approach ?


I've been wondering the same, mostly about apps. Apparenty most
developers prefer to have 2 apps:  a frontend and a backend. For my
first two symfony projects, I simply did these as two modules inside
of one app.

My current project has 27 database tables, so I created 27 modules. I
then created 2 extra modules: dashboard for the backend and
content for the frontend. I then grouped the 27 modules on the
dashboard. On the dashboard, I probably caused myself 30 minutes of
extra work, because I had to set security for each of the 27 modules
individually, instead of being able to lock them down at the level of
the app. Otherwise, I haven't seen much of a downside to keeping
everything in one app.

It would be good to know what is considered best practice in this
area. One of the main purposes of using framework like CakePHP or
symfony or Ruby On Rails is to have a project that works like other
projects. Especially where PHP is concerned, I think most large firms
are embracing frameworks as a way to escape the anarchy that was
previously associated with PHP projects.





--~--~-~--~~~---~--~~
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] how to I override the core symfony code?

2009-03-08 Thread Lawrence Krubner


I'd like to learn more about sfForm and sfFormPropel. For me, that
means putting print_r() in the code in various places, and changing
the code, breaking things to see how it all fits together. I'd like to
do this for one test project, without endangering the other projects
that are  on the same server.

I just copied sfForm to the lib directory of my dev project, and I
changed the code there, but none of my changes appeared on screen. I
was hoping that the same class, copied to my lib directory, would
override the class declared in the core symfony code. I suppose it is
not so simple.

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



[symfony-users] Re: how to I override the core symfony code?

2009-03-08 Thread Lawrence Krubner



On Mar 8, 7:59 am, Leon van der Ree l...@fun4me.demon.nl wrote:
 Instead of using print_r/var_dump which can be usefull in many
 situations, it probably is wiser to learn to use a debugger (xdebug).
 With Eclipse you can set breakpoints in your code. Wben you request a
 page in your application, eclipse will stop execution at the
 breakpoints to allow you to inspect all variables, step in/out/over
 and allow to execute methods in the watch-view during the break.

 If you then want to modigy behaviour of sfForms you can simply extend
 the sfForm class and instantiate that object instead.

Thanks, but I'm not sure you understood what I'm going for here. I'm
trying to learn how the core symfony code works. I've no interest in
extending sfForms. Rather, I'd like to learn how sfForms works.

(This is partly due to the fact that I've spent the last 2 days trying
to figure out how to set  a default value for a form input, in
symfony 1.1. I'm tempted to hack the core code and add in a method
like setDefault, which they have in syfmony 1.2. But to do that, of
course, I'd have to learn how the core code works.)




--~--~-~--~~~---~--~~
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 won't work, no error messages, what do I do?

2009-03-08 Thread Lawrence Krubner


I must have done something to damage one of my editSuccess forms (for
my NewNews module), since I'm no longer able to create new entries,
nor can I edit old entries. No errors are appearing either.

What do I do?
--~--~-~--~~~---~--~~
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 won't work, no error messages, what do I do?

2009-03-08 Thread Lawrence Krubner



On Mar 8, 8:56 pm, Lawrence Krubner lkrub...@geocities.com wrote:
 I must have done something to damage one of my editSuccess forms (for
 my NewNews module), since I'm no longer able to create new entries,
 nor can I edit old entries. No errors are appearing either.

 What do I do?

This is the form that I have right now. It was generated by the Propel
crud command. I took all the table HTML junk, but other than that, I'm
not aware of making many changes. Can anyone see what I may have
broken?



form action=?php echo url_for('newnews/update'.(!$new_news-isNew
() ? '?id='.$new_news-getId() : '')) ? method=post ?php $form-
isMultipart() and print 'enctype=multipart/form-data ' ?

  ?php echo $form-renderGlobalErrors() ?

  ?php if (!$new_news-isNew()): ?
nbsp;?php echo link_to('Delete', 'newnews/delete?id='.
$new_news-getId(), array('post' = true, 'confirm' = 'Are you
sure?')) ?
  ?php endif; ?

  p?php echo $form['title']-renderLabel() ? br /
  ?php echo $form['title']-renderError() ?
  ?php echo $form['title'] ?
  /p


  p?php echo $form['description']-renderLabel() ?br /
  ?php echo $form['description']-renderError() ?
  ?php echo $form['description'] ?
  /p


  p
  ?php echo $form['active']-renderLabel() ? (do you want
this published?)
  ?php echo $form['active']-renderError() ?
  ?php echo $form['active'] ?
  /p



  p?php echo $form['date']-renderError() ?
  ?php echo $form['date'] ?

?php echo $form['id'] ?

pinput type=submit value=Save //p

/form

--~--~-~--~~~---~--~~
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: what is the best way to enable JQuery in Symfony?

2009-03-08 Thread Lawrence Krubner



On Mar 8, 6:46 am, Lee Bolding l...@leesbian.net wrote:
 On 8 Mar 2009, at 04:52, Lawrence Krubner wrote:

  I didn't want to hard code the path, so I moved it to view.yml:

  all:
   javascripts:
     - /bocahoops/web/js/jquery/jquery-1.3.1.js

 This really isn't rocket science.

 in /apps/app/config/view.yml

 all:
    javascripts: [jquery/jquery-1.3.1.js]

 The path is relative to you web/js dir


Hmm. Okay. I copy and pasted what you have here to /apps/frontend/
config/view.yml.  I still get nothing in layout.php. And I mean, I get
a blank line, no HTML.

Again, I'm trying to avoid setting a value in any action.

For now, I'm using this hack in layout.php:

?php
// 03-06-09 - on the dev server, sfConfig::get('sf_web_dir') 
gave
me /home/lawrence/public_html/bocahoops/web
if (stristr(sfConfig::get('sf_web_dir'), /bocahoops/web)) 
$webDir
= /bocahoops/web;
?
script type=text/javascript src=?php echo $webDir ?/js/jquery/
jquery-1.3.1.js/script


This protects me for when I shift from the dev server to the live
server, and I think this will suffice for now





--~--~-~--~~~---~--~~
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] a plugin to generate Google Sitemaps

2009-03-07 Thread Lawrence Krubner

I haven't been able to find a plugin that generates a Google Sitemap.
(or rather,  sitemap for those search engines that use the format
developed by Google). Is there one?
--~--~-~--~~~---~--~~
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: a plugin to generate Google Sitemaps

2009-03-07 Thread Lawrence Krubner



On Mar 7, 8:42 pm, Sid Bachtiar sid.bacht...@gmail.com wrote:
 I'm looking for it too, to be integrated with sfSimpleBlogPlugin. I
 don't think there is one at the moment.

 On Sun, Mar 8, 2009 at 2:38 PM, LawrenceKrubnerlkrub...@geocities.com wrote:

  I haven't been able to find a plugin that generates a Google Sitemap.
  (or rather,  sitemap for those search engines that use the format
  developed by Google). Is there one?

One of the strengths and weaknesses of Symfony right now seems to be
the lack of plugins. On the one hand, it doesn't have the wealth of
plugins that WordPress or Drupal has. On the other hand, it has a much
more intelligent system for managing dependencies for plugins, and it
has the chance to gain a reputation for high-quality plugins that
really work. It has the chance to do everything the right way.

In the short term, I suppose we must write these plugins ourselves.



--~--~-~--~~~---~--~~
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: what is the best way to enable JQuery in Symfony?

2009-03-07 Thread Lawrence Krubner



On Mar 7, 1:16 am, Ant Cunningham prodigital...@vectrbas-d.com
wrote:
 layout.php is just a wrapper for the the template and contains the
 head section of the html, so all things that are added to the head are
 actually added to layout.php by the include_metas() call. so if in
 apps/applicationname/config/view.yml you do:

 all:
    javascript:
      - file1
      - file2

 Then those javascripts will be added to all the views in the
 application. Likewise if you do that in
 apps/applicationname/modulename/config/view.yml, then it will happen for
 all the action views (templates) in that particular module.

 The unless you define an absolute path then the file will be assumed to
 live web/javascript so th definitions above would have
 /javascript/file1.js and /javascript/file2.js as their src attribute.
 But not we are talking about the absolute path on the webserver not in
 the filesystem.

 if you need to add something programticaly on the fly like a stylesheet
 or javascript there are helpers for that in addition to manually
 manipulating the sfWebResponse object directly. No matter how you go
 about it though the result is the same - ie. the resource added to the
 head section of the document.


Well, I've tried everything and I've been unable to make this work.
The documentation seems to want me to set a variable in an action, and
that is what I'm trying to avoid. Ideally I could set a path in
view.yml and then echo it to the screen in layout.php. But I haven't
figured out any way to do this, without setting a variable in the
action.

What I had in layout.php was this:

script type=text/javascript src=/bocahoops/web/js/jquery/
jquery-1.3.1.js/script

I didn't want to hard code the path, so I moved it to view.yml:

all:
  javascripts:
- /bocahoops/web/js/jquery/jquery-1.3.1.js


Then I put this in layout.php:

?php use_javascript('jquery-1.3.1.js') ?


I get nothing. I have to assume that the code expects me to set a
variable in the action. But I've almost 100 actions in this project so
far. I'm not going to set this variable in 100 different actions, that
would actually be a worse outcome than simply hard coding the path.

For now, I've gone back to hard coding the tag in layout.php:

script type=text/javascript src=/bocahoops/web/js/jquery/
jquery-1.3.1.js/script

I am curious how to get access to the variables in view.yml. Are they
ever stored in sfView, even if they are not set in an action?

By the way, I'm using symfony 1.1.7
--~--~-~--~~~---~--~~
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 Production Performance improvements

2009-03-07 Thread Lawrence Krubner



On Mar 7, 2:06 am, Gareth McCumskey gmccums...@gmail.com wrote:
 Greetings all,

 We have recently released a project we have been working on for some months
 now as an Alpha version and while we have focussed primarily on bug fixing
 as well as feature completion for the next Alpha release coming up in a
 week, I can't help but notice something disconcerting.

 The project we have developed is a replacement of an existing product. The
 previous version, coded before my time at the company, is old, procedural
 and uses a very inefficient, un-normalised database structure.

 For our new version, we decided to use symfony for maintainability reasons
 as well as the fact that this version will be a lot more complex than its
 predecessor so symfony's ability to simplify the development helps us
 immensely.

 The problem I have noticed is that the new symfony version seems to be
 performing ... well ... badly. Loading pages on the new version takes a lot
 longer, talkin 10-50 times longer than the previous version. I went so far
 as to view the development logs and manually run SQL queries on our new
 normalised database schema vs the old version un-normalised version and the
 new schema performs batter by a factor of 100x so I know that it is
 definitely not the database slowing things down.

I'm surprised you got a speed boost by normalizing the database. It is
often the other way around. The perfectly normalized database tends to
require a lot of JOIN statements. A small degree of de-normalization
can greatly improve performance. Of course, the great risk of de-
normalization is that you are storing redundant data, and you may
eventually end up with a situation where data in table A is different
than data in table B, for a field that is suppose to hold identical
data.

It's rare to hear of a speed boost coming from normalizing.




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



  1   2   >