[symfony-users] Mutiple databases and different propel.ini with sfPropel15Plugin?

2011-01-17 Thread Christian Hammers
Hello

I'm using Symfony 1.3 and sfPropel15Plugin with two database connections,
one to MySQL and one to Oracel. They are already configured in 
config/database.yml and I also already have my schema.xml.

Now "./symfony propel:build-model" insists on having a config/propel.ini
even if I specify "--connection=my_mysql" although that cannot work as
I have to specify the database driver (redundantly) in the propel.ini as
well.

Do I have to symlink the propel.ini for each model generation or is there
a more elegant way?

bye,

-christian-


-- 
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] sfForm getValidatorSchema()->setPreValidator() documentation

2011-01-17 Thread Gareth McCumskey
A quick google search for "symfony prevalidator":

http://www.symfony-project.org/forms/1_2/en/02-Form-Validation#chapter_02_global_validators

On Fri, Jan 7, 2011 at 9:39 PM, neanlos  wrote:

> Anyone has documentation about sfForm getValidatorSchema()-
> >setPreValidator() mentioned in the article
> http://www.symfony-project.org/gentle-introduction/1_4/en/10-Forms?
>
> --
> 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] Avoid duplicate insertion in Propel

2011-01-17 Thread Gareth McCumskey
Check if it exists first with a doCount

On Tue, Jan 18, 2011 at 7:05 AM, Imran  wrote:

> Hi folks,
>
> Is there any way to avoid the duplicate insertion in Propel?
>
>
> Thanks
>
> -Imran
>
> --
> 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] Get all logged in users

2011-01-17 Thread Gareth McCumskey
They use socket connections more than likely. Thats the other alternative
you can use but does mean setting up a socket server.

One caveat with the technique I mentioned ... If your application gets
really busy you will have a lot of traffic happening between client and
server.

On Tue, Jan 18, 2011 at 9:16 AM, Srivatsa Prasad wrote:

> Hi,
>
> That should do the trick for me.
>
> I wonder how gmail or facebook do this.
>
>
> On Tue, Jan 18, 2011 at 12:38 PM, Gareth McCumskey 
> wrote:
>
>> The best you can do is try to use javascript to catch an event of the
>> person leaving the page (http://api.jquery.com/unload/). the problem as
>> that link suggests is that its also browser dependant. Some browsers
>> implement only parts of that event. For example, some browsers do not fire
>> the unload event on browser closing but do on changing url in the tab etc.
>> Its a very tricky thing to do.
>>
>> The best way I can think of is have a periodic ajax request fire every 1
>> minute or or so. This ajax event updates the users "last active" time. All
>> other users IM client can then update the currently online people to be
>> those whose last active time was updated in the last minute. In other words,
>> if I am a user who has a list of currently logged in people, and my friend
>> has his browser open, he sees me online. My browser is regularly sending the
>> a small ajax request to the server telling it that at time now I am online.
>> My friends browser checks to see who is online every minute as well. I close
>> my browser and now my last active time is not being changed. My friends
>> browser gets the list of people online and sees that my last active time is
>> now longer than a minute ago therefore I must be offline.
>>
>>
>> On Tue, Jan 18, 2011 at 8:19 AM, Srivatsa Prasad 
>> wrote:
>>
>>> Hi,
>>>
>>> Thank you for the response.
>>>
>>> The scenario u mentioned below, I see one issue, which cannot be handled.
>>>
>>> I think of using the database to see who are all the logged in users, i
>>> do it at the time when they log-in. I can mark them as logged out if they
>>> log out,
>>>
>>> The problems i foresee are,
>>> 1 The user session doesn't expire since the page makes a request in a
>>> certain interval. I don't mind if the session doesn't expire.
>>> 2 The other issue is if the user closes the browser or the user losses
>>> connectivity, i am not sure how to handle this situation , how to notify
>>> other users that an other user has logged out ?
>>>
>>> If u could give me some idea on the 2nd issue, i will take it further .
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Jan 17, 2011 at 5:50 PM, Gareth McCumskey 
>>> wrote:
>>>
 This is very commonly asked and the simple answer is  its rather
 difficult.

 Its difficult because when someone logs into an application, this fact
 is stored server-side where all the PHP code exists. Lets consider a
 scenario. You have an application to which people need to log into. Your
 session timeout (i.e. how long you allow someone to stay logged in with no
 interaction) is set to 30 minutes. Someone comes along and logs in. When he
 logs in you can record the exact time he logged in. Everytime this user
 accesses a page that calls your application you can update that timestamp 
 to
 confirm him as still online. But then the requests (i.e. clicking of links,
 form submission, etc) stops, and 30 minutes later the session timesout.

 The problem? What if he had closed his browser and not clicked the
 logout link? Was he actually still sitting in front of his computer when 
 his
 session ended? At what time in those last 30 minutes of inactivity was he
 still there? When did he close the browser?

 You don't know. Closing the browser is something you cannot determine,
 even using javascript.

 The only way to reliably do this is to have some ajax sitting in the
 application that sends a request every few minutes that can verify that the
 person is still there and his browser is still open. The downside is that
 his session will never timeout on its own (as each little ajax request will
 reset the internal PHP session timer) and you will have to build your own
 session timeout mechanism from scratch to force a "logout" when it does
 timeout.

 On Mon, Jan 17, 2011 at 1:49 PM, Srivatsa Prasad <
 srivatsa6...@gmail.com> wrote:

> Hi All,
>
> I am using symfony 1.4 and doctrine.
> I am trying to build a small chat app so,
> I want to know who are all the user of my app logged into to at now.
>
> --
> Thanks & Regards
> Srivatsa
>
> --
> 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 

Re: [symfony-users] Get all logged in users

2011-01-17 Thread Srivatsa Prasad
Hi,

That should do the trick for me.

I wonder how gmail or facebook do this.

On Tue, Jan 18, 2011 at 12:38 PM, Gareth McCumskey wrote:

> The best you can do is try to use javascript to catch an event of the
> person leaving the page (http://api.jquery.com/unload/). the problem as
> that link suggests is that its also browser dependant. Some browsers
> implement only parts of that event. For example, some browsers do not fire
> the unload event on browser closing but do on changing url in the tab etc.
> Its a very tricky thing to do.
>
> The best way I can think of is have a periodic ajax request fire every 1
> minute or or so. This ajax event updates the users "last active" time. All
> other users IM client can then update the currently online people to be
> those whose last active time was updated in the last minute. In other words,
> if I am a user who has a list of currently logged in people, and my friend
> has his browser open, he sees me online. My browser is regularly sending the
> a small ajax request to the server telling it that at time now I am online.
> My friends browser checks to see who is online every minute as well. I close
> my browser and now my last active time is not being changed. My friends
> browser gets the list of people online and sees that my last active time is
> now longer than a minute ago therefore I must be offline.
>
>
> On Tue, Jan 18, 2011 at 8:19 AM, Srivatsa Prasad 
> wrote:
>
>> Hi,
>>
>> Thank you for the response.
>>
>> The scenario u mentioned below, I see one issue, which cannot be handled.
>>
>> I think of using the database to see who are all the logged in users, i do
>> it at the time when they log-in. I can mark them as logged out if they log
>> out,
>>
>> The problems i foresee are,
>> 1 The user session doesn't expire since the page makes a request in a
>> certain interval. I don't mind if the session doesn't expire.
>> 2 The other issue is if the user closes the browser or the user losses
>> connectivity, i am not sure how to handle this situation , how to notify
>> other users that an other user has logged out ?
>>
>> If u could give me some idea on the 2nd issue, i will take it further .
>>
>>
>>
>>
>>
>>
>> On Mon, Jan 17, 2011 at 5:50 PM, Gareth McCumskey 
>> wrote:
>>
>>> This is very commonly asked and the simple answer is  its rather
>>> difficult.
>>>
>>> Its difficult because when someone logs into an application, this fact is
>>> stored server-side where all the PHP code exists. Lets consider a scenario.
>>> You have an application to which people need to log into. Your session
>>> timeout (i.e. how long you allow someone to stay logged in with no
>>> interaction) is set to 30 minutes. Someone comes along and logs in. When he
>>> logs in you can record the exact time he logged in. Everytime this user
>>> accesses a page that calls your application you can update that timestamp to
>>> confirm him as still online. But then the requests (i.e. clicking of links,
>>> form submission, etc) stops, and 30 minutes later the session timesout.
>>>
>>> The problem? What if he had closed his browser and not clicked the logout
>>> link? Was he actually still sitting in front of his computer when his
>>> session ended? At what time in those last 30 minutes of inactivity was he
>>> still there? When did he close the browser?
>>>
>>> You don't know. Closing the browser is something you cannot determine,
>>> even using javascript.
>>>
>>> The only way to reliably do this is to have some ajax sitting in the
>>> application that sends a request every few minutes that can verify that the
>>> person is still there and his browser is still open. The downside is that
>>> his session will never timeout on its own (as each little ajax request will
>>> reset the internal PHP session timer) and you will have to build your own
>>> session timeout mechanism from scratch to force a "logout" when it does
>>> timeout.
>>>
>>> On Mon, Jan 17, 2011 at 1:49 PM, Srivatsa Prasad >> > wrote:
>>>
 Hi All,

 I am using symfony 1.4 and doctrine.
 I am trying to build a small chat app so,
 I want to know who are all the user of my app logged into to at now.

 --
 Thanks & Regards
 Srivatsa

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

Re: [symfony-users] Re: Enable logging in production

2011-01-17 Thread Yanko Simeonoff

On 01/17/2011 05:31 PM, Fran wrote:

Thanks for aswering, but it still not works. I thought the level was
the maximum level to be logged.


On 17 ene, 14:22, stof  wrote:
   

On Mon, 17 Jan 2011 01:16:40 -0800 (PST), Fran  wrote:
 

Hi,
   
 

I've been trying to enable logging in a production environment and
there is no way. I've only achieved that in the log are written info
messages.
   
 

I made this steps:
   
 

I've added in settings.yml:
   
 

 logging_enabled:true
   
 

I've added in factories.yml:
   
 

prod:
   logger:
 class: sfAggregateLogger
 param:
   level: err
   loggers:
 sf_file_debug:
   class: sfFileLogger
   param:
 level: err
 file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
   
 

When I execute the action that fails in the development environment
the log has:
   
 

Jan 16 18:03:57 symfony [warning] {sfWebDebugLogger}  Warning at /
home//actions/actions.class.php on line 58 (require_once(): http://
wrapper is disabled in the server configuration by
allow_url_include=0)
(The error doesn't matter)
   
 

This error doesn't appear in the production log (when I execute the
app in production environment)
   
 

It seems that in the production log only appears the messages with
level info
   
 

Any idea?
   
 

Thank you!
   
 

PD: Sorry for my English
   

This is completly normal. The message is a warning and your prod
configuration only logs the error level. If you want to log warnings in the
prod environment you have to change the ``level: err`` line in your config.
I think it is ``level: warn`` for warnings but I'm not sure.

Regards

--
Christophe | Stof
 
   

http://www.symfony-project.org/reference/1_4/en/05-Factories#chapter_05_sub_level
Here are the settings for logging

Yanko

--
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] Get all logged in users

2011-01-17 Thread Gareth McCumskey
The best you can do is try to use javascript to catch an event of the person
leaving the page (http://api.jquery.com/unload/). the problem as that link
suggests is that its also browser dependant. Some browsers implement only
parts of that event. For example, some browsers do not fire the unload event
on browser closing but do on changing url in the tab etc. Its a very tricky
thing to do.

The best way I can think of is have a periodic ajax request fire every 1
minute or or so. This ajax event updates the users "last active" time. All
other users IM client can then update the currently online people to be
those whose last active time was updated in the last minute. In other words,
if I am a user who has a list of currently logged in people, and my friend
has his browser open, he sees me online. My browser is regularly sending the
a small ajax request to the server telling it that at time now I am online.
My friends browser checks to see who is online every minute as well. I close
my browser and now my last active time is not being changed. My friends
browser gets the list of people online and sees that my last active time is
now longer than a minute ago therefore I must be offline.

On Tue, Jan 18, 2011 at 8:19 AM, Srivatsa Prasad wrote:

> Hi,
>
> Thank you for the response.
>
> The scenario u mentioned below, I see one issue, which cannot be handled.
>
> I think of using the database to see who are all the logged in users, i do
> it at the time when they log-in. I can mark them as logged out if they log
> out,
>
> The problems i foresee are,
> 1 The user session doesn't expire since the page makes a request in a
> certain interval. I don't mind if the session doesn't expire.
> 2 The other issue is if the user closes the browser or the user losses
> connectivity, i am not sure how to handle this situation , how to notify
> other users that an other user has logged out ?
>
> If u could give me some idea on the 2nd issue, i will take it further .
>
>
>
>
>
>
> On Mon, Jan 17, 2011 at 5:50 PM, Gareth McCumskey wrote:
>
>> This is very commonly asked and the simple answer is  its rather
>> difficult.
>>
>> Its difficult because when someone logs into an application, this fact is
>> stored server-side where all the PHP code exists. Lets consider a scenario.
>> You have an application to which people need to log into. Your session
>> timeout (i.e. how long you allow someone to stay logged in with no
>> interaction) is set to 30 minutes. Someone comes along and logs in. When he
>> logs in you can record the exact time he logged in. Everytime this user
>> accesses a page that calls your application you can update that timestamp to
>> confirm him as still online. But then the requests (i.e. clicking of links,
>> form submission, etc) stops, and 30 minutes later the session timesout.
>>
>> The problem? What if he had closed his browser and not clicked the logout
>> link? Was he actually still sitting in front of his computer when his
>> session ended? At what time in those last 30 minutes of inactivity was he
>> still there? When did he close the browser?
>>
>> You don't know. Closing the browser is something you cannot determine,
>> even using javascript.
>>
>> The only way to reliably do this is to have some ajax sitting in the
>> application that sends a request every few minutes that can verify that the
>> person is still there and his browser is still open. The downside is that
>> his session will never timeout on its own (as each little ajax request will
>> reset the internal PHP session timer) and you will have to build your own
>> session timeout mechanism from scratch to force a "logout" when it does
>> timeout.
>>
>> On Mon, Jan 17, 2011 at 1:49 PM, Srivatsa Prasad 
>> wrote:
>>
>>> Hi All,
>>>
>>> I am using symfony 1.4 and doctrine.
>>> I am trying to build a small chat app so,
>>> I want to know who are all the user of my app logged into to at now.
>>>
>>> --
>>> Thanks & Regards
>>> Srivatsa
>>>
>>> --
>>> 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
>> Fo

[symfony-users] Re: Doctrine2 ODM missing hydrator files

2011-01-17 Thread Damon Jones
Add tbe following to your config.yml:

doctrine_odm.mongodb:
auto_generate_hydrator_classes: true

On Jan 17, 11:30 pm, Jérôme TEXIER  wrote:
> Hi,
>
> I'm currently playing with Symfony2 PR4 and Doctrine2 ODM.
> I've defined a document class called "Image" which relies on an
> existant mongodb collection.
>
> When I run a query to its related document repository (which is
> Doctrine\ODM\MongoDB\DocumentRepository by default),
> $image = 
> $dm->getRepository('Application\CmxBundle\Document\Image')->findOneById($id);
>
> I get the following error message :
>
> Fatal error: Doctrine\ODM\MongoDB\Hydrator
> \HydratorFactory::getHydratorFor(): Failed opening required '/Users/
> jerome/Sites/cmx/frontend/app/cache/dev/doctrine/odm/mongodb/Hydrators/
> ApplicationCmxBundleDocumentImageHydrator.php' (include_path='.:/usr/
> local/lib/php') in /Users/jerome/Sites/cmx/frontend/src/vendor/
> doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Hydrator/
> HydratorFactory.php on line
>
> As mentioned by the error message, the required Hydrator class
> (ApplicationCmxBundleDocumentImageHydrator.php) doesn't exist on
> cache.
> I have no idea why this class is missing and why it has not been
> generated by doctrine odm.
>
> Note that
> count($dm->getRepository('Application\CmxBundle\Document\Image')->findAll()) 
> returns the expected number of elements so config looks ok
>
> and doctrine odm is running against the right collection.
>
> Any suggestions ?

-- 
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] Avoid duplicate insertion in Propel

2011-01-17 Thread Imran
Hi folks,

Is there any way to avoid the duplicate insertion in Propel?


Thanks

-Imran

-- 
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: Symfony2: doctrine:generate:entities not working?

2011-01-17 Thread taidehuone
I myself spent several days to get doctrine2 working on my config, and
although I don't use Windows for development those were some major problems
to tackle on day one or day two so if you don't get it working in a minute,
don't give up.

The first thing to do is ensure that you didn't download your copy of
symfony2 on January 10th, plus minus two days. That's when I did, and the
doctrine2 command line task was entirely broken to begin with. From what I
can tell the "No Metadata classes to process" sounds like you need to run
the doctrine:generate:entities task before you can think about running
doctrine:schema:create.

Currently 7 out of 10 of my application bundles have a working Doctrine2
schema. The three key things on my checklist are:

1) ensure that the bundle is enabled in app/appKernel.php (see example)
...
public function registerBundles()
{
$bundles = array(
 ...
new Application\CategoryBundle\CategoryBundle,
new Application\AccountBundle\AccountBundle,
 ...
 }
 ...

2) ensure that the bundle's specific mapping is enabled in
app/config/config.yml (see example)
doctrine.orm:
  auto_generate_proxy_classes: %kernel.debug%
  mappings:
LocationBundle: ~
AdguardBundle: ~
CategoryBundle: ~

3) write the entity file manually into MyBundle/Entity/SomeEntityName.php.
It is crucial to note that Doctrine2 pretty much requires the @orm:Entity
tag like I've defined it below. Remember that all Doctrine2 docs say it's
@Entity, but for symfony2 it needs to be @orm:Entity.
 wrote:

> I had the same problem days ago. What  is the format you use for your
> config file ? (yml, php or xml ?)
>
> On Jan 16, 7:31 pm, "jason.hanley"  wrote:
> > Hi Christophe,
> >
> > Thanks for the response.
> >
> > Unfortunately even following these directions I still have 2 problems.
> >
> > 1. Creating a .yml mapping in the appropriate place doesn't generate
> > or update a .php class file as far as I can tell, nor does it give any
> > sort of output (gave up on that problem -- assumed broken)
> >
> > 2. doctrine:schema:create still just outputs "No Metadata Classes to
> > process."
> >
> > I've traced the problem to Doctrine\ORM\Mapping\Driver
> > \AnnotationDriver.getAllClassNames().
> >
> > For some reason, it gets all declared classes (368 in total) and loops
> > through every single one, comparing the filenames.
> >
> > The $sourceFile filename has single slashes in its path string ('\')
> > but $includedFiles have escaped slashes ('\\'), so the comparison
> > fails.
> >
> > I think that's why it's currently failing on Windows.
>
> --
> 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] [Symfony2] MongoDB Exception: "Every Document must have an identifier/primary key"

2011-01-17 Thread Philipp Schächtele
Hey Symfony Users,

when trying to persist a Document with MongoDB in the current version
of the Symfony2 Sandbox I receive the following Exception:

"No identifier/primary key specified for Document 'Application
\TestBundle\Document\Test'. Every Document must have an identifier/
primary key."

My document file looks quite easy. I also tried various variation of
syntax (eg. with @mongodb), various index definitions (in the class
annotations, setting the id as index) - none worked. I kept on
receiving the same Exception.

http://groups.google.com/group/symfony-users?hl=en


Re: [symfony-users] Get all logged in users

2011-01-17 Thread Srivatsa Prasad
Hi,

Thank you for the response.

The scenario u mentioned below, I see one issue, which cannot be handled.

I think of using the database to see who are all the logged in users, i do
it at the time when they log-in. I can mark them as logged out if they log
out,

The problems i foresee are,
1 The user session doesn't expire since the page makes a request in a
certain interval. I don't mind if the session doesn't expire.
2 The other issue is if the user closes the browser or the user losses
connectivity, i am not sure how to handle this situation , how to notify
other users that an other user has logged out ?

If u could give me some idea on the 2nd issue, i will take it further .





On Mon, Jan 17, 2011 at 5:50 PM, Gareth McCumskey wrote:

> This is very commonly asked and the simple answer is  its rather
> difficult.
>
> Its difficult because when someone logs into an application, this fact is
> stored server-side where all the PHP code exists. Lets consider a scenario.
> You have an application to which people need to log into. Your session
> timeout (i.e. how long you allow someone to stay logged in with no
> interaction) is set to 30 minutes. Someone comes along and logs in. When he
> logs in you can record the exact time he logged in. Everytime this user
> accesses a page that calls your application you can update that timestamp to
> confirm him as still online. But then the requests (i.e. clicking of links,
> form submission, etc) stops, and 30 minutes later the session timesout.
>
> The problem? What if he had closed his browser and not clicked the logout
> link? Was he actually still sitting in front of his computer when his
> session ended? At what time in those last 30 minutes of inactivity was he
> still there? When did he close the browser?
>
> You don't know. Closing the browser is something you cannot determine, even
> using javascript.
>
> The only way to reliably do this is to have some ajax sitting in the
> application that sends a request every few minutes that can verify that the
> person is still there and his browser is still open. The downside is that
> his session will never timeout on its own (as each little ajax request will
> reset the internal PHP session timer) and you will have to build your own
> session timeout mechanism from scratch to force a "logout" when it does
> timeout.
>
> On Mon, Jan 17, 2011 at 1:49 PM, Srivatsa Prasad 
> wrote:
>
>> Hi All,
>>
>> I am using symfony 1.4 and doctrine.
>> I am trying to build a small chat app so,
>> I want to know who are all the user of my app logged into to at now.
>>
>> --
>> Thanks & Regards
>> Srivatsa
>>
>> --
>> 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
>



-- 
Thanks & Regards
Srivatsa

-- 
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] Doctrine2 ODM missing hydrator files

2011-01-17 Thread Jérôme TEXIER
Hi,

I'm currently playing with Symfony2 PR4 and Doctrine2 ODM.
I've defined a document class called "Image" which relies on an
existant mongodb collection.

When I run a query to its related document repository (which is
Doctrine\ODM\MongoDB\DocumentRepository by default),
$image = $dm->getRepository('Application\CmxBundle\Document\Image')-
>findOneById($id);
I get the following error message :

Fatal error: Doctrine\ODM\MongoDB\Hydrator
\HydratorFactory::getHydratorFor(): Failed opening required '/Users/
jerome/Sites/cmx/frontend/app/cache/dev/doctrine/odm/mongodb/Hydrators/
ApplicationCmxBundleDocumentImageHydrator.php' (include_path='.:/usr/
local/lib/php') in /Users/jerome/Sites/cmx/frontend/src/vendor/
doctrine-mongodb-odm/lib/Doctrine/ODM/MongoDB/Hydrator/
HydratorFactory.php on line

As mentioned by the error message, the required Hydrator class
(ApplicationCmxBundleDocumentImageHydrator.php) doesn't exist on
cache.
I have no idea why this class is missing and why it has not been
generated by doctrine odm.

Note that
count($dm->getRepository('Application\CmxBundle\Document\Image')-
>findAll()) returns the expected number of elements so config looks ok
and doctrine odm is running against the right collection.

Any suggestions ?

-- 
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] documentation about hasHelp() mentioned in gentle-introduction 1.4

2011-01-17 Thread neanlos
They talk about it on "Customizing error Messages Display" in Gentle
Introductionbut
no idea where it comes from. Thanks in advance.

On Tue, Jan 11, 2011 at 8:58 AM, Tom Haskins-Vaughan
wrote:

> I just grep'd for the phrase "hasHelp" in sf1.4.8 and came up with
> nothing. Is this not in the core library?
>
> On Fri, Jan 7, 2011 at 2:53 PM, neanlos  wrote:
> > ... And anyone has documentation about the hasHelp function mentioned
> > in the section "Customizing Error Messages Display" of gentle-
> > introduction 1.4?
> >
> > http://www.symfony-project.org/gentle-introduction/1_4/en/10-Forms
> >
> > hasError()): ?>
> > 
> >  
> >renderError() ?>   // List of errors
> >  
> > 
> > 
> > 
> >  renderLabel() ?>// Label
> >  
> >render() ?>// Widget
> >hasHelp()): ?>
> >renderHelp() ?>  // 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
> >
>
>
>
> --
> The Harvest Cloud
> Who says buying local food can't be easy?
>
> Find out more @ harvestcloud.com
>
> --
> 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
>



-- 
NELSON ANDRÉS LOYOLA SALAS

Tecnólogo de Sistemas

e-mail:

nean...@gmail.com
nean...@hotmail.com

-- 
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] sfForm getValidatorSchema()->setPreValidator() documentation

2011-01-17 Thread neanlos
It's not very clear to me how that function works. So I wanted to read more
about it.

On Tue, Jan 11, 2011 at 8:50 AM, Tom Haskins-Vaughan
wrote:

> What are you trying to achieve?
>
> On Fri, Jan 7, 2011 at 2:39 PM, neanlos  wrote:
> > Anyone has documentation about sfForm getValidatorSchema()-
> >>setPreValidator() mentioned in the article
> > http://www.symfony-project.org/gentle-introduction/1_4/en/10-Forms?
> >
> > --
> > 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
> >
>
>
>
> --
> The Harvest Cloud
> Who says buying local food can't be easy?
>
> Find out more @ harvestcloud.com
>
> --
> 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
>



-- 
NELSON ANDRÉS LOYOLA SALAS

Tecnólogo de Sistemas

e-mail:

nean...@gmail.com
nean...@hotmail.com

-- 
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] Alternative implementation Many to Many

2011-01-17 Thread ma89a2
I have three tables Store, Telephone and StoreTelephone

Is it possible to insert a Telephone record passing the Store object
(already created other time) and fill the StoreTelephone table too ?

I don't want to embed forms here,

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

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


[symfony-users] Using Symfony models and database config for standalone PHP script?

2011-01-17 Thread Christian Hammers
Hello

How can I use my Propel models without Symfony?

The reason: I already have a project with some console-only scripts
from years ago that use plain PDO. Then I wrote a web "admin frontend"
with Symfony 1.3 and got addicted to Propel 1.5 (via sfPropel15Plugin)
and already customized some model classes.

Now I want to slowly merge the two code bases and would like to start
by using the Propel models inside one of the legacy PHP scripts.

Sadly the sfPropel15Plugin does not offer the "propel-gen convert-conf"
so my first approach was something like:

  count();

Obviously it would be more elegant if I could use the Symfony
config/database.yml to avoid storing credentials redundantly.

Should I use an yml parser, fetch the wanted environment and then convert
it to a Propel style config array and write it to a file? Or can I
somehow use the Symfony ProjectConfiguration? Or is there an easy way
to add a "convert-conf" to the sfPropel15Plugin?

bye,

-christian-

-- 
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: I18n + Umlauts: not working without utf8_encode

2011-01-17 Thread Zach
Here are my headers:

DateMon, 17 Jan 2011 23:05:44 GMTServerApache/2.2.9 (Debian) mod_ssl/2.2.9 
OpenSSL/0.9.8g PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_perl/2.0.4 
Perl/v5.10.0X-Powered-ByPHP/5.2.6-1+lenny9Set-Cookiesymfony=e8211e9fd802b7c8a85705f93d14621d;
 
path=/; domain=herbal-nutrition2.netExpiresThu, 19 Nov 1981 08:52:00 GMT
Cache-Controlno-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragmano-cacheContent-Length55931ConnectioncloseContent-Typetext/html; 
charset=utf-8

Request Headers
Hostherbal-nutrition2.netUser-AgentMozilla/5.0 (Windows; U; Windows NT 6.1; 
en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; 
.NET4.0C)Accept
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Languageen-us,en;q=0.5Accept-Encodinggzip,deflateAccept-Charset
ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive115Connectionkeep-aliveAuthorizationBasic
 
c3RhZ2luZzpzZXJ2ZXI=

and here are the meta tags that might be relevant:





If I change the character encoding in Firefox from UTF-8 to ISO-8859-1 the 
translations display fine, but other foreign characters coming directly from 
the database do not.

Thanks for your help,
Zach

-- 
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: Many to many relationship: complete iteration.

2011-01-17 Thread Stéphane
$user->getGroups() or such ? (I don't know propel)

Regards,

Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!


On Mon, Jan 17, 2011 at 11:25 PM, Javier Garcia wrote:

> I used a join and I get the objects from the exchange table, so if I
> iterate it I get:
>
> user1->group2
> user1->group5
> user2->group1
> user2->group3
> user2->group4
>
> But I'm wondering how could i get the group objects from the user
> objects...
>
>
> On Jan 17, 11:04 pm, Javier Garcia  wrote:
> > Hi,
> >
> > I have a many-to-many relationship between two tables.
> >
> > I would like to show the elements of a table with the corresponding
> > elements of the other table.
> >
> > For example:
> >
> > user1->group2
> >group5
> > user2->group1
> >group3
> >group4
> > ...
> >
> > In an easy and smart way, of course.
> >
> > sf 1.4/propel 1.4.
> >
> > Any advice or tutorial?
> >
> > Javi
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

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

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


[symfony-users] Re: Many to many relationship: complete iteration.

2011-01-17 Thread Javier Garcia
I used a join and I get the objects from the exchange table, so if I
iterate it I get:

user1->group2
user1->group5
user2->group1
user2->group3
user2->group4

But I'm wondering how could i get the group objects from the user
objects...


On Jan 17, 11:04 pm, Javier Garcia  wrote:
> Hi,
>
> I have a many-to-many relationship between two tables.
>
> I would like to show the elements of a table with the corresponding
> elements of the other table.
>
> For example:
>
> user1->group2
>        group5
> user2->group1
>        group3
>        group4
> ...
>
> In an easy and smart way, of course.
>
> sf 1.4/propel 1.4.
>
> Any advice or tutorial?
>
> Javi

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

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


[symfony-users] Many to many relationship: complete iteration.

2011-01-17 Thread Javier Garcia
Hi,

I have a many-to-many relationship between two tables.

I would like to show the elements of a table with the corresponding
elements of the other table.

For example:

user1->group2
   group5
user2->group1
   group3
   group4
...

In an easy and smart way, of course.

sf 1.4/propel 1.4.

Any advice or tutorial?

Javi

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

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


[symfony-users] Re: After installing sfPropel15Plugin: error when i try to build classes

2011-01-17 Thread Gabriel Petchesi
Check the autoloader cache, it's found in cache/.
In my app is cache/frontend/dev/config/config_autoload.yml.php
Look for a class related to Propel like sfpropelroute and make sure the path 
listed there is the one from the 
plugins/sfPropel15Plugin/lib/routing/sfPropelRoute.class.php.
If it's something different than it means the classes are not found for some 
reason.

   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


Re: [symfony-users] Re: I18n + Umlauts: not working without utf8_encode

2011-01-17 Thread Gabriel Petchesi
If it looks fine with wget than the problem is somewhere else (not the web 
application):
1. Check HTTP headers sent by the web server (via Firefox Firebug/HttpFox)
2. Check the HTTP meta tags in the web page
Make sure you clean up the browser session (if there is some stale info in 
the browsing 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: Including a custom global YAML file?

2011-01-17 Thread Gabriel Petchesi
I think you have to set up this manually:
http://www.symfony-project.org/reference/1_4/en/14-Other-Configuration-Files#chapter_14_config_handlers_yml

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: Including a custom global YAML file?

2011-01-17 Thread Eric B.
> You do not need to do an include or require. Symfony autoloads config 
> files into its sfConfig object. All you need to do is place it in root/lib 
> if you want it availabel through the project or in root/apps/frontend/lib 
> if you want only in that application or lastly in 
> root/apps/frontend/modules/modulename/config for a specific module even.


I'm using symfony 1.4, and that doesn't seem to work for me.  Perhaps I am 
missing something obvious.

I create a custom states.yml file that I placed in:
apps/frontend/modules/secure/config

I tried to access it with sfConfig as sfConfig::get( "states_canada" ), 
where "canada" is a header within my states.yml file.  But I get an empty 
value as a result.

I checked my /cache/frontend/dev/config dir and don't see the cache file for 
the states.yml file anywhere.  The only things I see are 
modules_secure_config_filters.yml.php
modules_secure_config_module.yml.php
modules_secure_config_security.yml.php
modules_secure_config_view.yml.php

But nothing with my states.yml.php file in it.

Do I have to "tell" symfony that I have added an extra yml file?  I've done 
a symfony cc just to be safe, but no difference.

Thanks,

Eric 



-- 
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] Relation one to one in sf1.4/propel

2011-01-17 Thread stof
On Mon, 17 Jan 2011 16:56:03 +0100, Javier Garcia 
wrote:
> Hi,
> 
> i have installed sfGuardPlugin and created this model:
> 
> propel:
>sf_guard_user_profile:
>  _attributes:   { phpName: sfGuardUserProfile }
>  id:~
>  user_id:   { type: integer, foreignTable: sf_guard_user, 
> foreignReference: id, required: true, onDelete: cascade }
>  name:  varchar(50)
> 
> As it is written here, 
> http://www.propelorm.org/wiki/Documentation/1.4/Relationships (see 
> "One-to-one relationships"), It is supposed symfony generates the 
> function sfGuardUser->getSfGuardUserProfile() and 
> sfGuardUserProfile->getSfGuardUser() but I have this code:
> 
>// this works
>$c1 =  new Criteria();
>$elements = sfGuardUserProfilePeer::doSelect($c1);
>var_dump($elements[0]->getSfGuardUser());
> 
>// this doesn't work
>$c2 = new Criteria();
>$elements = sfGuardUserPeer::doSelect($c2);
>var_dump($elements[0]->getSfGuardUserProfile());
> 
> and it doesn't work. It says:
> 
> 
> Call to undefined method BasesfGuardUser::getSfGuardUserProfile
> 
> 
> sf 1.4/propel 1.4
> 
> Javier

The correct method name is ``getProfile()`` as stated there:
http://www.symfony-project.org/plugins/sfGuardPlugin

-- 
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: I18n + Umlauts: not working without utf8_encode

2011-01-17 Thread Zach
Ok, this is odd. Everything works fine locally, but not on the testing and 
production site. I tried using the production database locally and the 
translations stopped working. So it seems like there is a problem with the 
test and production databases. I've double checked everything, but I can't 
see any differences.

local:
trans_unit   charset: utf8collation: utf8_unicode_ci

test:
trans_unit charset:   utf8collation: utf8_unicode_ci

production:
trans_unit charset:   utf8collation: utf8_unicode_ci

I can't figure this thing out. I've had other people try it on different 
computers and different browsers.
I downloaded a page via wget and it displays correctly in my editor. I'm 
baffled.

-- 
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: After installing sfPropel15Plugin: error when i try to build classes

2011-01-17 Thread Javier Garcia
enablePlugins('sfPropelPlugin');
$this->enablePlugins('sfPropel15Plugin');
  }
}

And I did plugin:publish-assets.

Javier

On Jan 13, 5:53 pm, Gabriel Petchesi  wrote:
> Do you have propel 1.5 plugin activated in
> config/ProjectConfiguration.class.php ?
> The getUniqueColumnNames() shows up with propel 1.5 and was not available
> with propel 1.4 shiped with Symfony (double check this).
>
>     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] Relation one to one in sf1.4/propel

2011-01-17 Thread Javier Garcia

Hi,

i have installed sfGuardPlugin and created this model:

propel:
  sf_guard_user_profile:
_attributes:   { phpName: sfGuardUserProfile }
id:~
user_id:   { type: integer, foreignTable: sf_guard_user, 
foreignReference: id, required: true, onDelete: cascade }

name:  varchar(50)

As it is written here, 
http://www.propelorm.org/wiki/Documentation/1.4/Relationships (see 
"One-to-one relationships"), It is supposed symfony generates the 
function sfGuardUser->getSfGuardUserProfile() and 
sfGuardUserProfile->getSfGuardUser() but I have this code:


  // this works
  $c1 =  new Criteria();
  $elements = sfGuardUserProfilePeer::doSelect($c1);
  var_dump($elements[0]->getSfGuardUser());

  // this doesn't work
  $c2 = new Criteria();
  $elements = sfGuardUserPeer::doSelect($c2);
  var_dump($elements[0]->getSfGuardUserProfile());

and it doesn't work. It says:


   Call to undefined method BasesfGuardUser::getSfGuardUserProfile


sf 1.4/propel 1.4

Javier



--
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] Doctrine2 doctrine:import:mapping Exception unknown database type enum

2011-01-17 Thread s.rohweder
Hi all,

i tried to import a schema from a database wich contains enum fields.
Sadly this fails with:

Unknown database type enum requested, Doctrine\DBAL\Platforms
\MySqlPlatform may not support it.

Do I misunderstand something in handling this or is there a chance for
a workaround or something similar ?

Thx in advance.

Sören

-- 
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: Enable logging in production

2011-01-17 Thread Fran
Thanks for aswering, but it still not works. I thought the level was
the maximum level to be logged.


On 17 ene, 14:22, stof  wrote:
> On Mon, 17 Jan 2011 01:16:40 -0800 (PST), Fran  wrote:
> > Hi,
>
> > I've been trying to enable logging in a production environment and
> > there is no way. I've only achieved that in the log are written info
> > messages.
>
> > I made this steps:
>
> > I've added in settings.yml:
>
> >     logging_enabled:        true
>
> > I've added in factories.yml:
>
> > prod:
> >   logger:
> >     class: sfAggregateLogger
> >     param:
> >       level: err
> >       loggers:
> >         sf_file_debug:
> >           class: sfFileLogger
> >           param:
> >             level: err
> >             file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
>
> > When I execute the action that fails in the development environment
> > the log has:
>
> > Jan 16 18:03:57 symfony [warning] {sfWebDebugLogger}  Warning at /
> > home//actions/actions.class.php on line 58 (require_once(): http://
> > wrapper is disabled in the server configuration by
> > allow_url_include=0)
> > (The error doesn't matter)
>
> > This error doesn't appear in the production log (when I execute the
> > app in production environment)
>
> > It seems that in the production log only appears the messages with
> > level info
>
> > Any idea?
>
> > Thank you!
>
> > PD: Sorry for my English
>
> This is completly normal. The message is a warning and your prod
> configuration only logs the error level. If you want to log warnings in the
> prod environment you have to change the ``level: err`` line in your config.
> I think it is ``level: warn`` for warnings but I'm not sure.
>
> 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] I18n does not encode special chars -> W3C validation fails

2011-01-17 Thread chrigu
Hi everybody,

I'm using I18n tags stored in xml files. Recently I checked my page
with W3C-Validator (validator.w3.org) and received the following
error: character "&" is the first character of a delimiter but
occurred as data.

I checked my source code and saw that the Ampersand (&) is decoded. I
checked in the messages.xml and there it is properly stored as html
entity (& ;) as it should be. I checked other special characters
like umlauts there I have the same problem, they are not encoded. My
browser displays these characters correctly but the W3C Validator
complains about them (see above).

If I do an echo utf8_encode(__("My translation contains an
ampersand")); it does the trick but I don't wanna add an utf8_encode
to every internationalisation-tag which could contain special chars.
Can I overwrite somehow the __(key) function or is this a bug which
needs to be reported?


Thank you for any help!!!
Chrigu

-- 
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] Enable logging in production

2011-01-17 Thread stof
On Mon, 17 Jan 2011 01:16:40 -0800 (PST), Fran  wrote:
> Hi,
> 
> I've been trying to enable logging in a production environment and
> there is no way. I've only achieved that in the log are written info
> messages.
> 
> I made this steps:
> 
> I've added in settings.yml:
> 
> logging_enabled:true
> 
> I've added in factories.yml:
> 
> prod:
>   logger:
> class: sfAggregateLogger
> param:
>   level: err
>   loggers:
> sf_file_debug:
>   class: sfFileLogger
>   param:
> level: err
> file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
> 
> When I execute the action that fails in the development environment
> the log has:
> 
> Jan 16 18:03:57 symfony [warning] {sfWebDebugLogger}  Warning at /
> home//actions/actions.class.php on line 58 (require_once(): http://
> wrapper is disabled in the server configuration by
> allow_url_include=0)
> (The error doesn't matter)
> 
> This error doesn't appear in the production log (when I execute the
> app in production environment)
> 
> It seems that in the production log only appears the messages with
> level info
> 
> Any idea?
> 
> Thank you!
> 
> PD: Sorry for my English

This is completly normal. The message is a warning and your prod
configuration only logs the error level. If you want to log warnings in the
prod environment you have to change the ``level: err`` line in your config.
I think it is ``level: warn`` for warnings but I'm not sure.

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


Re: [symfony-users] Re: I18n + Umlauts: not working without utf8_encode

2011-01-17 Thread Zach
This is the first line in the  section:

 

do I need something more? Translation worked fine when I was using xml 
files, but I have switched to database translation so it is easier to add 
and update translations.

-- 
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: sfDoctrineGuardPlugin, permission, user group

2011-01-17 Thread dmitrypol
Hi Erman

Your question is not very clear but here are a few points. Yes, Symfony does 
have a bit of steep learning curve.  

To install my project with the plugin I created a shell script
php lib/vendor/symfony/data/bin/symfony generate:project myproject  #creates 
project
php symfony generate:app frontend  # creates app
php symfony plugin:install sfDoctrineGuardPlugin  #installs plugin
php symfony doctrine:build --all --no-confirmation --and-load  #creates the 
DB 

I then used the command prompt 
php symfony guard:create-user us...@gmail.com user1 user1 User1 One  # will 
create user
php symfony guard:promote user1 # will promote user to be superadmin
php symfony guard:change-password user1 user1  # will change password

After you setup sfDoctrineGuardPlugin browse to 
your_site/index.php/guard/groups, .../guard/permissions and .../guard/users 
to manage groups, permission and users.  I then used "php symfony 
doctrine:data-dump" to dump data in YML file and saved it.  So now I just 
copy this YML file back to data/fixtures and recreate the DB when I have 
to.  

Just run the "php symfony list" to see the list of possible commands and 
"php symfony help guard:create-user" (or another task) to get specific 
instructions.  I am sure you can figure it out.  

Dmitry

-- 
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: Updating symfony1.4 official documents

2011-01-17 Thread Massimiliano Arione
I second Shin.
Just another clue: this page http://www.symfony-project.org/installation , 
that should be one of most important pages of site, is clearly not up to 
date.

cheers
Massimiliano

-- 
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] Enable logging in production

2011-01-17 Thread Fran
Hi,

I've been trying to enable logging in a production environment and
there is no way. I've only achieved that in the log are written info
messages.

I made this steps:

I've added in settings.yml:

logging_enabled:true

I've added in factories.yml:

prod:
  logger:
class: sfAggregateLogger
param:
  level: err
  loggers:
sf_file_debug:
  class: sfFileLogger
  param:
level: err
file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log

When I execute the action that fails in the development environment
the log has:

Jan 16 18:03:57 symfony [warning] {sfWebDebugLogger}  Warning at /
home//actions/actions.class.php on line 58 (require_once(): http://
wrapper is disabled in the server configuration by
allow_url_include=0)
(The error doesn't matter)

This error doesn't appear in the production log (when I execute the
app in production environment)

It seems that in the production log only appears the messages with
level info

Any idea?

Thank you!

PD: Sorry for my English

-- 
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: doctrine:generate:entities not working?

2011-01-17 Thread rouffj
I had the same problem days ago. What  is the format you use for your
config file ? (yml, php or xml ?)

On Jan 16, 7:31 pm, "jason.hanley"  wrote:
> Hi Christophe,
>
> Thanks for the response.
>
> Unfortunately even following these directions I still have 2 problems.
>
> 1. Creating a .yml mapping in the appropriate place doesn't generate
> or update a .php class file as far as I can tell, nor does it give any
> sort of output (gave up on that problem -- assumed broken)
>
> 2. doctrine:schema:create still just outputs "No Metadata Classes to
> process."
>
> I've traced the problem to Doctrine\ORM\Mapping\Driver
> \AnnotationDriver.getAllClassNames().
>
> For some reason, it gets all declared classes (368 in total) and loops
> through every single one, comparing the filenames.
>
> The $sourceFile filename has single slashes in its path string ('\')
> but $includedFiles have escaped slashes ('\\'), so the comparison
> fails.
>
> I think that's why it's currently failing on Windows.

-- 
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] Get all logged in users

2011-01-17 Thread Gareth McCumskey
This is very commonly asked and the simple answer is  its rather
difficult.

Its difficult because when someone logs into an application, this fact is
stored server-side where all the PHP code exists. Lets consider a scenario.
You have an application to which people need to log into. Your session
timeout (i.e. how long you allow someone to stay logged in with no
interaction) is set to 30 minutes. Someone comes along and logs in. When he
logs in you can record the exact time he logged in. Everytime this user
accesses a page that calls your application you can update that timestamp to
confirm him as still online. But then the requests (i.e. clicking of links,
form submission, etc) stops, and 30 minutes later the session timesout.

The problem? What if he had closed his browser and not clicked the logout
link? Was he actually still sitting in front of his computer when his
session ended? At what time in those last 30 minutes of inactivity was he
still there? When did he close the browser?

You don't know. Closing the browser is something you cannot determine, even
using javascript.

The only way to reliably do this is to have some ajax sitting in the
application that sends a request every few minutes that can verify that the
person is still there and his browser is still open. The downside is that
his session will never timeout on its own (as each little ajax request will
reset the internal PHP session timer) and you will have to build your own
session timeout mechanism from scratch to force a "logout" when it does
timeout.

On Mon, Jan 17, 2011 at 1:49 PM, Srivatsa Prasad wrote:

> Hi All,
>
> I am using symfony 1.4 and doctrine.
> I am trying to build a small chat app so,
> I want to know who are all the user of my app logged into to at now.
>
> --
> Thanks & Regards
> Srivatsa
>
> --
> 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


[symfony-users] Get all logged in users

2011-01-17 Thread Srivatsa Prasad
Hi All,

I am using symfony 1.4 and doctrine.
I am trying to build a small chat app so,
I want to know who are all the user of my app logged into to at now.

-- 
Thanks & Regards
Srivatsa

-- 
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: Grails to Symfony2 Benchmark

2011-01-17 Thread Nikolai K. Bochev
Well it seems he has redone the test with APC enabled. 


http://cutiecode.maniacmansion.it/post/2777523715/grails-vs-symfony-2-0-with-apc
 


"Interesting" is all i can say. 




Thanks for the info and the effort to email the author. I am very 
interested in what they have to say. 
Please let us know as soon as you do. 

Thanks. 



-- 


Nikolai K. Bochev 
System Administrator 



-- 
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] Use of slots in a component?

2011-01-17 Thread Eric B.
Hi,

I have a simply component, in which I've tried to indicate the use of a
slot.  However, it seems to be ignored, and the html content that I place
within the slot never appears in my final page.

My component's template is:








And my main layout.php has the following:







Can I not use a slot within a component?


Thanks,


Eric




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

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


[symfony-users] Need Help With PHP Symfony - Will Pay

2011-01-17 Thread lbike
I need help with a site that was built with Symfony.

Prefer United States developer.

Let me know.

Thanks.

mikemitch90...@gmail.com

-- 
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 undefined params in routes

2011-01-17 Thread Максим Воробей
Hi all
is there any chance to use undefined params in route patterns?
like /foo/*

-- 
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] sfDoctrineGuardPlugin, permission, user group

2011-01-17 Thread erman taylan
Hi all,

I posted a question on stackoverflow about sfDoctrineGuardPlugin.

Please help me by writing an answer on stackoverflow (http://goo.gl/9FRbm)
or replay this mail. (;

Thanks in advanced...


*My question is:*

*its my first real project with Symfony. i need to have some settings like
permissions on my backend application.*

*i know, i must do it with sfDoctrineGuardPlugin. but i don't know how? i
have read everthing about sfDoctrineGuardPlugin on symfony website. but i
still don't find anything about;*

   - * how to implements user groups? i need superadmin (i did it), chief
   editor, editor, author.*
   - * how to set permissions between them? For example, every author just
   see their own data. editors can edit what author wrote...*

*thanks a lot in advanced...*

-- 
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] Updating symfony1.4 official documents

2011-01-17 Thread Shin Ohno
Hi, I'm having trouble with symfony1.4 documents.

Documents available at the official site are obsolete, and is there
any plan to update?

It is good that Symfony2 is coming soon, but at the same time, I worry
about symfony1.4. Many web developers are still using symfony1.4, and
I believe we, web developers, have to maintain the web applications at
least the LTS ends, which is November 2012. And we also expect new
people to use symfony1.4, too. Where do they learn how to use
symfony1.4? I always recommend the official documents, such as Jobeet
and More with symfony. Well, that's where I learned. I also committed
translation work of the official documents.

The problem I have here is that updating symfony1.4 documents. I mean
not to make a new one, but to reflect the latest translation to the
official website. I heard some people pointed out about mistakes of
the translation or the document itself. Actually  we fixed them on git
repository. But we do not have permission to reflect the latest
version of symfony1.4 documents. It is sad that our work does not
reflect to  the official website. Well, this is not only the problem
of Japanese translation, but also other languages.

Can anybody reflect the latest symfony1.4 documents to official website?

I want new symfony developers to learn symfony with great documents,
so this is very important.

Well, I also wrote a ticket in trac about this issue, but nobody
respond the ticket( http://trac.symfony-project.org/ticket/9389 )
about two weeks ago, but nobody respond yet.  Is there any comments or
advise for me about this?

Thanks,
Shin

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