[symfony-users] Re: ffmpeg on symfony?

2009-10-23 Thread Alexandre SALOME
You should isolate your system call, for example making an interfaced class : class myShell { public function execute($command) { // your stuff } } And use this class to make some actions, for example logging the command before executing. Check what command is executed, check the

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Alexandre SALOME
Overload the signin action, and make your test in it : if the account is disabled, redirect to your special page, else, login. Which ORM/symfony version are you using ? 2009/10/23 Steve Sanyal steve.san...@gmail.com Hi, Has anyone come across any good solutions for having a disabled user

[symfony-users] Re: Editing imported data via form in unsaved object

2009-10-23 Thread Alexandre SALOME
This is clearly too obscure. You should begin with a refactoring, isolate every process to identify which one fails. I can't understand your code, no details about JustdrinkImporter, don't know the value of the drinkdb_id or id parameters, etc. Step by step, refactor it. Keep one thing in mind

[symfony-users] Required fields i18n

2009-10-23 Thread HAUSa
In my ObjectI18nForm I made several fields required. I embedded the ObjectI18nForm for two languages in my ObjectForm. Ofcourse, in both languages the fields are required. But I want my user to be able to submit only one language, he / she is not required to complete the fields for both

[symfony-users] Re: ffmpeg on symfony?

2009-10-23 Thread mel_06
i got it working already, but my problem now is how will i save it to the database? On Oct 23, 3:04 pm, Alexandre SALOME alexandre.sal...@gmail.com wrote: You should isolate your system call, for example making an interfaced class : class myShell {   public function execute($command)   {

[symfony-users] Re: ffmpeg on symfony?

2009-10-23 Thread mel_06
i got it working already, but my problem now is how will i save it to the database? On Oct 23, 3:04 pm, Alexandre SALOME alexandre.sal...@gmail.com wrote: You should isolate your system call, for example making an interfaced class : class myShell {   public function execute($command)   {

[symfony-users] Re: publication project

2009-10-23 Thread Gareth McCumskey
This kind of request shows laziness on your part. Also, the lack of information about your project makes it very difficult to decide what kind of deployment strategy would be best for you. So .. stop being lazy and read:

[symfony-users] Re: Test:All under Windows

2009-10-23 Thread ridcully
The Batch Solution doesn't work, the only thing works is to copy the whole PHP Executables out of Program Files and set a PHP_Path to this new Directory. THX Jörg On Oct 23, 1:20 am, Alexandre SALOME alexandre.sal...@gmail.com wrote: A fixaround would be to create a batch :

[symfony-users] Re: Required fields i18n

2009-10-23 Thread michael.pie...@googlemail.com
I solved it this way: In your form configure method (i18n form): /* set required if object culture is 'en' */ $required = ($this-getObject()-getCulture() === 'en') ? true : false; $this-setValidators(array( 'name'= new sfValidatorString(array('required' = $required)), )); Hope this

[symfony-users] Re: where do I insert my hit counter?

2009-10-23 Thread aymeric
The thing you should change is your boss ;) I'm seriously considering this solution ^^ I'm kidding :P There are several ways for making a counter and depending of required stats, each solution has his advantages. In your case, create an integer field on your model and increment it each

[symfony-users] User culture is not the same locally

2009-10-23 Thread aymeric
In settings.yml I have set the default laguage to fr and $sf_user- getCulture() returns 'fr' when called on my localhost. If I upload my project on my webhost $sf_user-getCulture() returns 'en'. The only difference between the 2 folders is in database.yml where I changed the username and password

[symfony-users] Re: Test:All under Windows

2009-10-23 Thread Alexandre SALOME
Ark.. So move your PHP installation, or make a patch for symfony. Alexandre 2009/10/23 ridcully ohnhei...@googlemail.com The Batch Solution doesn't work, the only thing works is to copy the whole PHP Executables out of Program Files and set a PHP_Path to this new Directory. THX Jörg

[symfony-users] Another local/distant difference : sfDoctrineGuard popup

2009-10-23 Thread aymeric
An other strange thing happened : when I open my backend app from the localhost I get a login form (and that's normal), but if I open this same app from my webhost I get a popup that loops on itself if I try to use it. If I cancel the popup on its first appearance I'm redirected on the desired

[symfony-users] Re: Required fields i18n

2009-10-23 Thread Alexandre SALOME
Well, i think you mean : fill all the required, or none ? Because this is good for en, but what if 2 objects of the same class does not fill the same language... 2009/10/23 michael.pie...@googlemail.com michael.pie...@googlemail.com I solved it this way: In your form configure method (i18n

[symfony-users] Re: publication application

2009-10-23 Thread Gareth McCumskey
Read the symfony documentation please. The Definitive Guide is called the definitive guide because it is ... well .. Definitive... http://www.symfony-project.org/book/1_2/16-Application-Management-Tools#chapter_16_deploying_applications On Tue, Oct 20, 2009 at 10:18 AM, a b

[symfony-users] Re: User culture is not the same locally

2009-10-23 Thread Alexandre SALOME
clear-cache on production ? 2009/10/23 aymeric elag...@gmail.com In settings.yml I have set the default laguage to fr and $sf_user- getCulture() returns 'fr' when called on my localhost. If I upload my project on my webhost $sf_user-getCulture() returns 'en'. The only difference between the

[symfony-users] Re: User culture is not the same locally

2009-10-23 Thread aymeric
It worked, I will hang a CTFC poster near my RTFM one ^^ On 23 oct, 13:31, Alexandre SALOME alexandre.sal...@gmail.com wrote: clear-cache on production ? 2009/10/23 aymeric elag...@gmail.com In settings.yml I have set the default laguage to fr and $sf_user- getCulture() returns 'fr'

[symfony-users] Put action in cache

2009-10-23 Thread HAUSa
I have a recursive category overview. Example: Category 1 * Category 1.1 * Category 1.2 * Category 1.3 Category 2 Category 3 * Category 3.1 * Category 3.2 I also created a function in CategoryPeer.class.php named generateSelect. The output of this function is going to be: select

[symfony-users] Re: js for module/action and authorized user

2009-10-23 Thread Gareth McCumskey
In your layout file between the head tags: ?php if ($sf_user-hasCredentials(...)): ? ?php use_javascript(...) ? ?php endif ? On Fri, Oct 23, 2009 at 1:27 PM, Konrad Korzeniowski kon...@pandur.netwrote: Hi, by include I meant: head script type=text/javascript src=/js/scriptA.js/script

[symfony-users] Re: Required fields i18n

2009-10-23 Thread michael.pie...@googlemail.com
I'm not sure i understand you ... This works for me when i want the 'name' field in my i18n form to be 'required', but only for the 'en' language (in this example). So if i have 3 cultures and submit the main form, i get an error beside the empty 'name' widget, but only for the specified

[symfony-users] Re: js for module/action and authorized user

2009-10-23 Thread Konrad Korzeniowski
Ok, it works (in my case if ($sf_user-isAuthenticated())... ) rgrds., KK [2009-10-23 14:33] Gareth McCumskey: In your layout file between the head tags: ?php if ($sf_user-hasCredentials(...)): ? ?php use_javascript(...) ? ?php endif ? On Fri, Oct 23, 2009 at 1:27 PM, Konrad Korzeniowski

[symfony-users] Project Deployment

2009-10-23 Thread mirfan
Hi, I have deployed a symfony project but i got an issue and that is let me explain: server: 132.147.160.108 {it is a locl server} http://132.147.160.108/civil_users/web/index.php/employee this is the page which i access by writing the url {i have write the index.php} the problem is that this

[symfony-users] Re: Another local/distant difference : sfDoctrineGuard popup

2009-10-23 Thread aymeric
I switched logging to on for the prod backend but the log file doesn't show up in the /log folder. I enabled access to the dev backend and its log file looks like this : Oct 23 14:34:37 symfony [info] {sfPatternRouting} Connect sfRoute homepage (/) Oct 23 14:34:37 symfony [info]

[symfony-users] Re: Project Deployment

2009-10-23 Thread Alexandru-Emil Lupu
you have to check several options: 1) look into your setting.yml and check if you have no_script_name: on in your prod. If so, disable it. (the default is on ) 2) modify your mod_rewrite rules ... Alecs On Fri, Oct 23, 2009 at 3:49 PM, mirfan m.irfa...@gmail.com wrote: Hi, I have deployed a

[symfony-users] Re: Project Deployment

2009-10-23 Thread Alexandru-Emil Lupu
*** is settings.yml located in your project_path/apps/$APP_NAME/config/settings.yml On Fri, Oct 23, 2009 at 3:56 PM, Alexandru-Emil Lupu gang.al...@gmail.comwrote: you have to check several options: 1) look into your setting.yml and check if you have no_script_name: on in your prod. If so,

[symfony-users] Re: Required fields i18n

2009-10-23 Thread HAUSa
Exactly. I want to be 100% sure that one language is completed. But the user may choose for himself if he wants to make his content available in other languages. On 23 okt, 14:44, michael.pie...@googlemail.com michael.pie...@googlemail.com wrote: I'm not sure i understand you ... This works

[symfony-users] Re: Project Deployment

2009-10-23 Thread mirfan
hi, i have disable no_script_name and enable mod_rewrite but it still not working can you told me what changes should i make? thanks On Oct 23, 5:57 pm, Alexandru-Emil Lupu gang.al...@gmail.com wrote: *** is settings.yml located in your project_path/apps/$APP_NAME/config/settings.yml On Fri,

[symfony-users] Re: Required fields i18n

2009-10-23 Thread michael.pie...@googlemail.com
That I'm not sure i understand you was for Alexandre ... @HAUSa: this was the same problem i had and the code i wrote in my first post did it for me ... Michael On 23 Okt., 15:04, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Exactly. I want to be 100% sure that one language is

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Gareth McCumskey
No you don't. You can load an action template inside a div using link_to_remote And FYI I use the link_to_remote all the time. An error 500 is an application error server side which you need to fix. Go through your code and debug as normal On Thu, Oct 22, 2009 at 5:25 PM, Raphael

[symfony-users] Re: Project Deployment

2009-10-23 Thread Alexandru-Emil Lupu
well in this case instruct you webserver to run as primary host that symfony project :) but as i have said earlier those are options (you pick just one ). try disable the mod_rewrite and i guess it will work . Alecs On Fri, Oct 23, 2009 at 4:27 PM, mirfan m.irfa...@gmail.com wrote: hi, i have

[symfony-users] Re: sfGuard at application environment level

2009-10-23 Thread Martin Settle
I've done all of these things. To be concise: sfGuard is installed and works fine on the module/action level. The whole application can be secured using is_secure, which means any action requires a successful login. What I need is to be able to say that this whole environment (prod) requires a

[symfony-users] Re: Project Deployment

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, mirfan wrote: i have disable no_script_name and enable mod_rewrite but it still not working Did you clear cache? -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups symfony users group.

[symfony-users] deployment of symfony project

2009-10-23 Thread mirfan
Hi, i have deployed a symfony project after successful deployment when i access it without any module its ok but when i access module it give me error the scenario is like this http://132.147.160.108/chk/web/index.php this link is accessible and

[symfony-users] Re: deployment of symfony project

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, mirfan wrote: i have deployed a symfony project after successful deployment when i access it without any module its ok but when i access module it give me error the scenario is like this http://132.147.160.108/chk/web/index.php this link is accessible and

[symfony-users] Re: Put action in cache

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, HAUSa wrote: My problem is that every time I use that select box, 9 queries are being executed. One for the retrieval of the main categories and then for every category to check if there are subcategories. I don't want all these queries to be executed every time. So,

[symfony-users] Re: deployment of symfony project

2009-10-23 Thread mirfan
i cant get what you want to say where i will find apache error log the project_name/log folder is empty On Oct 23, 6:54 pm, Eno symb...@gmail.com wrote: On Fri, 23 Oct 2009, mirfan wrote: i have deployed a symfony project after successfuldeploymentwhen i access it without any module its ok

[symfony-users] Re: Project Deployment

2009-10-23 Thread mirfan
thanks a lot it works when i clear the cache On Oct 23, 6:44 pm, Eno symb...@gmail.com wrote: On Fri, 23 Oct 2009, mirfan wrote: i have disable no_script_name and enable mod_rewrite but it still not working Did you clear cache? -- --~--~-~--~~~---~--~~

[symfony-users] use renderPartial in a filer

2009-10-23 Thread Georg Gell
Hi, afaik renderPartial is a method of the action. How can I call it in a filter? Probably through the action stack, but I am too tired to search through the docs again. Is it it fifo or filo? TIA Georg --~--~-~--~~~---~--~~ You received this message because you

[symfony-users] Re: having trouble customizing the admin generator

2009-10-23 Thread ashton
I have already added those. The widget shows up on the edit page, just without any content in it. i.e. it's always at 00:00 thought I had that info on there, sry. GameForm.class.php protected $minutes = array('00','05', 10,15,20,25,30,35,40,45,50,55); public function configure() {

[symfony-users] Re: Another local/distant difference : sfDoctrineGuard popup

2009-10-23 Thread Alexandre SALOME
Try cleaning your cache/cookies/all possible and try again. Maybe a referer problem. 2009/10/23 aymeric elag...@gmail.com I switched logging to on for the prod backend but the log file doesn't show up in the /log folder. I enabled access to the dev backend and its log file looks like this :

[symfony-users] Re: having trouble customizing the admin generator

2009-10-23 Thread Alexandre SALOME
Try adding an updateEndTimeColumn method in your form : class GameForm extends ... { // .. public function updateEndTimeColumn($value) { die(yes !); $this-getObject()-setEndTime($value); } } Alexandre 2009/10/23 ashton ahonn...@gmail.com I have already added those. The

[symfony-users] Re: Project Deployment

2009-10-23 Thread Alexandre SALOME
!!! Double check http://132.147.160.108/civil_users/config/databases.ymldoesn't works !!! 2009/10/23 mirfan m.irfa...@gmail.com thanks a lot it works when i clear the cache On Oct 23, 6:44 pm, Eno symb...@gmail.com wrote: On Fri, 23 Oct 2009, mirfan wrote: i have disable no_script_name

[symfony-users] Re: having trouble customizing the admin generator

2009-10-23 Thread ashton
That will die when the form is submitted. Unfortunately, that's not the issue that I'm having, what I'm seeing is that when going to the edit page initially, getEndTime never gets called, and my end_time widget doesn't get any values. Before I submit the form, just loading the page. On Oct 23,

[symfony-users] Re: Required fields i18n

2009-10-23 Thread Alexandre SALOME
OK sorry, I thought you wanted something more specific : one language form must be filled. english, or spanish or french. But if the only required form is english... you're done ;) 2009/10/23 michael.pie...@googlemail.com michael.pie...@googlemail.com That I'm not sure i understand you was

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
I've already overloaded signin for a few other reasons, but the solution you suggest would would only be part of the solution, because if I disable a user I would have to remove all of the user's permissions also. Otherwise, the user could manually navigate to a page to which he/she had access.

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Alexandre SALOME
So the other part would be to overload the hasCredentials method and add in the top of it : if (!$this-isActive()) { return false; } Other solution : create a filter : if the user account is inactive, redirect him class myFilter extends sfFilter { public function execute($filterChain) {

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Thanks, yeah I can do this. Really my original question is if anyone has come across any solutions (eg: plugins) that handle this type of action. I don't writing proprietary code for stuff that should really be handled by the framework. :-) Cheers, Steve On Oct 23, 12:28 pm, Alexandre SALOME

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Raphael
yes Gareth, but. if only load a complete action, you load templates, debug_bar and others. if you dont know methos for drop this of request. because this I recomender render text or partial. On Fri, Oct 23, 2009 at 11:41 AM, Gareth McCumskey gmccums...@gmail.comwrote: No you don't. You can load

[symfony-users] Re: popup

2009-10-23 Thread hhaythem
I'm sorry I rephrase my request in English so, I'm new to this forum and a beginner with symfony, here in brief I need a little help on creating popup window with the symfony admin generator. to be clearer I created a object_actions addcomment in the generator.yml and then I don't know what to

[symfony-users] get_partial bug in events?

2009-10-23 Thread Steve Sanyal
Hi, I have an action with an event notification inside it. The event handler has a get_partial call in it. I get a PHP undefined function error with get_partial if I have not previously called get_partial within the action itself. I noticed this because the failure only occurs if a specific

[symfony-users] Re: get_partial bug in events?

2009-10-23 Thread Steve Sanyal
Sorry, I realized after sending this that the way I called get_partial in the action is a $this-getPartial() call. When I looked inside that method, it has the following line: $this-getContext()-getConfiguration()-loadHelpers('Partial'); This will load the helper in the event handler to

[symfony-users] Re: having trouble customizing the admin generator

2009-10-23 Thread ashton
Rather, that does die when the form is submitted. On Oct 23, 9:31 am, ashton ahonn...@gmail.com wrote: That will die when the form is submitted.  Unfortunately, that's not the issue that I'm having, what I'm seeing is that when going to the edit page initially, getEndTime never gets called,

[symfony-users] Re: link_to_remote() - using ajax to delete posts

2009-10-23 Thread Gareth McCumskey
a link_to_remote pointing at an action and that action processing on to a regular does not cause any problem whatsoever! Read the documentation again. Symfony automatically does not include the layout around a template file if it is being loaded in response to an Ajax request. 2009/10/23 Raphael

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Agreed on all points. The solution I would prefer is for the sf_guard_user table to have a is_disabled field in addition to its is_active field. The disabled field would always be checked in an appropriate filter. I am just surprised there isn't a solution within the framework or the standard

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread david
My email with the attachment appears to have found itself stuck so you can find it on Pastie: http://pastie.org/667060 If you don't need any support for it - then there's a filter attached you can use. It's pretty self evident how it works and it needs to be in your apps/app/lib folder

[symfony-users] Re: having trouble customizing the admin generator

2009-10-23 Thread ashton
I copied the _form.php template out of the cache, and added var_dump($form['end_time']-getValue()); which yields: NULL the other fields print correctly: var_dump($form['end_ts']-getValue()); prints string(19) 2008-12-05 01:00:00 which leads me to think that the issue has

[symfony-users] Re: disabled user solution for symfony

2009-10-23 Thread Steve Sanyal
Thanks a lot. I'll take a look. Do you write plugins for the framework? Cheers, Steve On Oct 23, 3:17 pm, david da...@inspiredthinking.co.uk wrote: My email with the attachment appears to have found itself stuck so you can   find it on Pastie:http://pastie.org/667060 If you don't need any

[symfony-users] Re: deployment of symfony project

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, mirfan wrote: i cant get what you want to say where i will find apache error log the project_name/log folder is empty Your Apache config file will say where the error log is and what its called. Look for the ErrorLog directive. Could also be set inside the

[symfony-users] Re: use renderPartial in a filer

2009-10-23 Thread Steve Sanyal
You're just adding text the response content in renderPartial. So you can do something like: $ctx = sfContext::getInstance(); $ctx-getConfiguration()-loadHelpers('Partial'); $content = get_partial(...); $ctx-getResponse()-setContent($ctx-getResponse()-getContent(). $text); On Oct 23, 10:07 

[symfony-users] Re: Project Deployment

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, mirfan wrote: thanks a lot it works when i clear the cache You should always clear cache when making config changes. http://www.symfony-project.org/book/1_2/05-Configuring-Symfony#chapter_05_the_configuration_cache --

[symfony-users] Re: popup

2009-10-23 Thread hhaythem
to Frank Stelzer tkx a lot u save my life. lol --~--~-~--~~~---~--~~ 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

[symfony-users] Dependency injection component conditionnal dependencies

2009-10-23 Thread jukea
Hi, I just went through the whole DI documentation, but I'm still left with 2 question : I want to build an environment where plugins will define services. I'm planning have each plugin specify their own service definitions, in XML too, which I think would be the way to go about it. The 1st

[symfony-users] Re: use renderPartial in a filer

2009-10-23 Thread david
There's a good example of what Steve is talking about http://www.symfony-project.org/book/1_2/06-Inside-the-Controller-Layer#chapter_06_sub_sample_filters On Fri, 23 Oct 2009 22:28:36 +0200, Steve Sanyal steve.san...@gmail.com wrote: You're just adding text the response content in

[symfony-users] Re: Dependency injection component conditionnal dependencies

2009-10-23 Thread david
This approach usually uses a registry that allows plugins to register their definitions. Think about how plugin:publish-assets works - moving front-end content to specific directories - providing, in a way, a registry of front-end assets. Then in your XML schema definition you have

[symfony-users] what would suppress a fatal error so it does not appear in the error log?

2009-10-23 Thread larry
My site seems to be dying on this line: ?php include_component('category', 'categoryOld') ? I look in the error log and I find no fatal error, only errors and warnings, none fatal. What could suppress a fatal error so it doesn't show up in the error log?

[symfony-users] Re: what would suppress a fatal error so it does not appear in the error log?

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, larry wrote: My site seems to be dying on this line: ?php include_component('category', 'categoryOld') ? I look in the error log and I find no fatal error, only errors and warnings, none fatal. What could suppress a fatal error so it doesn't show up in the error

[symfony-users] Re: what would suppress a fatal error so it does not appear in the error log?

2009-10-23 Thread larry
Seems to be working now. Not sure what happened. I rebuilt the model, the forms, and cleared the cache, and now it works. But it is very odd that there was no error in the error log, nor on screen. On Oct 23, 9:35 pm, larry lkrub...@geocities.com wrote: My site seems to be dying on this line:

[symfony-users] Re: Dependency injection component conditionnal dependencies

2009-10-23 Thread larry
Fabien Potencier wrote about the service container they were working toward earlier this year: http://fabien.potencier.org/article/16/symfony-service-container-the-need-for-speed That is a 6 part series about how he envisions dependency injection in Symfony. On Oct 23, 6:43 pm, jukea

[symfony-users] Re: what would suppress a fatal error so it does not appear in the error log?

2009-10-23 Thread Eno
On Fri, 23 Oct 2009, larry wrote: Seems to be working now. Not sure what happened. I rebuilt the model, the forms, and cleared the cache, and now it works. But it is very odd that there was no error in the error log, nor on screen. Im guessing that clearing the cache helped :-) --