[symfony-users] Re: Error 500 when i try to login the web app in production
Problem solved: locally i have, for example, my web directory in /opt/lammp/htdocs/ rs/web. Remotely i had /public_html/web, now I changed to /public_html/ rs/web and no error 500 anymore. Javi On Mar 10, 9:45 pm, Javier Garcia tirengar...@gmail.com wrote: More news: when i get that 500 error this line below is written also in web/error_log: [10-Mar-2010 14:37:57] PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2) Even if i have written this in databases.yml: dev: test: all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=tirengar_rs username: tirengar password: mypassword Any idea? Gabor, i commented the line with Options but the error is the same. Javi On 03/10/2010 04:31 PM, G bor F si wrote: Then try what I said, and comment the Options.. line in your .htaccess. I've seen that line cause troubles. On Wed, Mar 10, 2010 at 13:34, Javier Garciatirengar...@gmail.com wrote: On 03/10/2010 10:07 AM, Eno wrote: You need to ask whoever is hosting the application to add the config directives to your vhost configuration Do you mean modify httpd.conf? I can not modify httpd.conf, not even if i ask to modify it. On 03/10/2010 10:07 AM, Eno wrote: You need to ask whoever is hosting the application to add the config directives to your vhost configuration (or switch on .htaccess for your vhost). From my hosting provider told me i have enable .htaccess (mod_rewrite). Javi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Error 500 when i try to login the web app in production
Problem solved: locally i have, for example, my web directory in /opt/lammp/htdocs/ rs/web. Remotely i had /public_html/web, now I changed to /public_html/ rs/web and no error 500 anymore. Javi On Mar 10, 9:45 pm, Javier Garcia tirengar...@gmail.com wrote: More news: when i get that 500 error this line below is written also in web/error_log: [10-Mar-2010 14:37:57] PDO Connection Error: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2) Even if i have written this in databases.yml: dev: test: all: doctrine: class: sfDoctrineDatabase param: dsn: mysql:host=localhost;dbname=tirengar_rs username: tirengar password: mypassword Any idea? Gabor, i commented the line with Options but the error is the same. Javi On 03/10/2010 04:31 PM, G bor F si wrote: Then try what I said, and comment the Options.. line in your .htaccess. I've seen that line cause troubles. On Wed, Mar 10, 2010 at 13:34, Javier Garciatirengar...@gmail.com wrote: On 03/10/2010 10:07 AM, Eno wrote: You need to ask whoever is hosting the application to add the config directives to your vhost configuration Do you mean modify httpd.conf? I can not modify httpd.conf, not even if i ask to modify it. On 03/10/2010 10:07 AM, Eno wrote: You need to ask whoever is hosting the application to add the config directives to your vhost configuration (or switch on .htaccess for your vhost). From my hosting provider told me i have enable .htaccess (mod_rewrite). Javi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Why is this bug still not fixed?
http://groups.google.com/group/symfony-devs/browse_thread/thread/73bf59078347a57b/9ea00a7ebaa591de It's posted by someone very long ago,single action per file is not going to be fully supported? -- 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] Memory usage...
First of all ensure that you aren't benchmarking memory usage in the dev environment as it adds a ton of extra debug/log/etc information into memory. Secondly, look at your use of hydration elements in the ORM. I have never used Doctrine, but we have switched a number of our queries that return large datasets from a doSelect call (which creates an array of objects related to each returned result) to a doSelectRS/doSelectStmt (depending on propel version) which is just a single object of resultsets. On Thu, Mar 11, 2010 at 2:37 AM, Bruno Reis bruno.p.r...@gmail.com wrote: Hi all... how much memory a normal sf + doctrine thread uses? We are having serious problems here with an application. I seems like it´s leaking memory, we updated php to 5.3 but had no success at all. Apache threads start with 16 MB and soon get to 50MB. Does anyone know what might be happening? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Check for a non-existing relation in Propel
I have a multi-multi relation in my model: zipcode: id:{ type: integer, required: true, primaryKey: true, autoIncrement: true } region_id: { type: integer, foreignTable: region, foreignReference: id, required: true, onDelete: cascade } slug: { type: varchar, required: true, index: unique } address: { type: varchar, required: true } zipcode: { type: varchar, required: true } city: { type: varchar, required: true } theme: id:{ type: integer, required: true, primaryKey: true, autoIncrement: true } title: { type: varchar, required: true } slug: { type: varchar, required: true, index: unique } link_zipcode_theme: zipcode_id: { type: integer, foreignTable: zipcode, foreignReference: id, primaryKey: true, required: true, onDelete: cascade } theme_id: { type: integer, foreignTable: theme, foreignReference: id, primaryKey: true, required: true, onDelete: cascade } How do I build a Criteria for Propel where it takes al zipcodes which are NOT related to a theme? -- 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] Admin generator, embedded forms not saving their many-many's
Hello everyone, When I embed Form B into Form A in an admin module, where Form B contains a many-many relation, the changes to the many-many table (with the sfWidgetFormSelectDoubleList, or even with the default widget) are not saved to the db. If I create a separate admin module directly for Form B's model (i.e. no nesting/embedding forms), the changes to the many-many field are saved. I've got the feeling I must be missing something obvious here... Any ideas? A. -- 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] Admin generator, embedded forms not saving their many-many's
http://trac.symfony-project.org/ticket/5867 I'm using symfony 1.4 and have the same problem, fixed the same way. Any update on what is going on here? Is it supposed to be fixed and am I missing something? A. -Oorspronkelijk bericht- Van: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] Namens Alexander Deruwe Verzonden: donderdag 11 maart 2010 13:35 Aan: symfony-users@googlegroups.com Onderwerp: [symfony-users] Admin generator, embedded forms not saving their many-many's Hello everyone, When I embed Form B into Form A in an admin module, where Form B contains a many-many relation, the changes to the many-many table (with the sfWidgetFormSelectDoubleList, or even with the default widget) are not saved to the db. If I create a separate admin module directly for Form B's model (i.e. no nesting/embedding forms), the changes to the many-many field are saved. I've got the feeling I must be missing something obvious here... Any ideas? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Event dispatcher can't find the class in lib/vendor
Hello everyone, I would like use Event dispatcher to call one third party method in *lib/vendor/*, but it doesn't work. the dispatcher can't find this class. But when I use one class in *lib/*, it works, I don't know why the first test doesn't work. Here is my code: class SomeClass { protected $dispatcher = null; public function __construct(sfEventDispatcher $dispatcher) { $this-dispatcher = sfContext::getInstance()-getEventDispatcher(); } public function someMethod(){ // some code $event = new sfEvent($this, 'api.update_message', array('message' = $message)); $this-dispatcher-notifyUntil($event); if (!$event-isProcessed()) { throw new sfException(sprintf('Call to undefined method %s::%s.', get_class($this), 'api.insert_chatbotmessage')); } return; } } in *lib/vendor/* : class Target { static public function listenToInsertMessage(sfEvent $event) { $message = $event['message']; // some code return true; } } When I call another listener in *lib/* , everything goes fine, so I wonder if symfony not include classes from *lib/vendor* by default? Any suggestion is welcome. Thanks a lot. JoJo -- 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] Fwd: Event dispatcher can't find the class in lib/vendor
Wow, just find why. Because from symfony 1.3 class in vendor don't load automatically, if you wan to do so, just include this in autoload.yml here is the doc: http://www.symfony-project.org/tutorial/1_4/fr/upgrade it works now, cool -- Forwarded message -- From: Dong YANG jojoyangd...@gmail.com Date: 2010/3/11 Subject: Event dispatcher can't find the class in lib/vendor To: symfony-users@googlegroups.com Hello everyone, I would like use Event dispatcher to call one third party method in *lib/vendor/*, but it doesn't work. the dispatcher can't find this class. But when I use one class in *lib/*, it works, I don't know why the first test doesn't work. Here is my code: class SomeClass { protected $dispatcher = null; public function __construct(sfEventDispatcher $dispatcher) { $this-dispatcher = sfContext::getInstance()-getEventDispatcher(); } public function someMethod(){ // some code $event = new sfEvent($this, 'api.update_message', array('message' = $message)); $this-dispatcher-notifyUntil($event); if (!$event-isProcessed()) { throw new sfException(sprintf('Call to undefined method %s::%s.', get_class($this), 'api.insert_chatbotmessage')); } return; } } in *lib/vendor/* : class Target { static public function listenToInsertMessage(sfEvent $event) { $message = $event['message']; // some code return true; } } When I call another listener in *lib/* , everything goes fine, so I wonder if symfony not include classes from *lib/vendor* by default? Any suggestion is welcome. Thanks a lot. JoJo -- 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] about transfert of a symfony project
hi i have change my computer to another . i have began a symfony project in my previous machine and i would like to transfer it in my new laptop what is the procedure to do it? thanks in advance! mbello -- 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] Unescaping HTML content
Hi all, I have a Page model with a content property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : ?php // ... echo $page-getContent(); // ? The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : ?php slot('title', $page-getTitle()); echo sfOutputEscaper::unescape($page-getContent()) ; ? But it doesn't work either... I even tried: var_dump($page-getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! pre class='xdebug-var-dump' dir='ltr'smallstring/small font color='#cc''lt;pgt;lt;stronggt;Lorem ipsum dolor sit ametlt;/stronggt;, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'.../font i(length=1089)/i /pre Is there anybody to explain it to me ? Thanks a lot ! Romain -- 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] Jobeet Tutorial
On Thu, 11 Mar 2010, DEEPAK BHATIA wrote: I have created the jobeet tutorial but following command is failing php symfony propel:generate-module --with-show --non-verbose-templates frontend job JobeetJob Error Message:- [?php use_stylesheets_for_form($form) ?] [?php use_javascripts_for_form($form) ?] Fatal error: Class 'JobeetJobForm' not found in /home/sfprojects/jobeet/lib/vendor/symfony/lib/generator/sfModelGenerator.class.php on line 331 If you're following the tutorial, then it says you have to run: php symfony propel:build --all --no-confirmation to build everything including the forms and validators. -- -- 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] propel:data-load gets a cli error
On Wed, 10 Mar 2010, manguito wrote: After entering the propel:data-load task, using the command line interface or neatbeans I get a CLI error error signature ModName: php_pdo_mysql.dll I use PHP 5.2.10 (manually installed), Apache 2.2.13 and Mysql 5.1 Anybody willing to help me? What does manually installed mean? Are you using WAMP or XAMPP ? Look at http://www.apachefriends.org/f/viewtopic.php?f=16t=32617 -- -- 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: Unescaping HTML content
Hi Romain, how about $page-getContent(ESC_RAW); or also: $page-getRawValue()-getContent(); ? With $page you are actually talking to a sfOutputEscaperObjectDecorator object, which holds your Page object in its $value property. See the __call method in class sfOutputEscaperObjectDecorator (symfony lib v.1.4.3). RAPHAEL+ -- 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: Unescaping HTML content
None of this worked, and I really don't get why even my var_dump() is escaped, it never happened before :/ With : ?php slot('title', $page-getTitle()); echo $page-getContent(ESC_RAW); die(); ? I can see my HTML is properly unescaped, somehow my view is re-escaped, is it possible to deactivate that? oO Le 11 mars 2010 à 15:05, Raphael Schumacher a écrit : Hi Romain, how about $page-getContent(ESC_RAW); or also: $page-getRawValue()-getContent(); ? With $page you are actually talking to a sfOutputEscaperObjectDecorator object, which holds your Page object in its $value property. See the __call method in class sfOutputEscaperObjectDecorator (symfony lib v.1.4.3). RAPHAEL+ -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] propel:build-schema not working[jobeet]
Did you generate your project with `--orm=Propel` ? Check your ProjectConfiguration class, is the propel plugin enabled? On Thu, Mar 11, 2010 at 13:26, Tahar Yazid Touaibia ytouaib...@gmail.com wrote: Hello, I am new to symfony, i just installed it and am trying to follow the jobeet tutorial. When i run the following command i got an error : php symfony propel:build-schema The message displayed : there are no tasks defined in the Propel namespace. I running symfony on wamp and here is the result of my check_configuration.php file : ** Mandatory requirements ** OK PHP version is at least 5.2.4 (5.2.5) ** Optional checks ** OK PDO is installed OK PDO has some drivers installed: mysql, sqlite2 OK PHP-XML module is installed OK XSL module is installed OK The token_get_all() function is available OK The mb_strlen() function is available OK The iconv() function is available OK The utf8_decode() is available [[WARNING]] The posix_isatty() is available: FAILED *** Enable the php_posix extension (used to colorized the CLI output) *** [[WARNING]] A PHP accelerator is installed: FAILED *** Install a PHP accelerator like APC (highly recommended) *** OK php.ini has short_open_tag set to off OK php.ini has magic_quotes_gpc set to off OK php.ini has register_globals set to off OK php.ini has session.auto_start set to off OK PHP version is not 5.2.9 I would appreciate any help that can let me go further in the tutorial. Thanks in advance Yaz -- -- 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: Unescaping HTML content
Have you verified (e.g. using your debugger) that the object's classnames are in reality what you should expect in theory? - the escaping strategy for your application? - the classname of $page object? (should be sfOutputEscaperObjectDecorator) - the classname of $page-$value property? (should be Page) - is this code contained in a layout, template, component (slot) or a partial? -- 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: Unescaping HTML content
Le 11 mars 2010 à 15:30, Raphael Schumacher a écrit : Have you verified (e.g. using your debugger) that the object's classnames are in reality what you should expect in theory? http://up.r12t.fr/8c2b8c76.png Yep, It's NOEPage as it's supposed to be - the escaping strategy for your application? # Output escaping settings escaping_strategy: true escaping_method:ESC_SPECIALCHARS - the classname of $page object? (should be sfOutputEscaperObjectDecorator) http://up.r12t.fr/a4dbee66.png wow, it's an instance of sfOutputEscaperIteratorDecorator, can I say WTF ? I'm fetching it using sfDoctrineRoute, I don't get it oO $this-page = $this-getRoute()-getObject(); $this-forward404unless($this-page); - the classname of $page-$value property? (should be Page) what do you mean ? - is this code contained in a layout, template, component (slot) or a partial? It's a template Thanks ! :) -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Jobeet Tutorial
Thanks, the response from symfony google groups is ogood that I prefer putting queries at the shot On Thu, Mar 11, 2010 at 7:16 PM, Eno symb...@gmail.com wrote: On Thu, 11 Mar 2010, DEEPAK BHATIA wrote: I have created the jobeet tutorial but following command is failing php symfony propel:generate-module --with-show --non-verbose-templates frontend job JobeetJob Error Message:- [?php use_stylesheets_for_form($form) ?] [?php use_javascripts_for_form($form) ?] Fatal error: Class 'JobeetJobForm' not found in /home/sfprojects/jobeet/lib/vendor/symfony/lib/generator/sfModelGenerator.class.php on line 331 If you're following the tutorial, then it says you have to run: php symfony propel:build --all --no-confirmation to build everything including the forms and validators. -- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Unescaping HTML content
Hi, try $page-getContent('ESC_RAW'); or setup the default escaping behaviour in settings.yml check this: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping Giorgio Mandolini 2010/3/11 Romain Pouclet pall...@gmail.com Hi all, I have a Page model with a content property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : ?php // ... echo $page-getContent(); // ? The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : ?php slot('title', $page-getTitle()); echo sfOutputEscaper::unescape($page-getContent()) ; ? But it doesn't work either... I even tried: var_dump($page-getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! pre class='xdebug-var-dump' dir='ltr'smallstring/small font color='#cc''lt;pgt;lt;stronggt;Lorem ipsum dolor sit ametlt;/stronggt;, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'.../font i(length=1089)/i /pre Is there anybody to explain it to me ? Thanks a lot ! Romain -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] i need help urgent
hello for all symfony users, i have a problem with my symfony project i have two forms ** main form for user ** embed form for phonenumber the relation between user and phonenumber is one-many in the model phonenumber i have a column id_user in the file : UserForm.class.php i have ahh this lines to the configure methode: $number1 = new phonenumber (); $number1-id_user=$this-getobject()-id_user(); $this-embedForm('number_1',new PhonenumberForm($number1) ); the form appear 5/5 but when i save the form i'll have an error in the subform of number_1 i think i must modify the save methode can any one help me please , this is my final education project -- 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: Task configure:database is not defined
I'm little bit noob too with this framework... I've read online php cli does not work for windows (I have the same error: configure:database, but the check_configuration.php file tell me also that posix is not enabled). is that true? how can I set this option on windows? thank you. On 24 Feb, 23:20, Trung Huynh forrestgu...@gmail.com wrote: Got it working just a minute ago! What a newb mistake of me to use the symfony in the lib/vendor/symfony/data/lib/bin instead of the working directory. Pardon me for the newb mistake, it has been 6 years I've done some coding with PHP. I really love symfony's filosophy and documentation. On Wed, Feb 24, 2010 at 11:15 PM, jp_morvan sacri...@free.fr wrote: Hi, Verify that php.ini for php cli is activated and is well configurated. Try to use php ./symfony configure:database in your project, sometimes, symfony is already installed and another symfony is launch. On 24 fév, 22:18, Trung Huynh forrestgu...@gmail.com wrote: Hi After setting up the latest 1.4 stable version of Symfony according the official documentation I ran into this error: executing php symfony configure:database mysql:host=localhost;dbname=dbname root password Task configure:database is not defined. symfony -V gives: symfony version 1.4.2 (/Users/trung/Websites/lib/vendor/symfony/lib) Has the symfony tool been changed or didn't i properly set it up? I didnt ran into errors in the previous steps. Please help :) -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@goog legroups.com . For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. -- Cheers, Trung -- 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] Embedded forms
Hi all, I have a form with an embedded form and I'd like to reorder the fields in the form and optionally mix fields from the main form and the embedded form. I found this blog post http://www.blogs.uni-osnabrueck.de/rotapken/2009/03/13/symfony-merge-embedded-form/ and I think the approach is not bad. But I want to use a sfValidatorDoctrineUnique as postValidator on a field of the embedded form. Since the form fields of the embedded forms are renamed in the process of merging the forms (e.g. email = profile|email) the validator does not find a form field matching the database field and passes. Is there a better approach to be able to mix and reorder form fields with embedded form fields? Cheers, Lea -- 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] i need help urgent
On Thu, 11 Mar 2010, Belgacem TLILI wrote: hello for all symfony users, i have a problem with my symfony project i have two forms ** main form for user ** embed form for phonenumber the relation between user and phonenumber is one-many in the model phonenumber i have a column id_user in the file : UserForm.class.php i have ahh this lines to the configure methode: $number1 = new phonenumber (); $number1-id_user=$this-getobject()-id_user(); $this-embedForm('number_1',new PhonenumberForm($number1) ); the form appear 5/5 but when i save the form i'll have an error in the subform of number_1 i think i must modify the save methode can any one help me please , this is my final education project Maybe this well help: http://www.symfony-project.org/blog/2008/11/10/call-the-expert-nested-forms-a-real-implementation -- -- 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] Unescaping HTML content
It does not change anything, I really don't get why and more importantly why my $page variable classname is sfOutputEscaperIteratorDecorator? That doesn't make any sense :/ I tried to deactivate the escaping, and I got my HTML properly displayed, the problem is somewhere else... Le 11 mars 2010 à 15:04, Giorgio Mandolini a écrit : Hi, try $page-getContent('ESC_RAW'); or setup the default escaping behaviour in settings.yml check this: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping Giorgio Mandolini 2010/3/11 Romain Pouclet pall...@gmail.com Hi all, I have a Page model with a content property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : ?php // ... echo $page-getContent(); // ? The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : ?php slot('title', $page-getTitle()); echo sfOutputEscaper::unescape($page-getContent()) ; ? But it doesn't work either... I even tried: var_dump($page-getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! pre class='xdebug-var-dump' dir='ltr'smallstring/small font color='#cc''lt;pgt;lt;stronggt;Lorem ipsum dolor sit ametlt;/stronggt;, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'.../font i(length=1089)/i /pre Is there anybody to explain it to me ? Thanks a lot ! Romain -- 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 -- 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] Unescaping HTML content
It's because objects and variable are escaped before being passed to the view. Are you echoing your content inside a slot (or partial?) that might be automatically or manually escaped after that? On Thu, Mar 11, 2010 at 4:52 PM, Romain Pouclet pall...@gmail.com wrote: It does not change anything, I really don't get why and more importantly why my $page variable classname is sfOutputEscaperIteratorDecorator? That doesn't make any sense :/ I tried to deactivate the escaping, and I got my HTML properly displayed, the problem is somewhere else... Le 11 mars 2010 à 15:04, Giorgio Mandolini a écrit : Hi, try $page-getContent('ESC_RAW'); or setup the default escaping behaviour in settings.yml check this: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping Giorgio Mandolini 2010/3/11 Romain Pouclet pall...@gmail.com Hi all, I have a Page model with a content property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : ?php // ... echo $page-getContent(); // ? The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : ?php slot('title', $page-getTitle()); echo sfOutputEscaper::unescape($page-getContent()) ; ? But it doesn't work either... I even tried: var_dump($page-getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! pre class='xdebug-var-dump' dir='ltr'smallstring/small font color='#cc''lt;pgt;lt;stronggt;Lorem ipsum dolor sit ametlt;/stronggt;, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'.../font i(length=1089)/i /pre Is there anybody to explain it to me ? Thanks a lot ! Romain -- 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 -- 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] Telling Symfony to not create Form and Filter Classes from a Behavior
Hi every one, I'm using Symfony for a time and now I'm re-factorizing some code and I face something that I don't know how to solve: Using: Symfony 1.4, PHP 5.3 , MySQL, Linux By the I create a Doctrine Behavior : ?php class VotableBehavior extends Doctrine_Record_Generator { protected $_options = array ( 'className'='%CLASS%Votes', 'generateFiles'=true, 'children'= array (), 'builderOptions'= array ('BaseClassesDirectory'='base', 'Suffix'='.class.php'), 'options'= array () ); public function __construct( array $options) { $this-_options = Doctrine_Lib::arrayDeepMerge($this- _options, $options); } public function initOptions() { $dir = sfConfig::get('sf_lib_dir')./model/doctrine/; $this-setOption('generatePath', $dir); } public function setTableDefinition() { $class_table = $this-_options['table']; $this-setTableName($class_table-getTableName().'_votes'); $this-hasColumn('id', 'integer', 11, array ('type'='integer', 'length'=11, 'primary'=true, 'autoincrement'=true)); $this-hasColumn('vote', 'boolean', null, array ('type'='boolean' )); $this-hasColumn($class_table-getTableName().'_id', 'integer', 11, array ('type'='integer', 'length'=11, 'notnull'=true)); } public function setUp() { $this-actAs( new Doctrine_Template_Timestampable()); $this-actAs( new Userable()); } public function buildRelation() { $this-buildForeignRelation(votes); $this-buildLocalRelation(); } public function buildLocalRelation($alias = null) { $options = array('local'= $this-_options['table']- getTableName().'_id', 'foreign' = $this-_options['table']- getIdentifier(), 'type' = Doctrine_Relation::MANY); $options['type'] = Doctrine_Relation::ONE; $options['onDelete'] = 'CASCADE'; $options['onUpdate'] = 'CASCADE'; $this-_table-getRelationParser()-bind($this- _options['table']-getComponentName(), $options); } } When I make ./symfony doctrine:build-form and ./symfony doctrine:build- filter, symfony builds forms and filters for this Relational Model. I'vew tried: protected $_options = array ( 'className'='%CLASS%Votes', 'generateFiles'=true, 'children'= array (), 'builderOptions'= array ('BaseClassesDirectory'='base', 'Suffix'='.class.php'), 'options'= array ( 'symfony' = array ( 'form' = false, 'filter' = false ) ) ); But not working! If anyone could help to configure the behavior to not create Forms and Filters, I'll appreciate it Thanks Best Regards Jose Antonio Pio Acilia Internet S.L. Madrid Spain -- 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] Unescaping HTML content
I finally figured it out, this is what I found when I looked at my colleague layout.php : http://up.r12t.fr/94fc46c2.png He was passing $sf_content to a partial, so escaping then unescaping in my template, and finally re-escaping in the partial T_T Thanks for your time anyway :) Le 11 mars 2010 à 16:59, Marc Weistroff a écrit : It's because objects and variable are escaped before being passed to the view. Are you echoing your content inside a slot (or partial?) that might be automatically or manually escaped after that? On Thu, Mar 11, 2010 at 4:52 PM, Romain Pouclet pall...@gmail.com wrote: It does not change anything, I really don't get why and more importantly why my $page variable classname is sfOutputEscaperIteratorDecorator? That doesn't make any sense :/ I tried to deactivate the escaping, and I got my HTML properly displayed, the problem is somewhere else... Le 11 mars 2010 à 15:04, Giorgio Mandolini a écrit : Hi, try $page-getContent('ESC_RAW'); or setup the default escaping behaviour in settings.yml check this: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_output_escaping Giorgio Mandolini 2010/3/11 Romain Pouclet pall...@gmail.com Hi all, I have a Page model with a content property. This content contains HTML coming from the tinymce WYSIWYG editor, but when I do : ?php // ... echo $page-getContent(); // ? The HTML tags are escaped, which is good but I don't want Symfony to escape this one. Here is what I tried : ?php slot('title', $page-getTitle()); echo sfOutputEscaper::unescape($page-getContent()) ; ? But it doesn't work either... I even tried: var_dump($page-getContent()); just to check what I received, and even what is returned by var_dump( xdebug is installed and activated), is escaped ! pre class='xdebug-var-dump' dir='ltr'smallstring/small font color='#cc''lt;pgt;lt;stronggt;Lorem ipsum dolor sit ametlt;/stronggt;, consectetur adipiscing elit. Maecenas dapibus lobortis posuere. Vestibulum tempus commodo diam. Quisque suscipit fermentum lacus ac venenatis. Mauris ac nibh id purus eleifend accumsan sed vitae nulla. Vestibulum fermentum leo vitae odio rhoncus ac commodo orci sagittis. Ut pharetra neque id mauris tincidunt eu sodales felis sollicitudin. Mauris eu gravida nibh. Pellentesque eros risus, facilisis et interdum nec, fringilla a nisi. Fusce matti'.../font i(length=1089)/i /pre Is there anybody to explain it to me ? Thanks a lot ! Romain -- 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 -- 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 -- 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] best practice change web directory
Hello, just wondering if the following is considered the best practice for changing the web directory from the default www to html? class ProjectConfiguration extends sfProjectConfiguration { public function setup() { /* change web dir to html */ $this-setWebDir($this-getRootDir().DIRECTORY_SEPARATOR.'html'); } } Thanks, Kevin -- 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: i need help urgent
think you Eno, this does not help me i will explain my problem in a different why: i have 3 forms 1 - main form use a foreign key from form2 2- form2 3- form3 use a foreign key from main form so to save all the form in database we should 1= save object of form2 2= then save object of main form with the foreignkey from form2 3= and finally save the object of form3 with the key from the mainform i don't know if i must define the save function or what ? help me please On Mar 11, 4:49 pm, Eno symb...@gmail.com wrote: On Thu, 11 Mar 2010, Belgacem TLILI wrote: hello for all symfony users, i have a problem with my symfony project i have two forms ** main form for user ** embed form for phonenumber the relation between user and phonenumber is one-many in the model phonenumber i have a column id_user in the file : UserForm.class.php i have ahh this lines to the configure methode: $number1 = new phonenumber (); $number1-id_user=$this-getobject()-id_user(); $this-embedForm('number_1',new PhonenumberForm($number1) ); the form appear 5/5 but when i save the form i'll have an error in the subform of number_1 i think i must modify the save methode can any one help me please , this is my final education project Maybe this well help:http://www.symfony-project.org/blog/2008/11/10/call-the-expert-nested... -- -- 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: i need help urgent
Hmmmz i dunno exactly ... but: 1. you could merge the forms. 2. Override the save or saveEmbededForms method 3. Make sure that you are using the 3rd form ... the rest should be embeded... Form2 is embeded in Form1 which is embeded Form3 ... After just call new Form3(); Alecs On Thu, Mar 11, 2010 at 8:52 PM, Belgacem TLILI belgacem0...@gmail.comwrote: think you Eno, this does not help me i will explain my problem in a different why: i have 3 forms 1 - main form use a foreign key from form2 2- form2 3- form3 use a foreign key from main form so to save all the form in database we should 1= save object of form2 2= then save object of main form with the foreignkey from form2 3= and finally save the object of form3 with the key from the mainform i don't know if i must define the save function or what ? help me please On Mar 11, 4:49 pm, Eno symb...@gmail.com wrote: On Thu, 11 Mar 2010, Belgacem TLILI wrote: hello for all symfony users, i have a problem with my symfony project i have two forms ** main form for user ** embed form for phonenumber the relation between user and phonenumber is one-many in the model phonenumber i have a column id_user in the file : UserForm.class.php i have ahh this lines to the configure methode: $number1 = new phonenumber (); $number1-id_user=$this-getobject()-id_user(); $this-embedForm('number_1',new PhonenumberForm($number1) ); the form appear 5/5 but when i save the form i'll have an error in the subform of number_1 i think i must modify the save methode can any one help me please , this is my final education project Maybe this well help: http://www.symfony-project.org/blog/2008/11/10/call-the-expert-nested... -- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Have a nice day! Alecs Certified ScrumMaster There are no cannibals alive! I have ate the last one yesterday ... I am on web: http://www.alecslupu.ro/ I am on twitter: http://twitter.com/alecslupu I am on linkedIn: http://www.linkedin.com/in/alecslupu Tel: (+4)0722 621 280 -- 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] Paginate the result of two queries
Hi, to get the friends of a user i have a table like this: AmigoUsuario: columns: user1_id: type: integer(4) user2_id: type: integer(4) estado: type: integer default: 0 relations: User1: class: Usuario local: user1_id foreignAlias: AmigosUsuario onDelete: CASCADE User2: class: Usuario local: user2_id foreignAlias: AmigosUsuario onDelete: CASCADE I have also these queries below to get friends of a user (I have two queries because the id of the user can be stored as User1 or User2). These are the queries: // hemos tenido que hacer dos querys porque la amistad puede estar definida // en cualquiera de la dos direcciones (así X-Y o así Y-X) $q1 = Doctrine_Query::create() -from('Usuario u') -leftJoin('u.AmigoUsuario a ON u.id = a.user2_id') -where(a.user1_id = ?, $id) -andWhere(a.estado LIKE ?, 1); $q2 = Doctrine_Query::create() -from('Usuario u') -leftJoin('u.AmigoUsuario a ON u.id = a.user1_id') -where(a.user2_id = ?, $id) -andWhere(a.estado LIKE ?, 1); Now i want to paginate the results. What is your advice? Regards 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
Re: [symfony-users] best practice change web directory
You can do this: $this-setWebDir($this-getRootDir().'/public_html'); bye Augusto Morais 2010/3/11 Kevin kevinb...@gmail.com Hello, just wondering if the following is considered the best practice for changing the web directory from the default www to html? class ProjectConfiguration extends sfProjectConfiguration { public function setup() { /* change web dir to html */ $this-setWebDir($this-getRootDir().DIRECTORY_SEPARATOR.'html'); } } Thanks, Kevin -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: i need help urgent
thank (not think) you Alexandru-Emil this is the solution i must override the saveEmbededForms method public function saveEmbeddedForms($con = null, $forms = null) { if (null === $con) { $con = $this-getConnection(); } if (null === $forms) { $forms = $this-embeddedForms; } foreach ($forms as $form) { if ($form instanceof sfFormObject) { $form-saveEmbeddedForms($con); if ($form instanceof form3) { $form-getObject()-relation_name($this-getObject()); } $form-getObject()-save($con); } else { $this-saveEmbeddedForms($con, $form-getEmbeddedForms()); } } } On Mar 11, 8:14 pm, Alexandru-Emil Lupu gang.al...@gmail.com wrote: Hmmmz i dunno exactly ... but: 1. you could merge the forms. 2. Override the save or saveEmbededForms method 3. Make sure that you are using the 3rd form ... the rest should be embeded... Form2 is embeded in Form1 which is embeded Form3 ... After just call new Form3(); Alecs On Thu, Mar 11, 2010 at 8:52 PM, Belgacem TLILI belgacem0...@gmail.comwrote: think you Eno, this does not help me i will explain my problem in a different why: i have 3 forms 1 - main form use a foreign key from form2 2- form2 3- form3 use a foreign key from main form so to save all the form in database we should 1= save object of form2 2= then save object of main form with the foreignkey from form2 3= and finally save the object of form3 with the key from the mainform i don't know if i must define the save function or what ? help me please On Mar 11, 4:49 pm, Eno symb...@gmail.com wrote: On Thu, 11 Mar 2010, Belgacem TLILI wrote: hello for all symfony users, i have a problem with my symfony project i have two forms ** main form for user ** embed form for phonenumber the relation between user and phonenumber is one-many in the model phonenumber i have a column id_user in the file : UserForm.class.php i have ahh this lines to the configure methode: $number1 = new phonenumber (); $number1-id_user=$this-getobject()-id_user(); $this-embedForm('number_1',new PhonenumberForm($number1) ); the form appear 5/5 but when i save the form i'll have an error in the subform of number_1 i think i must modify the save methode can any one help me please , this is my final education project Maybe this well help: http://www.symfony-project.org/blog/2008/11/10/call-the-expert-nested... -- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.comsymfony-users%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Have a nice day! Alecs Certified ScrumMaster There are no cannibals alive! I have ate the last one yesterday ... I am on web: http://www.alecslupu.ro/ I am on twitter:http://twitter.com/alecslupu I am on linkedIn:http://www.linkedin.com/in/alecslupu Tel: (+4)0722 621 280 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Doctrine Admin Generator Problem
I'm having some problems with using relations and doctrine:generate-admin. I have two tables, call them Users and Umbrellas. There is a one-to-many relation between Users and Umbrellas, specifically ... class Umbrella extends sfDoctrineRecord { public function setUp () { $this-hasOne ('User as owner', array ('local' = 'owner_id', 'foreign' = 'id')); } } The User::setUp function does not specify a relation with Umbrella. I want to make an admin interface that allows admins to create Umbrella objects. The first issue is that the widget created to input the owner_id is an sfWidgetFormDoctrineChoice which makes a select-type input with every possible user id. This is undesirable for 2 reasons, first there are far too many users ( 100,000) to populate a select-type input. Secondly, it is much more intuitive to specify a user by username instead of by numeric id. I took care of this first issue by overriding the auto-generated widget/validator, i.e. ... class UmbrellaForm extends BaseUmbrellaForm { public function configure () { parent::configure (); $this-setWidget('owner_id', new sfWidgetFormInput ()); $this-setValidator ('owner_id', new UserValidator ()); } public function updateDefaultsFromObject () { parent::updateDefaultsFromObject (); $this-setDefault ('owner_id', $this-getObject ()-owner-username; } } class UserValidator extends sfValidatorString { public function doClean ($value) { $value = parent::doClean ($value); $user = UserTable::getByUsername ($value); /* check if a valid user, check if user is allowed to own an umbrella, etc. */ return $user-id; } } The above works pretty handily for associating an existing user with an umbrella. I'm including it in this post in case I'm doing something improperly or if it's complicating my unresolved issue, which is ... I am not able to properly create _new_ Umbrella objects with the admin interface. One of the first things that the admin interface does after receiving a new umbrella form submission is to create a new, empty Umbrella object _and_ a new, empty User object. When the admin inputs a username for the owner_id, instead of just inserting a new umbrella row with the owner_id set, it also tries to insert an entirely new user row into the database with an already extant username. So, my question is ... How can I convince the admin interface not to create a new instance of a foreign relation? Thanks, Jim Krehl -- 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] Simple Form Question
Hi guys here is my code in my controller (part of it): $this-form-setDefault('customer_id', $this-getUser()- getAttribute('customer_id')); $SupporTicket = $this-form-save(); $this-hide_form = true; The problem I am having is I don't want to make customer_id a hidden field but set it before the form is saved, however the above method is not working. Does anyone know how I can set form values from within the code? Thanks, Darren -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Linking to the upload path from a template.
Hello. I'm new to Symfony and I decided to learn by developing a small web app. Right now, I have a form that uploads an image: 'image' = new sfValidatorFile(array( 'required' = false, 'path' = sfConfig::get('sf_upload_dir').'/myImages', 'mime_types' = 'web_images', )), The images are getting uploaded to the right place (http://localhost/ myapp/uploads/myImages). Now, when I try to include them from a template, how do I access the web path? I don't want to hardcode / myapp/uploads, because at least the /myapp part could change (for instance, on deployment). Is there any configuration setting or variable that I could access from the template? Also, it seems that the sfValidatorFile stores/returns only the filename, which means that I will have to hardcode /myImages. Am I missing something? Is there a better way to retrieve the path relative to the upload dir? Luis. -- 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: Custom logger via factory.yml?
Hi Daniel, I'm attempting to implement your suggested method of custom logging, since I have a requirement of logging certain activities in my application outside the standard log files. I've called my event type activity.log for reference. Logging messages of type activity.log works. The problem: even though ActivityFileLogger unregisters for the application.log event type (after the call to parent::initialize), everything that gets written to the application log is also being written to the activity.log file, in addition to the activity.log events. Looking through the framework source, I see that sfAggregateLogger registers itself for application.log events (via parent::initialize) after adding the specified loggers, though it also unregisters each of its loggers from application.log when adding them. So I'm kind of at a loss as to why all the application events are getting logged to my custom log. Here's what I've got: class ActivityFileLogger extends sfFileLogger { public function initialize(sfEventDispatcher $dispatcher, $options = array()) { parent::initialize($dispatcher, $options); $dispatcher-connect('activity.log', array($this, 'listenToLogEvent')); $dispatcher-disconnect('application.log', array($this, 'listenToLogEvent')); } } class AuditLogger // wrapper for application code to do the custom logging { // ... public function logActivity($message) { sfContext::getInstance()-getEventDispatcher()-notify(new sfEvent($this, 'activity.log', array($message))); } } And from factories.yml (I've omitted the default loggers): all: logger: class: sfAggregateLogger param: loggers: activity_log: class: ActivityFileLogger param: file: %SF_LOG_DIR%/activity.log Any ideas? Is it really advantageous to use this approach, versus just creating an instance early in the application and using it in the controller? I'm also thinking in terms of how I'll have to modify factories.yml to get this custom logging to work in prod as well as dev without altering the lack of application logging. Thanks a bunch for the help you've already provided here! Scott On Feb 26, 9:25 am, Richtermeister nex...@gmail.com wrote: What Daniel said.. Plus, for convenience you can always create a local log method on whatever object you're logging from that wraps the calls to the event- dispatcher. Then you have elegant and short. Daniel On Feb 26, 5:34 am, Christian Hammers c...@lathspell.de wrote: Oh, if the logging does not work because classes go lost, I'd rather want the programm to terminate :) But thanks anyway, the event handling does not sound uninteresting, maybe I can use it for something else somewhen. bye, -christian- On Fri, 26 Feb 2010 13:42:08 +0100 Daniel Lohse annismcken...@googlemail.com wrote: It's longer perhaps but more elegant? You betcha! It doesn't create a new dependency in your code because yourloggercould also *not* be there and the code would still work. Cheers, Daniel On 26.02.2010, at 12:57, Christian Hammers wrote: Hello So instead of $logger-info() I should write something like this? $this-getEventDispatcher()-notify(new sfEvent($this, 'blah.log', array('loglevel'='info', 'msg'='hello world')); Well, that would not exactly be more elegant than: $logger= BlahLogger::getInstance()-info(hello world); bye, -christian- On Thu, 25 Feb 2010 10:21:00 -0800 (PST) Richtermeister nex...@gmail.com wrote: Hey Chris, you don't need to interact with thisloggerdirectly. It just sits there and listens for yourcustomlogging events. The dispatcher is what you need to worry about, since that's used to dispatch the events in the first place. You'll find that the dispatcher is more available throughout the application than the loggeris, so stick with events to trigger logging. Daniel On Feb 25, 9:21 am, Christian Hammers c...@lathspell.de wrote: Hello But how do I get an instance of this class? Or maybe we have a misunderstanding: I do not want $this-getLogger()-info() to log into the default logfile as well as into mycustomlogfile. I want separate logfile just for special notes which should also not appear in the regular log files. bye, -christian- On Wed, 24 Feb 2010 09:25:45 -0800 (PST) Richtermeister nex...@gmail.com wrote: Hey Christian, it's simpler than that. Look in your factories.yml at the bottom where the loggers are being set up. The mainloggeris an aggregatelogger, and you can add yourloggerto this like so: (under loggers) my_logger: class: BlahLogger param: level: whateverlevel file: path_to_file That starts thisloggerautomatically, and since it only listens to your specialized events, it shouldn't get into the way.. Daniel On Feb 24,
[symfony-users] swift mailer - delivery_strategy: none
When the delivery strategy is set to none should swift mailer still be trying to connect to the smtp server? In my dev environment i don't want it to. I thought setting delivery_strategy to none prevented this. Is this expected? Thanks, Kevin -- 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] propel:build-schema not working[jobeet]
in the tutorial, i did not see any instruction concerning : --orm=Propel in my configuration file here is what i got : ?php require_once dirname(__FILE__).'/..\lib\vendor\lib/autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); class ProjectConfiguration extends sfProjectConfiguration { public function setup() { $this-enablePlugins('sfDoctrinePlugin'); } } do i need to create a new project ? Thanks for your help yaz 2010/3/11 Gábor Fási maerl...@gmail.com: Did you generate your project with `--orm=Propel` ? Check your ProjectConfiguration class, is the propel plugin enabled? On Thu, Mar 11, 2010 at 13:26, Tahar Yazid Touaibia ytouaib...@gmail.com wrote: Hello, I am new to symfony, i just installed it and am trying to follow the jobeet tutorial. When i run the following command i got an error : php symfony propel:build-schema The message displayed : there are no tasks defined in the Propel namespace. I running symfony on wamp and here is the result of my check_configuration.php file : ** Mandatory requirements ** OK PHP version is at least 5.2.4 (5.2.5) ** Optional checks ** OK PDO is installed OK PDO has some drivers installed: mysql, sqlite2 OK PHP-XML module is installed OK XSL module is installed OK The token_get_all() function is available OK The mb_strlen() function is available OK The iconv() function is available OK The utf8_decode() is available [[WARNING]] The posix_isatty() is available: FAILED *** Enable the php_posix extension (used to colorized the CLI output) *** [[WARNING]] A PHP accelerator is installed: FAILED *** Install a PHP accelerator like APC (highly recommended) *** OK php.ini has short_open_tag set to off OK php.ini has magic_quotes_gpc set to off OK php.ini has register_globals set to off OK php.ini has session.auto_start set to off OK PHP version is not 5.2.9 I would appreciate any help that can let me go further in the tutorial. Thanks in advance Yaz -- -- 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 -- Tahar Yazid Touaibia Creation de Sites http://www.dotshopdesign.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] Re: Facebook Connect added auth_token
Hi Franks, Can you show us how to use that session storage in detail. I'm newbie on SF and FB. Thanks, Rick On Mar 4, 11:25 pm, Frank Stelzer d...@bleedingmoon.de wrote: Hi, I wrote a complete fb application and had a similar problem. The problem was that the fb requests lost the session in the sf app all the time. The fb requests do not support cookies and so the normal session storage does not work. In my case, I worked with a special session storage activated in the factories.yml: class FacebookSessionStorage extends sfSessionStorage { public function initialize($options = null) { if(!$options) { $options = array(); } $options['session_id'] = preg_replace(/[^A-Za-z0-9-]/,, sfFacebook::getFacebookClient()-api_client-session_key); $options['auto_start'] = true; return parent::initialize($options); }} Maybe that helps in your case, too! Frank -- 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] propel:build-schema not working[jobeet]
Just change sfDoctrinePlugin to sfPropelPlugin :) If you don't specify --orm=Propel on project creation symfony from 1.2 and up defaults to Doctrine. On Fri, Mar 12, 2010 at 6:10 AM, Tahar Yazid Touaibia ytouaib...@gmail.com wrote: in the tutorial, i did not see any instruction concerning : --orm=Propel in my configuration file here is what i got : ?php require_once dirname(__FILE__).'/..\lib\vendor\lib/autoload/sfCoreAutoload.class.php'; sfCoreAutoload::register(); class ProjectConfiguration extends sfProjectConfiguration { public function setup() { $this-enablePlugins('sfDoctrinePlugin'); } } do i need to create a new project ? Thanks for your help yaz 2010/3/11 Gábor Fási maerl...@gmail.com: Did you generate your project with `--orm=Propel` ? Check your ProjectConfiguration class, is the propel plugin enabled? On Thu, Mar 11, 2010 at 13:26, Tahar Yazid Touaibia ytouaib...@gmail.com wrote: Hello, I am new to symfony, i just installed it and am trying to follow the jobeet tutorial. When i run the following command i got an error : php symfony propel:build-schema The message displayed : there are no tasks defined in the Propel namespace. I running symfony on wamp and here is the result of my check_configuration.php file : ** Mandatory requirements ** OK PHP version is at least 5.2.4 (5.2.5) ** Optional checks ** OK PDO is installed OK PDO has some drivers installed: mysql, sqlite2 OK PHP-XML module is installed OK XSL module is installed OK The token_get_all() function is available OK The mb_strlen() function is available OK The iconv() function is available OK The utf8_decode() is available [[WARNING]] The posix_isatty() is available: FAILED *** Enable the php_posix extension (used to colorized the CLI output) *** [[WARNING]] A PHP accelerator is installed: FAILED *** Install a PHP accelerator like APC (highly recommended) *** OK php.ini has short_open_tag set to off OK php.ini has magic_quotes_gpc set to off OK php.ini has register_globals set to off OK php.ini has session.auto_start set to off OK PHP version is not 5.2.9 I would appreciate any help that can let me go further in the tutorial. Thanks in advance Yaz -- -- 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 -- Tahar Yazid Touaibia Creation de Sites http://www.dotshopdesign.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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Simple Form Question
Which action are you in, executeNew(), executeCreate(), executeEdit() or any other one? The thing in general is that the defaults are used for filling the widgets with default data when you render the form for displaying it to the user. It's not taken into the object itself when you are about to save the object (e.g. as a consequence from a submit by the user). My personal solution here to set the data directly into the form's object: $supportTicket = $this-form-getObject(); $supportTicket-set('customer_id', $this-getUser()- getAttribute('customer_id')); // there are alternatives to this setter function, but this one should work for sure Hope that helps, RAPHAEL -- 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] Linking to the upload path from a template.
In your template: ?php echo image_tag($sf_config-get('sf_upload_dir').'/myImages/'.$image_name) ? The $sf_config variable is a copy of the sfConfig object used in the actions. On Fri, Mar 12, 2010 at 12:10 AM, Luis Zarrabeitia zarrabei...@gmail.com wrote: Hello. I'm new to Symfony and I decided to learn by developing a small web app. Right now, I have a form that uploads an image: 'image' = new sfValidatorFile(array( 'required' = false, 'path' = sfConfig::get('sf_upload_dir').'/myImages', 'mime_types' = 'web_images', )), The images are getting uploaded to the right place (http://localhost/ myapp/uploads/myImages). Now, when I try to include them from a template, how do I access the web path? I don't want to hardcode / myapp/uploads, because at least the /myapp part could change (for instance, on deployment). Is there any configuration setting or variable that I could access from the template? Also, it seems that the sfValidatorFile stores/returns only the filename, which means that I will have to hardcode /myImages. Am I missing something? Is there a better way to retrieve the path relative to the upload dir? Luis. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en