Re: [symfony-users] How to enable twig extensions included in symfony2 sandbox?

2011-02-02 Thread stof
On Tue, 1 Feb 2011 17:31:29 -0800 (PST), Oleg 
wrote:
> Hello,
> 
> I'm trying to use 'truncate' twig filter like this:
> 
> {{ category|upper|truncate(20) }}
> 
> But instead I get an error "The filter "truncate" does not exist". I
> see that this filter is defined in twig.xml resource of TwigBundle
> bundle:
> 
>  class="Twig_Extensions_Extension_Text" public="false" />
> 
> But apparently I also need to somehow turn it on. How can I do that?
> 
> Thanks,
> Oleg

You can enable this extension in the twig configuration:

twig.config:
   extensions: [twig.extension.text]

If you want to enable other twig extensions (debug for example) just add
the service id in this array.

Regards
-- 
Christophe | Stof

-- 
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] setFlash not working !!!

2011-02-02 Thread charanjeet
Hi all,

setFlash is working prefectly fine on staging server but not on live
though all the configuration is exactly same.
use_flash is set to true. Please let me know what all are possible
reasons...

Thanks
Charanajeet Kaur

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] setFlash not working !!!

2011-02-02 Thread Gareth McCumskey
Did you clear cache?

On Wed, Feb 2, 2011 at 11:18 AM, charanjeet wrote:

> Hi all,
>
> setFlash is working prefectly fine on staging server but not on live
> though all the configuration is exactly same.
> use_flash is set to true. Please let me know what all are possible
> reasons...
>
> Thanks
> Charanajeet Kaur
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] setFlash not working !!!

2011-02-02 Thread charanjeet kaur
yes i did. still not working !


Regards
Charanjeet Kaur
--

On Wed, Feb 2, 2011 at 2:58 PM, Gareth McCumskey wrote:

> Did you clear cache?
>
>
> On Wed, Feb 2, 2011 at 11:18 AM, charanjeet wrote:
>
>> Hi all,
>>
>> setFlash is working prefectly fine on staging server but not on live
>> though all the configuration is exactly same.
>> use_flash is set to true. Please let me know what all are possible
>> reasons...
>>
>> Thanks
>> Charanajeet Kaur
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>>
>
>
>
> --
> Gareth McCumskey
> http://garethmccumskey.blogspot.com
> twitter: @garethmcc
> identi.ca: @garethmcc
>
>  --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Two Doctrine connection problems - Memcache and Postgresql

2011-02-02 Thread Michał Piotrowski
Hi,

I've got a problems hmm.. in fact, I do not know where :)

Ok, on my machine everything works perfectly fine. Problems arise when
I try to use PostgreSQL and memcached on test server. I do not have
access to server configuration, so hard for me at this moment to tell
anything about that - I'll ask the administrators if you need any
information.

I know that it will resemble a crystal ball predicting :)

Memcache problem

PHP Fatal error:  Uncaught exception 'Doctrine_Cache_Exception' with
message 'In order to use Memcache driver, the memcache extension must
be loaded.' in 
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Cache/Memcache.php:49
Stack trace:
#0 /home/imsoft/e-most/config/ProjectConfiguration.class.php(33):
Doctrine_Cache_Memcache->__construct(Array)
#1 
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php(58):
ProjectConfiguration->configureDoctrine(Object(Doctrine_Manager))
#2 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfPluginConfiguration.class.php(47):
sfDoctrinePluginConfiguration->initialize()
#3 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php(91):
sfPluginConfiguration->__construct(Object(ProjectConfiguration),
'/home/imsoft/e-...', 'sfDoctrinePlugi...')
#4 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php(62):
sfProjectConfiguration->loadPlug in
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Cache/Memcache.php
on line 49

Fatal error: Uncaught exception 'Doctrine_Cache_Exception' with
message 'In order to use Memcache driver, the memcache extension must
be loaded.' in 
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Cache/Memcache.php:49
Stack trace:
#0 /home/imsoft/e-most/config/ProjectConfiguration.class.php(33):
Doctrine_Cache_Memcache->__construct(Array)
#1 
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/config/sfDoctrinePluginConfiguration.class.php(58):
ProjectConfiguration->configureDoctrine(Object(Doctrine_Manager))
#2 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfPluginConfiguration.class.php(47):
sfDoctrinePluginConfiguration->initialize()
#3 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php(91):
sfPluginConfiguration->__construct(Object(ProjectConfiguration),
'/home/imsoft/e-...', 'sfDoctrinePlugi...')
#4 
/home/imsoft/e-most/lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php(62):
sfProjectConfiguration->loadPlug in
/home/imsoft/e-most/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Cache/Memcache.php
on line 49

When I disable memcache in
config/ProjectConfiguration.class.php:configureDoctrine()

  public function configureDoctrine(Doctrine_Manager $manager)
  {
$servers = array(
  'host' => 'localhost',
  'port' => 11213,
  'persistent' => true
);

$cacheDriver = new Doctrine_Cache_Memcache(array(
  'servers' => $servers,
  'compression' => false
));

$manager->setAttribute(Doctrine::ATTR_RESULT_CACHE, $cacheDriver);
  }

I see this error:

You must have memcache installed and enabled to use sfMemcacheCache class.

factories

  view_cache:
class: sfMemcacheCache
param:
  lifetime: 86400
  prefix:   emost
  servers:
localhost:
  host: localhost
  post: 11213

BTW. I use this patch temporarily

diff --git a/lib/vendor/symfony/lib/cache/sfMemcacheCache.class.php
b/lib/vendor/symfony/lib/cache/sfMemcacheCache.class.php
index 734206d..8f2dffd 100644
--- a/lib/vendor/symfony/lib/cache/sfMemcacheCache.class.php
+++ b/lib/vendor/symfony/lib/cache/sfMemcacheCache.class.php
@@ -59,7 +59,7 @@ class sfMemcacheCache extends sfCache
   {
 foreach ($this->getOption('servers') as $server)
 {
-  $port = isset($server['port']) ? $server['port'] : 11211;
+  $port = isset($server['port']) ? $server['port'] : 11213;
   if (!$this->memcache->addServer($server['host'], $port,
isset($server['persistent']) ? $server['persistent'] : true))
   {
 throw new sfInitializationException(sprintf('Unable to
add this memcache server (%s:%s).', $server['host'], $port));



AFAICT both php-pecl-memcache and php-pecl-memcached are installed.

Simple memcache test script connects to memcache server

connect('localhost', 11213) or die ("Could not connect");

$version = $memcache->getVersion();
echo "Server's version: ".$version."\n";

$tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123;

$memcache->set('key', $tmp_object, false, 10) or die ("Failed to save
data at the server");
echo "Store data in the cache (data will expire in 10 seconds)\n";

$get_result = $memcache->get('key');
echo "Data from the cache:\n";

var_dump($get_result);
?>

so m

[symfony-users] Re: [doctrine-user] Re: Two Doctrine connection problems - Memcache and Postgresql

2011-02-02 Thread Michał Piotrowski
2011/2/2 Miha Vrhovnik :
> In memcache it's typo in a config: post: 11213 should be port: 11213.

Indeed. But, after fixing typo, the problem remained.

It's all by the fact that I created problem - typo, I have not noticed
this and I created workaround
- patch for the framework for the bug that I created :) LOL

> Regarding the postgres it's postgres misconfiguration. add folloving line
> into pg_hba.conf if not yet present
> host    all all 127.0.0.1/32 md5

Ok, I will send this information to the administrators.

Thanks for your help!

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



-- 
Best regards,
Michal

http://eventhorizon.pl/

-- 
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] Form widget value depends on user input

2011-02-02 Thread Apul Gupta
I would like to know if i can populate a dropdown value using another
drop down value.

Suppose there are 2 dropdowns, one for Author & another for Books. I
want to select author & its related books should come to Books
dropdown.

I am currently doing this using ajax,

On changing the author dropdown, i am firing an event to get list of
related books to populate the Books Dropdown. All is fine till here.
but, Suppose, If I submit the form & it fails due to some validation
errors, Values of Books doesn't preserve.

I can do this by checking the current value of Author to get the list
of Books again on page load but, how can I get the selected book?
That's the question.

Please help.

-- 
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: setFlash not working !!!

2011-02-02 Thread Gabriel Petchesi
Other variables stored in the user session (not flash) work correctly?
If not it's a problem with session saving on the server level.
Also check if you do not do two or more redirects/requests thus eliminating 
the flash message from the session.

gabriel

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: [doctrine-user] Re: Two Doctrine connection problems - Memcache and Postgresql

2011-02-02 Thread Michał Piotrowski
2011/2/2 Miha Vrhovnik :
> In memcache it's typo in a config: post: 11213 should be port: 11213.
> Regarding the postgres it's postgres misconfiguration. add folloving line
> into pg_hba.conf if not yet present
> host    all all 127.0.0.1/32 md5

Unfortunately, adding this entry does not solve the problem for me.

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



-- 
Best regards,
Michal

http://eventhorizon.pl/

-- 
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] Plugin Install

2011-02-02 Thread Ravi Kotwani
Hello All,

As i am a beginer in symfony. Can any one tell me the steps to use the
csv import export plugin.

Thankx.

-- 
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: setFlash not working !!!

2011-02-02 Thread Markus
I might have a similar problem! I use the UserBundle for
Authentication/Authorisation;
it works perfectly fine on my development machine (win 7)  but it does
not work at all
at my server (ubuntu) even though i made sure that the configuration
(especially the
php session) is as close as possible.
Investigating a bit i found that the session files are created but are
empty; Since the
flash messages are also stored in the session it could be the same
cause...

Have you checked looking at the session files?

Kind Regards,

Markus

On 2 Feb., 10:18, charanjeet  wrote:
> Hi all,
>
> setFlash is working prefectly fine on staging server but not on live
> though all the configuration is exactly same.
> use_flash is set to true. Please let me know what all are possible
> reasons...
>
> Thanks
> Charanajeet Kaur

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread Alexander Kachkaev
Christophe, thank you for the advice!

But what about the console? As far as I understand I am not able to
use all the benefits of the custom mapping type until I have generated
the entities and the DB schema. And, of course, this requires the type
to be registered as well.

The must be a universal solution, and I hope that it will be added to
the Symfony documentation.

On Feb 1, 9:09 pm, Christophe COEVOET  wrote:
> Le 01/02/2011 20:04, Alexander Kachkaev a crit :
>
>
>
> > Hello, guys!
>
> > Does anyone know how to integrate a custom doctrine mapping type into
> > a Symfony 2 project?
>
> > There is a great documentation on how to do that simply using Doctrine
> > (http://www.doctrine-project.org/docs/dbal/2.0/en/reference/
> > types.html#custom-mapping-types), but there is no information on the
> > web about how to migrate the registration of the type into Symfony.
>
> > It is said that to register a type it is necessary to write the
> > following:
> > Type::addType('money', 'My\Project\Types\MoneyType');
> > $conn->getDatabasePlatform()->registerDoctrineTypeMapping('MyMoney',
> > 'money');
>
> > These lines must be written somewhere in a bootstrap code, e. i. src/
> > autoload.php to make the type available both from controllers and
> > console. The key issue here is in the second line, which requires the
> > connection to be defined. To get it a $entityManager->getConnection()
> > can be called, and EntityManager can be taken from $this-
> >> get('doctrine.orm.entity_manager') if we are in the controller.
> > But how to get the reference to the EntityManager or any other
> > resource object outside the controller (e. g. autoload.php)?
>
> A solution is to make that in the boot() method of your bundle. this
> way, it will be done after the building of the container (so you can
> access the connection) but before you use it.
>
> --
> Christophe | Stof

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread Alexander Kachkaev
I guess there might be some global handler for all the resources. Thus
the link to entity manager object could be extracted in autoload.php
and everything would be fine. But I am not sure about this
hypothesis. :)

On Feb 1, 9:09 pm, Christophe COEVOET  wrote:
> Le 01/02/2011 20:04, Alexander Kachkaev a crit :
>
>
>
> > Hello, guys!
>
> > Does anyone know how to integrate a custom doctrine mapping type into
> > a Symfony 2 project?
>
> > There is a great documentation on how to do that simply using Doctrine
> > (http://www.doctrine-project.org/docs/dbal/2.0/en/reference/
> > types.html#custom-mapping-types), but there is no information on the
> > web about how to migrate the registration of the type into Symfony.
>
> > It is said that to register a type it is necessary to write the
> > following:
> > Type::addType('money', 'My\Project\Types\MoneyType');
> > $conn->getDatabasePlatform()->registerDoctrineTypeMapping('MyMoney',
> > 'money');
>
> > These lines must be written somewhere in a bootstrap code, e. i. src/
> > autoload.php to make the type available both from controllers and
> > console. The key issue here is in the second line, which requires the
> > connection to be defined. To get it a $entityManager->getConnection()
> > can be called, and EntityManager can be taken from $this-
> >> get('doctrine.orm.entity_manager') if we are in the controller.
> > But how to get the reference to the EntityManager or any other
> > resource object outside the controller (e. g. autoload.php)?
>
> A solution is to make that in the boot() method of your bundle. this
> way, it will be done after the building of the container (so you can
> access the connection) but before you use it.
>
> --
> Christophe | Stof

-- 
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: setFlash not working !!!

2011-02-02 Thread Markus
I might have a similar problem! I use the UserBundle for
Authentication/Authorisation;
it works perfectly fine on my development machine (win 7)  but it does
not work at all
at my server (ubuntu) even though i made sure that the configuration
(especially the
php session) is as close as possible.
Investigating a bit i found that the session files are created but are
empty; Since the
flash messages are also stored in the session it could be the same
cause...

Have you checked looking at the session files?

Kind Regards,

Markus

On 2 Feb., 10:18, charanjeet  wrote:
> Hi all,
>
> setFlash is working prefectly fine on staging server but not on live
> though all the configuration is exactly same.
> use_flash is set to true. Please let me know what all are possible
> reasons...
>
> Thanks
> Charanajeet Kaur

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: trouble writing a dql query

2011-02-02 Thread Alan Bem
You can add that missing relation in config/doctrine/schema.yml

2011/1/31 Manu 

> Can I use SQL instead of DQL ?
>
> --
> 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
>



-- 
Pozdrawiam,
Alan Bem

Profil na GoldenLine.pl 


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] [SYMFONY 2] Session data is not saved

2011-02-02 Thread Markus
I'm tinkering around with an app that uses the UserBundle for
authorisation/authentication. Everything works fine locally
(Windows7 / XAMPP) but when i put it on the server the login doesn't
work at all. According to the debug log the authentication is
happening and successfull, but then i get redirected again to the
login page because of missing authentication token. After a lot of
searching I figured out that the session isn't saved - at least not in
the session files. Session files are created but they are empty...

Does anybody have the same problem? I'm speculating that the PHP
version of the Server (5.3.2-1) might have something to do with it and
it's not a symfony 2 bug. But i couldn't find information about
similar problems with this version of php  yet. Unfortunately i also
cannot upgrade the PHP on the server.
Or does anybody have any idea on how to verify that the destructor in
the session object is called at all?

Thanks,

Markus

-- 
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: Check.php date.timezone how to change it

2011-02-02 Thread Stevewa
thank you. (i think?. I don't know if you were being helpful or making
fun of my newbie-ness by saying check.php does not replace apache
documentation. I was just trying to post a helpful remark to others
who may have had the same problem. if you were being nice, then i
apologize for not understanding your tone of voice.)

-- 
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: Quick Tour Tutorial, wish to rename sandbox folder

2011-02-02 Thread Stevewa
the rename did not break it for me on ubuntu. in fact i just made an
apache2 file to map the hostname to the proper folder, and everything
just worked. exciting!

-- 
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] [Symfony2] need sample use FileField to file upload

2011-02-02 Thread stfalcon
In my symfony2 sample project https://github.com/stfalcon/portfolio I
need upload screenshots to projects.
I try use FileField and debug him. But can't get it to work...

I found no examples or docs of its use. Somebody used FileField in
form to file upload? It's working?

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread stof
On Tue, 1 Feb 2011 16:14:58 -0800 (PST), Alexander Kachkaev
 wrote:
> I guess there might be some global handler for all the resources. Thus
> the link to entity manager object could be extracted in autoload.php
> and everything would be fine. But I am not sure about this
> hypothesis. :)
> 

No, it can't be done in autoload.php. The autoload file is required at the
very beginning of the request. At this time, even the kernel does not exist
so you cannot access any service as they don't exist.

-- 
Christophe | Stof

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread stof
On Tue, 1 Feb 2011 14:56:40 -0800 (PST), Alexander Kachkaev
 wrote:
> Christophe, thank you for the advice!
> 
> But what about the console? As far as I understand I am not able to
> use all the benefits of the custom mapping type until I have generated
> the entities and the DB schema. And, of course, this requires the type
> to be registered as well.
> 
> The must be a universal solution, and I hope that it will be added to
> the Symfony documentation.
> 

The console also boots the bundles. So this will work in the console too.

-- 
Christophe | Stof

-- 
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: Encoder error after login

2011-02-02 Thread Justin Fortier
Thanks Doug that worked for me!

On Jan 13, 12:45 pm, Douglas  wrote:
> Hi there
>
> Instead of:
>
>   encoder:
>     Symfony\Component\Security\User\User: plaintext
>
> try:
>
>   encoder:
>     class: Symfony\Component\Security\User\User
>     algorithm: plaintext
>
> Douglas
>
> On Jan 13, 9:14 am, Duffman  wrote:
>
> > After login i get the error-message:
>
> > Uncaught exception 'RuntimeException' with message 'Each encoder needs
> > an account class.
>
> > My config:
>
> > security.config:
> >   encoder:
> >     Symfony\Component\Security\User\User: plaintext
> >   providers:
> >     main:
> >       users:
> >         florian: { password: test, roles: ROLE_USER }
> >   firewalls:
> >     login: { pattern: /login, security: true, anonymous: true }
> >     login_check: { pattern: /login_check, security: true, anonymous:
> > true, form_login: true }
> >     profiler: { pattern: /_profiler.*, security: true, anonymous:
> > true }
> >     main:
> >       pattern:    /backend
> >       form_login: { check_path: /login_check }
> >       logout:     { path: /logout, target: /login }
> >       anonymous:  true
> >   access_control:
> >     - { path: /login, role: IS_AUTHENTICATED_ANONYMOUSLY }
> >     - { path: /login_check, role: IS_AUTHENTICATED_ANONYMOUSLY }
> >     - { path: .*, role: [ ROLE_USER, IS_AUTHENTICATED_ANONYMOUSLY ] }
>
> > any ideas?
>
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] [Symfony2] need sample use FileField to file upload

2011-02-02 Thread Gábor Fási
Your form is missing the enctype attribute.

On Wed, Feb 2, 2011 at 16:04, stfalcon  wrote:
> In my symfony2 sample project https://github.com/stfalcon/portfolio I
> need upload screenshots to projects.
> I try use FileField and debug him. But can't get it to work...
>
> I found no examples or docs of its use. Somebody used FileField in
> form to file upload? It's working?
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Re: Session data is not saved

2011-02-02 Thread Markus
In the time it took for the posting to be published I realized that i
was wrong - when i use the app without login there is some session
data
saved (default language, ...). But with login still nothing is saved.

Here's an excerpt from the log. One can clearly see that it performs
the
authentication and then writes to session only to not find the token
later.

2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Bundle\FrameworkBundle
\RequestListener::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 INFO: Matched route
"_security_check" (parameters:
{"_controller":"fos_user.controller.security:loginAction","_route":"_security_check"})
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Bundle\FrameworkBundle\HttpFoundation
\SessionListener::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Component\Security\Http
\Firewall::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\ChannelListener::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\ContextListener::read" (notifyUntil)
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\LogoutListener::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\UsernamePasswordFormAuthenticationListener::handle" (notifyUntil)
2011-02-02T10:05:06+01:00 INFO: SELECT t0.username AS username1,
t0.username_canonical AS username_canonical2, t0.email AS email3,
t0.email_canonical AS email_canonical4, t0.enabled AS enabled5,
t0.algorithm AS algorithm6, t0.salt AS salt7, t0.password AS
password8, t0.created_at AS created_at9, t0.updated_at AS
updated_at10, t0.last_login AS last_login11, t0.locked AS locked12,
t0.expired AS expired13, t0.expires_at AS expires_at14,
t0.confirmation_token AS confirmation_token15,
t0.password_requested_at AS password_requested_at16, t0.roles AS
roles17, t0.credentials_expired AS credentials_expired18,
t0.credentials_expire_at AS credentials_expire_at19, t0.id AS id20,
t0.contact_id AS contact_id21 FROM User t0 WHERE t0.username_canonical
= ? (["moehler"])
2011-02-02T10:05:07+01:00 INFO: SELECT t0.name AS name1, t0.roles AS
roles2, t0.id AS id3 FROM fos_user_group t0 INNER JOIN
fos_user_user_group ON t0.id = fos_user_user_group.group_id WHERE
fos_user_user_group.user_id = ? ([4])
2011-02-02T10:05:07+01:00 DEBUG: User has been authenticated
successfully
2011-02-02T10:05:07+01:00 DEBUG: Listener "Symfony\Component\Security
\Http\Firewall\UsernamePasswordFormAuthenticationListener::handle"
processed the event "core.security"
2011-02-02T10:05:07+01:00 DEBUG: Listener "Symfony\Component\Security
\Http\Firewall\AccessListener::handle" was not called for event
"core.security"
2011-02-02T10:05:07+01:00 DEBUG: Listener "Symfony\Component\Security
\Http\Firewall::handle" processed the event "core.request"
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.response" to
listener "Symfony\Component\HttpKernel
\ResponseListener::filter" (filter)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.response" to
listener "Symfony\Bundle\FrameworkBundle\HttpFoundation
\SessionListener::filter" (filter)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.response" to
listener "Symfony\Component\Security\Http\Firewall
\ContextListener::write" (filter)
2011-02-02T10:05:07+01:00 DEBUG: Write SecurityContext in the session
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Bundle\FrameworkBundle
\RequestListener::handle" (notifyUntil)
2011-02-02T10:05:07+01:00 INFO: Matched route
"extranet_dashboard" (parameters: {"_controller":"Application\
\ExtranetBundle\\Controller\
\DashboardController::indexAction","_route":"extranet_dashboard"})
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Bundle\FrameworkBundle\HttpFoundation
\SessionListener::handle" (notifyUntil)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.request" to
listener "Symfony\Component\Security\Http
\Firewall::handle" (notifyUntil)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\ChannelListener::handle" (notifyUntil)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\ContextListener::read" (notifyUntil)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\LogoutListener::handle" (notifyUntil)
2011-02-02T10:05:07+01:00 DEBUG: Notified event "core.security" to
listener "Symfony\Component\Security\Http\Firewall
\UsernamePasswordFormAuthenticationListener::handle" (notifyUntil)
2011-02-02T10:

[symfony-users] Re: Symfony2 + Doctrine MongoDB : can't createQuery()

2011-02-02 Thread Adrien Mogenet
Using createBuilder() gave me a missing Hydrator class exception.
I had to add this into my config.yml :

doctrine_odm.mongodb:
auto_generate_hydrator_classes: true

On 1 fév, 21:47, Adrien Mogenet  wrote:
> Well, when I see "it works", I should say "it doesn't throw any
> error", because this code does not retrieve any row.
>
> On 1 fév, 21:37, Adrien Mogenet  wrote:
>
>
>
>
>
>
>
> > G'd evening,
> > Still learning Symfony2... with MongoDB ORM. I can store new records,
> > but when I try to retrieve my rows :
>
> >     $dm = $this->get('doctrine.odm.mongodb.document_manager');
> >     $dm->createQuery(...);
>
> > I got a "Class has no method" error. However :
>
> >     $query = $dm->createQueryBuilder('EbBundle:Snippet');
> >     $snippets = $query->find();
>
> > does work. Is it normal ? In DocumentManager class, I can see that
> > there is effectively no createQuery() method...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Re: Doctrine 2 custom mapping type in Symfony 2

2011-02-02 Thread Christophe COEVOET

Le 02/02/2011 17:52, stof a écrit :

On Tue, 1 Feb 2011 16:14:58 -0800 (PST), Alexander Kachkaev
  wrote:

I guess there might be some global handler for all the resources. Thus
the link to entity manager object could be extracted in autoload.php
and everything would be fine. But I am not sure about this
hypothesis. :)


No, it can't be done in autoload.php. The autoload file is required at the
very beginning of the request. At this time, even the kernel does not exist
so you cannot access any service as they don't exist.

I just found a way to register new type through the configuration file. 
This is the way to do it in YAML:


doctrine.dbal:
types:
 custom: My\Custom\Type\Class

--
Christophe | Stof

--
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: [Symfony2] need sample use FileField to file upload

2011-02-02 Thread stfalcon
I've not commited the code where I try to use the attribute because it
doesn't really make any difference.

Here is what I did: first I added enctype attribute to form in Project/
create.html.php and added the FileField element to Application
\PortfolioBundle\Form\Project in the configure() method:

$this->add(new FileField('image', array(
'secret' => md5('blablabla';

After that I added files data to $form->bind() in createAction() on
ProjectController

$form->bind($this->get('request')->request->get($form-
>getName()),
$this->get('request')->files->get($form-
>getName()));

After that I created method setImage($image) in Project entity. But
$image is null... I try debug and think thas problem in files params
to bind.

Just one simple question with no connetion to my specific problem: can
anyone confirm this functionality is actually working or were there
any problems? Thanks!

On 2 Лют, 20:37, Gábor Fási  wrote:
> Your form is missing the enctype attribute.
>
>
>
>
>
>
>
> On Wed, Feb 2, 2011 at 16:04, stfalcon  wrote:
> > In my symfony2 sample projecthttps://github.com/stfalcon/portfolioI
> > need upload screenshots to projects.
> > I try use FileField and debug him. But can't get it to work...
>
> > I found no examples or docs of its use. Somebody used FileField in
> > form to file upload? It's working?
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to 
> > security at symfony-project.com
>
> > You received this message because you are subscribed to the Google
> > Groups "symfony users" group.
> > To post to this group, send email to symfony-users@googlegroups.com
> > To unsubscribe from this group, send email to
> > symfony-users+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


Re: [symfony-users] Plugin Install

2011-02-02 Thread Alex Pilon
http://www.symfony-project.org/plugins/sfCsvPlugin this?

Click read me...

On Wed, Feb 2, 2011 at 05:17, Ravi Kotwani  wrote:

> Hello All,
>
> As i am a beginer in symfony. Can any one tell me the steps to use the
> csv import export plugin.
>
> Thankx.
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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


[symfony-users] Desactivate Twig auto escaping ?

2011-02-02 Thread Christophe Beyer
Hello,

How can I desactivate the Twig auto escaping ?

Thanks !



-- 
Christophe


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