[symfony-users] Using an action to generate an image as an image tag src attribute

2010-01-28 Thread Gareth McCumskey
Hi guys, I am probably missing something obvious but is it possible for me to pass in an img tags src attribute the url to an action that will then output a dynamically generated image? Example: Instead of a direct link to an image like ?php echo image_tag('imagename.png'); ? I want to do :

Re: [symfony-users] Re: What do you use symphony for?

2010-01-28 Thread Gareth McCumskey
Personally, in contrast to an interview Fabien did a while back, I think any developer that has come to grips with symfony would be stupid NOT to use it for every project they do, even the seemingly simple ones as from my experience its the projects that seem tiny that end up being a challenge

Re: [symfony-users] Using an action to generate an image as an image tag src attribute

2010-01-28 Thread Frank Stelzer
Hi, Step 1: Define a custom route for it , e.g: user_image: url: /user/image/:id.jpg param: { module: userImage, action: show } Then your suggested call would work quite well: img src=?php echo url_for('@user_image?id='.$id); ? alt=blah / Do not know exactly if this would work either:

Re: [symfony-users] php symfony doctrine:insert-sql Error

2010-01-28 Thread Andrea Marin
Hi all, someone can help me for this sql problem, i try to search with google but I cannot find a solution and I don't know how to go ahed. Il giorno 27/gen/2010, alle ore 10.11, Andrea ha scritto: Hi all, i'm trying to follow the Jobeet 1.4 Doctrine guide and when i run the command php

[symfony-users] Re: sfWidgetFormSelectMany doesn't post at form submission

2010-01-28 Thread Cristian N.
Found it. The problem was that select multiple is sent only with *selected* values. So, before submitting the form, I must select all elements for it (done using jquery and form.submit event). So embarrasing :) -- You received this message because you are subscribed to the Google Groups

Re: [symfony-users] Using an action to generate an image as an image tag src attribute

2010-01-28 Thread Земсков Юрий
?php echo image_tag(url_for('module/action?xxx=abc'), array('raw_name' = true)) ? raw-name option prevents symfony from adding '.png' at the end of the image url. Âû ïèñàëè 28 ?? 2010 ?., 11:06:38: Hi guys, I am probably missing something obvious but is it possible for me to pass in

[symfony-users] Re: Slow template rendering

2010-01-28 Thread axel at
On 28 Jan., 06:49, Eno symb...@gmail.com wrote: On Wed, 27 Jan 2010, axel at wrote: I didn't expect it to be faster than straight PHP, but it's about 35 times slower!!! do you have any constructive ideas for performance tuning? People always make such a simplistic comparisons. There's

Re: [symfony-users] Re: Slow template rendering

2010-01-28 Thread Stéphane
Does the very first query to retrieve users is selecting all needed (by your code) fields and relations ? If not, objects will lazy-load properties and relations. How many db requests are there ? Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre

[symfony-users] Re: Slow template rendering

2010-01-28 Thread axel at
there are 8 database requests consuming 6 ms at all (only one of them gets the list, the rest is about authentication, dynamic menus and security. (the query joins the user table with a taglist) - displayed data is only fetched out of the user table. On 28 Jan., 11:11, Stéphane

Re: [symfony-users] Slow template rendering

2010-01-28 Thread Gareth McCumskey
Did you run it through the dev environment? If so, the dev environment adds an additional processing overhead to the application as it keeps track of a number of different variables and symfony states to allow for debugging purposes. Also, try running the query itself on your databases command

Re: [symfony-users] Slow template rendering

2010-01-28 Thread Stéphane
Well it looks like he tried using simple php and it worked great. Does the db query for user listing clearly SELECT * FROM users or such a thing stating it selects all fields ? Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée

Re: [symfony-users] Slow template rendering

2010-01-28 Thread Gareth McCumskey
Well there will always be -some- overhead of using a framework. I think that he's been using the dev environment for these benchmarks which does add a lot of extra processing that you don't normally get in the production environment. The benchmark of production environment vs simple PHP will not

Re: [symfony-users] Slow template rendering

2010-01-28 Thread Georg Gell
Axel, is it possible that the creation of the user objects takes such a long time? I don't know what your user objects do, or how many are in this list, but just for displaying the names of the users, I wouldn't create objects, but hydrate with Doctrine_Core::HYDRATE_SCALAR. Try if this works

Re: [symfony-users] Re: Subdomain dynamicly

2010-01-28 Thread seifolah Ghaderi
I think problem is in virtualhost setting so. I wanna to know is it possible to have subdomain in apache on windows system? On Wed, Jan 27, 2010 at 4:47 PM, Tom Ptacnik to...@tomor.cz wrote: So, if you change content of index.php in your web project directory to something like ?php echo hello;

[symfony-users] Re: XSS escaping_strategy escaping_method not work

2010-01-28 Thread smellycat37
in the file settings.yml, I had two .settings: in my all configuration On 27 jan, 11:02, smellycat37 charley.mail...@gmail.com wrote: hello, I use symfony 1.2.9 with doctrine... I would like to escape all the special html character that user can put in form html... So I add in the section

[symfony-users] Re: External user authentication with sfDoctrineGuardPlugin

2010-01-28 Thread Tom Ptacnik
Create an module with secure: is_secure: false in which you can do what you want (create a user in sf_guard_user table ...) On 28 led, 02:15, ashton ahonn...@gmail.com wrote: I have my external authentication working, but the problem that I am running into is that there needs to be a user in

[symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread Tom Ptacnik
Why do you want to kill his old session? On 28 led, 04:21, yth digital_...@yahoo.com.hk wrote: Dear all, When a user logins, the controller calls the following function in the myUser.class. The problem is, if he doesn't logout but then logins in another computer/browser, the old session

[symfony-users] Re: php symfony doctrine:insert-sql Error

2010-01-28 Thread Tom Ptacnik
What do you have in config/doctrine/schema.yml and in config/ databases.yml ? If you run symfony doctrine:build --all --and-load --no-confirmation do you get the same error? On 28 led, 09:34, Andrea Marin baba.and...@gmail.com wrote: Hi all, someone can help me for this sql problem, i try to

Re: [symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread DEEPAK BHATIA
I think you can set a field in database setting login status to true. Now if the person again logs in and you find from database, you can take him to the logout screen/error screen. On Thu, Jan 28, 2010 at 7:27 PM, Tom Ptacnik to...@tomor.cz wrote: Why do you want to kill his old session? On

[symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread ken
The best solution for this is use database session. Add session_id column in the Profile table. This field has to be set during login. So if you are using sfGuardUserPlugin, you can override the signIn method in myUser. With the session_id at hand you will be able to check if user is signed in in

[symfony-users] tinymce in symfony

2010-01-28 Thread mr_question
I inserted in /js catalog 'tiny_mce', added to settings.yml: rich_text_js_dir: js/tiny_mce and my sfWidgetFormTextarea's aren't rich text editors, why ? -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to

[symfony-users] Re: Using an action to generate an image as an image tag src attribute

2010-01-28 Thread Andro
I didn't find a better solution and did it the same way... On 28 Jan., 09:06, Gareth McCumskey gmccums...@gmail.com wrote: Hi guys, I am probably missing something obvious but is it possible for me to pass in an img tags src attribute the url to an action that will then output a dynamically

[symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread Andro
isAuthenticated and setAuthenticated sets only LOCAL Cookies. So if he logins from another computer this functions doesn't check this, but if ANOTHER User is logged in at the SAME computer, so you can delete his e.g. credentials first before adding the new ones... On 28 Jan., 04:21, yth

[symfony-users] Re: Doctrine inheritance and i18n forms

2010-01-28 Thread aninffected
I have the same question myself. On 27 Ιαν, 17:43, Thibault Jouannic tee...@gmail.com wrote: So, an idea anyone ? -- 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

Re: [symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread yth
-users?hl=en. __ NOD32 4813 (20100128) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-us

Re: [symfony-users] tinymce in symfony

2010-01-28 Thread Gábor Fási
http://www.symfony-project.org/forms/1_2/en/A-Widgets#chapter_a_sub_sfwidgetformtextareatinymce On Thu, Jan 28, 2010 at 09:06, mr_question lolekzbol...@gmail.com wrote: I inserted in /js catalog 'tiny_mce', added to settings.yml: rich_text_js_dir:  js/tiny_mce and my sfWidgetFormTextarea's

[symfony-users] Re: Slow template rendering

2010-01-28 Thread axel at
Hello Georg, thanx for your help, it was actually the creation of the user objects that took 90% oft the time, with your solution the execution time of the request went down to 5 seconds (2,5 seconds for the list rendering) whats imho ok for the rendering of a list containing 5000 resultrows.

Re: [symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread yth
from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en. __ NOD32 4813 (20100128) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com

Re: [symfony-users] Re: php symfony doctrine:insert-sql Error

2010-01-28 Thread Stéphane
You have an error in your DB DSN declaration. mysql:host=localhost;dbname=jobeet It is not a , but a ;. Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Jan 28, 2010 at 5:27 PM, Andrea Marin

Re: [symfony-users] Re: php symfony doctrine:insert-sql Error

2010-01-28 Thread Andrea Marin
Hi Stèphane, thanks i correct my mistake but there are something other wrong. Now the error change and is: Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///tmp/mysql.sock) in

Re: [symfony-users] Re: php symfony doctrine:insert-sql Error

2010-01-28 Thread Stéphane
I'm not using MAMP so you might take a look at this thread : http://forum.symfony-project.org/index.php/t/11364/ Hope this helps, Cheers, Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Thu, Jan 28, 2010 at

[symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread wissl
group. To post to this group, send email to symfony-us...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en. __ NOD32 4813 (20100128

[symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Romain Pouclet
Hi all, I'm having a really strange issue w/ my project, I can't build anything using doctrine:build task... This works just fine if I'm running it from my local working-copy : ./symfony doctrine:build --all --env=prod if I run it from the production server, I have this error : No yml schema

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Augusto Flavio
Hi Romain, Which version of symfony you are using. Is ok your DB connection? This is a common problem that happen after the deploy to the prod server. Bye Augusto Morais -- You received this message because you are subscribed to the Google Groups symfony users group. To post to this

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Romain Pouclet
Hi, Sorry I'm using Symfony 1.4... My database access are correct because I can connect to my db server when I try a mysql -u Le 28 janv. 2010 à 17:57, Augusto Flavio a écrit : Hi Romain, Which version of symfony you are using. Is ok your DB connection? This is a common

Re: [symfony-users] Re: php symfony doctrine:insert-sql Error

2010-01-28 Thread Andrea Marin
Thanks Stèphane, with your link i find to fix my problem. Symfony use for its query the standard socket link in /tmp/mysql.sock for make it running under MAMP and mac user we need to make a symbolic link to the real sock of mysql under MAMP. For do this just run this: sudo ln -s

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Augusto Flavio
I had a similar problem too with the symfomy's deployment. Not building the classes but in deployment. The symfony's interface of rsync doenst clear the buffer in *sfProjectDeployTask at the moment that the rsync is executed. *The fix is only clear the outbuffer before execute the rsync command. I

[symfony-users] Re: tinymce in symfony

2010-01-28 Thread mr_question
Ok, now I use sfWidgetFormTextareaTinyMCE() but I still don't have tinymce. What is more I don't have in view - source in browser: script type=text/javascript src=/js/tiny_mce/tiny_mce.js/ script why ? On 28 Sty, 17:09, Gábor Fási maerl...@gmail.com wrote:

Re: [symfony-users] Re: External user authentication with sfDoctrineGuardPlugin

2010-01-28 Thread ashton honnecke
Thanks! So if I am understanding you, you are telling me that there is no way to do this with the current sfGuardUser setup and that I will need to I create a new module that I use for login. It doesn't seem to me that this is an uncommon request related to the external password check, so It

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Romain Pouclet
According to some tests, I don't have /tmp folder on this server, but this is where php is supposed to create tmp files, do you think this could come from there? The fact that php doesn't find this yml file ? Le 28 janv. 2010 à 18:21, Augusto Flavio a écrit : I had a similar problem too with

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Augusto Flavio
No. I don't have /tmp folder on my prod server too and the project works fine. Have you sure that all files is sync with the dev environment (dev server)? Did you fix the permissions? Check whether the sql file correctly. To do it run only the sql schema. ./symfony doctrine:build-sql ./symfony

[symfony-users] Help please! json_encode problem in symfony

2010-01-28 Thread Dong YANG
Hi everyone, I passed many hours for this strange thing, in fact I got a problem when using json_encode in symfony. In my front-end module, method executeIndex() as below: public function executeIndex(sfWebRequest $request) { $this-test = $this-getRoute()-getObject();

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Romain Pouclet
build-sql works fine insert-sql throws me an error : -bash-3.2$ php ./symfony doctrine:insert-sql doctrine created tables successfully

[symfony-users] New element with parameter

2010-01-28 Thread Diego Bello
Hi guys, I have a site (frontend) with a list of deploys. Now, each deploy can have several activities. When I click on new activity, I have to choose the deploy I'm talking about. Is there a way I can tell the new form to use the deploy I'm surfing now?. I mean, is it possible to send to the new

[symfony-users] Re: tinymce in symfony

2010-01-28 Thread David Joan
Hi Why don't you trying install sfFormExtPlugin again? On 28 ene, 12:30, mr_question lolekzbol...@gmail.com wrote: Ok, now I use sfWidgetFormTextareaTinyMCE() but I still don't have tinymce. What is more I don't have in view - source in browser: script type=text/javascript

Re: [symfony-users] Help please! json_encode problem in symfony

2010-01-28 Thread Eno
On Thu, 28 Jan 2010, Dong YANG wrote: Hi everyone, I passed many hours for this strange thing, in fact I got a problem when using json_encode in symfony. In my front-end module, method executeIndex() as below: public function executeIndex(sfWebRequest $request) {

[symfony-users] How to make LEFT JOIN in subquery which is in WHERE condition?

2010-01-28 Thread MaEcTPo
I wrote a raw SQL, like this: SELECT b2.title, r.title FROM route r LEFT JOIN busstop_route b ON (r.id = b.route_id) LEFT JOIN busstop b2 ON b2.id = b.busstop_id WHERE b2.id 3 AND b.direction_id = ( SELECT ab.direction_id FROM route ar LEFT JOIN busstop_route ab ON (ar.id =

[symfony-users] Re: Slow template rendering

2010-01-28 Thread Dejan Spasic
To complete this discussion consider following documentation http://www.doctrine-project.org/documentation/manual/1_2/en/data-hydrators http://www.doctrine-project.org/documentation/manual/1_2/en/improving-performance -- You received this message because you are subscribed to the Google Groups

[symfony-users] Re: Help please! json_encode problem in symfony

2010-01-28 Thread Dejan Spasic
If you use Doctrine try json_encode($this-test-toArray()); On 28 Jan., 23:39, Eno symb...@gmail.com wrote: On Thu, 28 Jan 2010, Dong YANG wrote: Hi everyone,     I passed many hours for this strange thing, in fact I got a problem when using json_encode in symfony.      In my front-end

[symfony-users] Set default dsn with env vars?

2010-01-28 Thread Tennis Smith
Hi, I'm trying to set my default db based on an environment variable. The definition looks like this in my databases.yml file: test: foo: class: sfPropelDatabase param: dsn: ?= getenv('FOO_DB') ? getenv('FOO_DB') : 'mysql://root:@localhost/test_foo' ? Should

Re: [symfony-users] Can't build anything after project:deploy

2010-01-28 Thread Augusto Flavio
Yes Romain. You need have permission to access your temp dir. Ask then to your client. Bye. Augusto Morais -- 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

[symfony-users] Re: Making sure a login id only has one session at any moment

2010-01-28 Thread ken
...@googlegroups.com. To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/symfony-users?hl=en. __ NOD32 4813 (20100128) Information __ This message was checked by NOD32 antivirus

[symfony-users] Customize sfGuardAuth forms

2010-01-28 Thread MartinB
I'm pretty new to symfony, but am loving it so far. I just finished setting up the sfGuardAuth plugin and would like to customize the forms so that the groups and permissions lists are checkbox lists instead of list boxes. I know I need to use the below line of code to do it, but where do I put

[symfony-users] Re: tinymce in symfony

2010-01-28 Thread mr_question
I have installed it again but still the same. I must handly add to layout.php: script type=text/javascript src=/js/tiny_mce/tiny_mce.js/ script And then it works - but I don't understand why ? On 28 Sty, 23:09, David Joan new.skin...@gmail.com wrote: Hi Why don't you trying install