Re: [symfony-users] How can I validate drop down select boxes in symfony2?
The link you posted is invalid On Tue, Jun 7, 2011 at 4:58 PM, Psychonetics mrajcampb...@gmail.com wrote: How can I validate drop down select boxes in symfony2? Please refer to this post: http://forum.symfony-project.org/posting.php?mode=editf=23p=118736 For some reason it won't allow me to post here. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Symfony 2.0 or Symfony 1.4
For us, we now have our problems with PHP versions sorted on our web servers so we can actually contemplate using Symfony 2. And we are going to be starting this off with a complete rewrite of one of our symfony 1.1 apps into Symfony 2. On Sun, Jun 5, 2011 at 6:47 AM, Parijat Kalia kaliapari...@gmail.comwrote: Hi guys, Very curious to know if people have migrated to Symfony 2.0 or are still dependent on Symfony 1.4. Would love to get everybody's knowledge and ideas on this. Been proficient at Symfony 1.2.9 but now that 2.0 has been rolled out, I am wondering if it is a good idea to pursue a side project while simultaneously learn Symfony 2.0. Thanks Parijat Kaliaz -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Question about security in sf2
In firewalls note this line: pattern:^/ In access_control note: ^/admin So in access control any path with ^/ is a firewalled route. Therefore access is restricted. On Mon, Jun 6, 2011 at 4:57 PM, Javier Garcia tirengar...@gmail.com wrote: Hi, in the section of security of the sf2's manual there is this configuration: security: firewalls: secured_area: pattern:^/ anonymous: ~ http_basic: realm: Secured Demo Area access_control: - { path: ^/admin, roles: ROLE_ADMIN } providers: in_memory: users: ryan: { password: ryanpass, roles: 'ROLE_USER' } admin: { password: kitten, roles: 'ROLE_ADMIN' } encoders: Symfony\Component\Security\Core\User\User: plaintext And about that configuration is written this: Any URL matching /admin/* is secured, and only the admin user can access it; but..where is that define exactly? Second question: can someone explain me about what is exactly anonymous parameter? 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: DataBase Migration
What would tables your project model does not use be doing in your database? o.O On Fri, Jun 3, 2011 at 12:04 PM, Bart van Wissen bartvanwis...@gmail.comwrote: On 3 jun, 08:14, Gareth McCumskey gmccums...@gmail.com wrote: If you are using symfony 1.1 or up (not Symfony 2), then there is a command you can give from within the project root to create a schema.yml from the existing database: ./symfony propel:build-sql I think regenerating the schema.yml for an existing project is not a good idea. It will also include tables that may not be needed in your project model at all. I find it hard to believe that it would be missing from the project, because then there would be no way to run propel:build-model, for example. My suggestion would be to take another look. It could also be schema.xml instead of schema.yml. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: New to PHP
If your clients are paying for custom work then they have the right to do whatever they want with the code after you have given them what they pay for. If they break stuff that you later have to fix then you bill them more for the work. If your code appears in someone elses project, so what? They have already paid for the product and essentially own the code so they can do whatever the hell they like. Maybe you need to try and get out of the paradigm of holding all your source-code away from users (as in the .net world) and understand the benefits your clients can get from open code, i.e. they can actually maintain it themselves afterwards if they so wish. Perhaps that's the very reason they want something developed in PHP and not a compiled language like .net And lastly, compiled code is not secure. If a client REALLY wants to, there are very many tools available to turn compiled code into the original source again. On Thu, Jun 2, 2011 at 1:04 AM, Ton Yeung tonyeun...@gmail.com wrote: My clientele are cheap and they have a culture of break it apart and jurry rig it if we can. If I don't obfuscate or protect my source, i can be guaranteed its going to show up in someone else's project. Some of you might say go somewhere else then, but they pay so I'm staying. Anyway, php, bsd, and mongo seem to work well, so I would like to switch, but the lack of source protection and the performance is a problem. A friend of mine pointed to facebook's hiphop php - c tool, and it fit the bill pretty well. Compiled code + performance boost is a big win. I've put in a new thread regarding whether or not hiphop will work with symfony. Anyway, I think this thread can be safely closed. On Jun 1, 5:00 am, Gareth McCumskey gmccums...@gmail.com wrote: Code obfuscation in the PHP world is not very good and, to be honest not necessary. For what reason do you want to obfuscate code? On Tue, May 31, 2011 at 7:24 PM, Ton Yeung tonyeun...@gmail.com wrote: I'm coming from an ASP.NET MVC background, where I can compile and obfuscate my source. How can do this with php and symfony? -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] DataBase Migration
If you are using symfony 1.1 or up (not Symfony 2), then there is a command you can give from within the project root to create a schema.yml from the existing database: ./symfony propel:build-sql On Tue, May 31, 2011 at 9:26 AM, zemzoum89 ayed.cha...@gmail.com wrote: Hi, Please help me, i'm in an internship and i'm working on a symfony project, i'd like to make changes to my database but the problem is that i don't have a schema.yml, i have a lot of other files that contains the model of the database and now i don't know how to make changes to my database... 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] getting a fatal error using swiftmailer
How about giving us the code that makes use of SwiftMailer? Kind of hard for us to help you debug without seeing what might be buggy On Mon, May 30, 2011 at 12:31 PM, Diego Henrique Oliveira diegoholiveira...@gmail.com wrote: Hey guys, I'm getting a fatal error when i try to use swiftmailer. Take a look: Fatal error: Call to a member function clearAll() on a non-object in /home/diegoholiveira/projects/brasilrepublicas/vendor/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php on line 822 Does anyone know what's happening? Or how I can solve this issue? Thanks Diego -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] New to PHP
Code obfuscation in the PHP world is not very good and, to be honest not necessary. For what reason do you want to obfuscate code? On Tue, May 31, 2011 at 7:24 PM, Ton Yeung tonyeun...@gmail.com wrote: I'm coming from an ASP.NET MVC background, where I can compile and obfuscate my source. How can do this with php and symfony? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Develop an app as an API
Web services are considered stateless requests. There is no client side browser to manage storing a cookie to allow for stateful sessions. A better solution is to include the authentication with every request made and then verify the credentials on the server side with each request. With a REST service for example, you can include these as custom HTTP headers with nonce salts to encrypt the password itself as it is sent over the wire for security reasons. A very similar mechanism can be used for SOAP where an authentication header tag is sent with each request. This is really the only way to successfully have authentication-based web services. On Sat, May 28, 2011 at 4:04 PM, Filipe Dias filipediasferre...@gmail.comwrote: Hi all, I'm developping an application as an API: making requests returns simple xml or json files, but I need to save some properties in session. All available documentation is form login oriented. I got authentication getting a connection to a database, using doctrine ORM. If is a valid login, result will be a xml/json with success as content. Login is accessed like http://server/login/username/password/format logout like http://server/logout/format and acount like http://server/account/resource/format. So i got a problem: I can't handle with session storage of symfony, because in each request I got a new session id; Does anyone know: 1. how I can get a ROLE_USER (or similar) after received a success login 2. how I can get all information from session when I access to the account with a valid login 3. how I can invalidate session in logout resource. 4. Which Is the best configuration in security for this situation!? Cheers, Filipe Dias -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [symfony2] which is the correct way to deliver binary content?
Your last option is what would be considered best practice. Set the headers correctly and return the content of the binary as your response. On Wed, May 11, 2011 at 11:24 AM, David Buchmann david.buchm...@liip.chwrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i have binary content that i have to deliver to the client. what is the right way to do it? i found two solutions, but neither seems really good. //in my controller, i get a binary stream (its stored in the database) $picture = $this-method_that_returns_resource_stream(); // i can just use plain php and dump and die. not nice. header('Content-Type: image/jpeg'); fpassthru($picture); die; /* or i can use a response, but then i have to read the stream into memory, which is unefficient. */ $response = new Response(stream_get_contents($picture)); $response-headers-set('Content-Type', 'image/jpeg'); return $response; cheers, david - -- Liip AG // Agile Web Development // T +41 26 422 25 11 CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3KVdoACgkQqBnXnqWBgIsIGQCgjmrKIolRlfp3cvXG53kFDzYe n+8AmwYrR7y7GPsvkK5MoiTpP3xTWJa+ =8FYf -END PGP SIGNATURE- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Develop an app as an API
One problem you have with that is an API key can be intercepted very easily over the wire and used. Combined with an n-once setup makes that far far harder. Basically all an an n-once is is a salt. You generate a random string ( something like md5(microtime()) for example), then use that to salt your api key while hashing it: $salted_key = md5($api_key . $nonce_salt); Then when you send your request, you include the salt you used as part of the headers as well. Hashes are not reversible so your key stays safe. On Mon, May 30, 2011 at 4:32 PM, iturri.cf iturri...@gmail.com wrote: You can use an API key instead a username-password, and send it with every request as a custom HTTP header. You can read an example from http://www.symfony-project.org/more-with-symfony/1_4/en/10-Symfony-Internals : Using the request.filter_parameter event Let's say you're operating a website exposing a public API to your users. The API is available through HTTP, and each user wanting to use it must provide a valid API key through a request header (for example X_API_KEY) to be validated by your application. This can be easily achieved using the request.filter_parameter event:... I hope it helps Cristian Iturri On 30 mayo, 06:48, Gareth McCumskey gmccums...@gmail.com wrote: Web services are considered stateless requests. There is no client side browser to manage storing a cookie to allow for stateful sessions. A better solution is to include the authentication with every request made and then verify the credentials on the server side with each request. With a REST service for example, you can include these as custom HTTP headers with nonce salts to encrypt the password itself as it is sent over the wire for security reasons. A very similar mechanism can be used for SOAP where an authentication header tag is sent with each request. This is really the only way to successfully have authentication-based web services. On Sat, May 28, 2011 at 4:04 PM, Filipe Dias filipediasferre...@gmail.comwrote: Hi all, I'm developping an application as an API: making requests returns simple xml or json files, but I need to save some properties in session. All available documentation is form login oriented. I got authentication getting a connection to a database, using doctrine ORM. If is a valid login, result will be a xml/json with success as content. Login is accessed likehttp://server/login/username/password/format logout likehttp://server/logout/format and acount likehttp://server/account/resource/format. So i got a problem: I can't handle with session storage of symfony, because in each request I got a new session id; Does anyone know: 1. how I can get a ROLE_USER (or similar) after received a success login 2. how I can get all information from session when I access to the account with a valid login 3. how I can invalidate session in logout resource. 4. Which Is the best configuration in security for this situation!? Cheers, Filipe Dias -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Performance
There are a few things you can look for: 1. make sure you run the application over the production environment and not the dev or testing environment. 2. Do a clear cache to force the application rebuild the cache. If it cannot access old cache entries it just wont use cache which can slow things down a lot. 3. make sure you have a PHP opcode cache running on the server like APC cache. On Thu, May 19, 2011 at 9:57 AM, Laxmi laxmipsa...@gmail.com wrote: Hello, I recently completed symfony website on my laptop. The website was working fine on my laptop. but when i put on windows server. performance is par low, on my laptop to run a page it takes 400ms. on server it takes 2400ms. there are around 20 simple query's no joins, no likes etc. can some on help how can i improve the performance of the site 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Any chance of creating a new Google group for Symfony2 only?
I don't think this is a good idea. I often have a few minutes spare in my busy day and can quickly browse my inbox to see if there are any people I can help. Pushing everything to the forums will mean less people that can just quickly pop in a reply to a problem someone is having. I, personally, am all for splitting the mailing list into Symfony 2 and symfony 1 lists. On Tue, May 17, 2011 at 8:42 AM, Fabien Potencier fabien.potenc...@symfony-project.com wrote: On 5/16/11 7:15 PM, keymaster wrote: Having all the symfony 1.x releases mixed in with Symfony 2 posts can sometimes make it difficult to discern which Symfony people are talking about in their posts. Not everyone is explicit on whether they are referring to Symfony1 or Symfony2. This is not only a problem for those working on Symfony2, but even those trying to wade through symfony 1.x have to wade through newbies on symfony 2.x. An additional confusion is some Symfony 1.x people seem to be using Doctrine 2. It might be wise to separate the discussions of the two groups as the two products are different enough from each other to warrant it. That's the problem of the mailing-lists vs a forum. As I said already, I don't want to split the community and add more mailing-lists. This is already quite complicated as we have two mailing-lists and a forum. The real question to me is: Do we need to move all the discussions to the forum, where it is much easier to organize conversations by topic? Fabien -- 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Migrating an old Symfony project
Did you make sure you had cleared cache (on command line from project root enter command ./symfony cc). Often when symfony cannot find classes its because its not cached any longer. On Fri, May 13, 2011 at 9:38 PM, Esdras Beleza lis...@esdrasbeleza.comwrote: Hi folks, I work with PHP for some years, but I'm new to Symfony. I'm working with some legacy code, it's an old Symfony 1.0 based project and I'll have to upgrade it to 1.4 version. I've read some texts that say that I need to upgrade to each old version until I reach 1.4. While trying to upgrade 1.1 following the instructions (http://www.symfony-project.org/installation/1_1/ upgrade), I tried to run the site and got the following error on Apache's error_log: (...) [Fri May 13 15:57:59 2011] [error] [client 127.0.0.1] PHP Fatal error: Class 'sfLuceneModuleConfigHandler' not found in /home/esdras/ dev/wikimapps/cache/frontend/prod/config/ config_config_handlers.yml.php on line 25 (...) Does anybody have any idea of what can be this and/or how to fix? Thanks in advance, Esdras -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] working slider/spin widget for integers ?
Sliders and spinners are not elements built into HTML, therefore you need to look at external libraries (or build it yourself). The one I can recommend is JQuery UI. Others may have other recommendations. On Mon, May 16, 2011 at 11:47 AM, niksfirefly admin.net2...@gmail.comwrote: Do you know working slider/spin widget for integers ? I mean form field with for numbers only where you can click,move and set number value of field up or down with specified step value and with max value for field. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] propel:build-model causing error problems
Hi all, I am currently having an issue attempting to run a ./symfony propel:build-model on a symfony 1.1 application. I keep an error message about running out of memory as follows: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/garethm/PinpointBranding/lib/vendor/symfony/lib/util/sfToolkit.class.php on line 191 Before anyone says Increase memory limit, yes I have done that, and yes I have done it on bot the cli and cgi config files. I have increased memory on both to 1GB and still no luck. We are using php 5.3.5 and as I said its a symfony 1.1 application. If anyone has any info to share it would be great as this is completely bamboozling me. -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Adding a required checkbox to a form - #sf1.4
What it sounds like you need is a post validator... http://www.symfony-project.org/forms/1_4/en/02-Form-Validation#chapter_02_global_validators On Mon, May 16, 2011 at 1:58 PM, codecowboy l...@lukem.co.uk wrote: Hi, I can't find an example of how to add a required checkbox to a form which is unrelated to my model e.g a checkbox to accept the terms and and conditions for registration. I think maybe what I need is something like: $this-widgetSchema['tsandcs'] = new sfWidgetFormInputCheckbox(); $this-setValidator('tsandcs', new sfValidatorBoolean()); But how do I force validation so that the form will only validate if the checkbox is checked? Symfony version is 1.4 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Login check issue
You forgot to add a return statement into the action it specifies. go to the login_check action, see if there the keyword return is used and if not add it. On Thu, May 12, 2011 at 11:05 AM, absdv arnob...@sdv.fr wrote: Hello, I've copied the AcmeDemo Secured configuration to my Bundle. But when I submit the login form, le login_check action give me this error : The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? Could you help me with this, please. Arnaud -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: Re : Re: [symfony-users] Login check issue
Do you not know how functions work? A function often returns a value to whatever called it. Perhaps go relearn your PHP. Seriously. If you do not understand function return values, you really shouldn't be trying to optimise your development with an MVC framework. You have bigger problems. On Thu, May 12, 2011 at 11:41 AM, absdv arnob...@sdv.fr wrote: If I add return; it doesn't change a thing. If I add return true; or return new Response('');, I get : The controller must return a response ('1' given). -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] deploy site symfony
If you are running on a CentOS or Red Hat machine then you should be able to view the error logs in /var/log/http/error_log On Mon, May 9, 2011 at 3:21 PM, Hamza Tlili tlili@gmail.com wrote: is a production server 2011/5/9 Donald Tyler chekot...@gmail.com It sounds like you're developing the site on a different computer than the server is running on. This isn't a production server is it? On Mon, May 9, 2011 at 8:12 AM, Hamza Tlili tlili@gmail.com wrote: when i put frontend_dev.php in the url a message said that i'm not allowed to access to this file 2011/5/9 Donald Tyler chekot...@gmail.com Also, are you accessing your pages with the frontend_dev.php prefix in the url? If you don't use the development front controller, you won't get detailed error output. On Mon, May 9, 2011 at 7:45 AM, Donald Tyler chekot...@gmail.comwrote: If you're only getting a 500 error in the browser, you're going to have to look in the logs for more information on what exactly went wrong. On Mon, May 9, 2011 at 2:55 AM, Hamza Tlili tlili@gmail.comwrote: and also the authentification don't work i used sfguardplugin ,everything locally work fine but after deploying authentification don't work i have this error Oops! An Error Occurred The server returned a 500 Internal Server Error. -- 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] deploy site symfony
+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Dealing with VERY complex query
I'm with Matt on this. One thing we have done with one of our apps that needs to build reports for example, is we created a summary table to reduce the amount of data to extract from the database and therefore reduce the amount of data to process as well. If you can think of ways to aggregate many smaller data points into summarised datasets you should do so as it can substantially reduce your server workload. To extrapolate on my example, we had data on individual customer emails, and customers would want to pull statistical reports on this for over a months worth of data with a daily breakdown. Because the reports don't need to be specific to the second, we created scripts that create summary/aggregated data in another table that gives a total per email address per day. Now if we want details on a specific users email stats for a month we pull only 30 records instead of getting data on every email that guy ever received. It seems like a lot of work now to get something like that running, but over the long term it helps keep your load on your server low, queries are faster, and therefore the longevity of your application is vastly improved. On Thu, May 5, 2011 at 1:22 AM, Matt Robinson m...@lazycat.org wrote: On 4 May 2011, at 23:57, Michał Piotrowski wrote: 2011/5/4 Marco Pivetta ocram...@gmail.com: SQL is way faster than PHP processing. I would really go for a filtered join. That's what SQL is there for :) Just be sure to filter by index and to return a limited resultset. Sequential scan in PHP has to be ABSOLUTELY avoided :) I'm not sure how to do this if I need a multiple dynamically added conditions. SQL (certainly in mySQL) supports conditionals in queries, so if the data you use to make the choice is in the database, you can do it all in the query. Another way to approach your problem is to have your web app trigger events when certain actions occur - this way you're approaching issues like have already been purchased by at least one of his friends from the other end. When someone buys a product, add it to each friend's recommendation list. Then your look-up query is much more simple. You can even queue these events up and process them later, since it's usually not vital that such information is live. As an aside: typically very complex queries like this are done by background processes only periodically (e.g. every few hours) and stored in look-up tables or similar. Particularly as you start getting many users, complex queries quickly become a bottleneck, so you produce them offline beforehand and store them in a way that's simple and quick to fetch by your site's PHP scripts (in a simple cache table or object store). You never want a simple request page to be doing so much heavy lifting that it'll slow down and prevent you scaling later. If the heavy processing stuff is split off into a separate process, you can also move that process to another server later. -- Matt -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Post Validator
Perhaps try using strlen() function instead of empty() function and see if that makes a difference. On Thu, May 5, 2011 at 7:27 AM, Raju yadavrajesh25j...@gmail.com wrote: $this-setValidators(array( 'charge_type'= new sfValidatorChoice(array('choices' = array(0 = 'percent', 1 = 'flat'), 'required' = false)), 'upper_slab' = new sfValidatorNumber(array('min'=0,'required' = false)), )); $this-validatorSchema-setPostValidator( new sfValidatorAnd(array( new sfValidatorCallback(array('callback'=array($this,'upperValidation'))), )) ); public function upperValidation($validator, $values) { if($values['charge_type']=='percent') { if(empty($values['upper_slab'])) { $error = new sfValidatorError($validator, Upper Slab Required); throw new sfValidatorErrorSchema($validator, array('upper_slab' = $error)); } } return $values; } here i got message fasd is not a number. Upper Slab Required . i want to show here only fasd is not a number. and when value is blank it will show Upper Slab Required . -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Pratical Symfony
If you were on Linux I'd tell you to make a symlink to the correct location for the symfony css and images but to be honest you don't really need that css and images. Your own project css and images should sit in the web directory and display fine within the project itself so just continue with the tutorial and see how it goes. You don't really need the symfony pages css and images. On Thu, May 5, 2011 at 11:32 AM, Giuseppe giuseppe.rub...@gmail.com wrote: Hello everyone and sorry for my English. I'm starting to learn symfony and I followed the first tutorial jobeet ilo. I'm working on XP, the project has created and I have also the page Symfony Project Created, but I do not find images and main.css is empty. What did I do wrong? thank you very much Giuseppe -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Design question - sharing forms between apps
I assume you are on symfony 1? If so, put your form classes inside the project_root/lib directory not the apps/app_name/lib directory and you can then use it across apps. On Thu, May 5, 2011 at 1:02 AM, OnDistantShores cameron.r...@gmail.comwrote: Here's my scenario, I'm not sure what the best way to implement this is. I'm creating a party bookings system. Anyone can go to my frontend app and submit a new booking. Once they're finished, they'll just get a confirmation screen, they can't edit it. Easy. Only certain users will be able to get to the admin app (it might be secured simply by being on an intranet, but that's not important, just assume it will be only accessible by admin users). They'll be able to view the list of submitted bookings. Easy. My problem is around code re-use when allowing admin users to edit existing bookings. When you do generate-module in Symfony, the generated module (which as a newbie I'm assuming is a good example of structuring things) creates the form as a partial. I've had to customize this form a lot for my usage (lots of Javascript, etc), so of course I want to re-use this code, to be able to load an existing booking into this form. But there doesn't seem to be a way to share this partial between the apps (I've seen people mention making a plugin...but this seems complicated for this use). I considered using an IFrame to load the form from the frontend and just passing an id parameter to load it in edit mode, but this would mean that the edit mode is not secure - anyone could go to the form on the frontend and pass this parameter to edit a booking. I also considered putting all of the form display code (HTML, Javascript, etc) in a method on the form object, but this doesn't seem very MVC - all of the display code is then in the form. But this is only because I'm thinking of the form in the same way as a model - is that right? I feel like this should be a common situation. You can share models and forms between apps, why can't you share this common form display code too? 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] permissions issue please help
Yes On Thu, Apr 21, 2011 at 8:22 AM, Helloise Smit helloi...@miranetworks.netwrote: no there is no log directory, can i just mkdir log? 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Newbie Question
That is perfectly fine :) On Wed, Apr 20, 2011 at 4:04 PM, Stephen Cerniglia cerni...@gmail.comwrote: Hello, I've been using symfony for a couple of weeks now and I am starting to create my own form classes, which extend the sfForm class. My question is, where should these custom class files be placed? For example, I have a changePasswordForm that extends sfForm and I defined it in the file ChangePwdForm.php. Currently I have placed the ChangePwdForm.php file in the sf-project/lib/form directory and everything works, but I don't know if that's the recommended location. Please advise! Thanks, --Steve -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] user isEnabled()
One method we use to validate a users email account is to actually send him an email with a link which he can use to set his password. Therefore once the password is set, his account is validated. On Thu, Apr 21, 2011 at 7:30 PM, symfonyMan ezziani.cha...@gmail.comwrote: Hello, I have a question about Security in Symfony2. In my user entity i have a column enabled, when the user registred for the first time I set *enabled *to *false* like the FOSUserBundle. before validate the registration ( confirmation by email = set enabled to true ), i can authenticate the user and he can access to his account... how to check if the user is enabled or not?? ( i don't want to verify that in every action..) is that implemented by symfony ?? in the UserChcker class i see : public function checkPostAuth(UserInterface $user) { if (!$user instanceof AdvancedUserInterface) { return; } if (!$user-isAccountNonLocked()) { throw new LockedException('User account is locked.', $user); } if (!$user-isEnabled()) { throw new DisabledException('User account is disabled.', $user); } if (!$user-isAccountNonExpired()) { throw new AccountExpiredException('User account has expired.', $user); } } 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Log raw SQL queries
If you are using symfony 1, I know you can turn on logging through the settings.yml file and get even the raw sql queries to log to the logs directory under your project root. On Wed, Apr 20, 2011 at 9:24 AM, coviex cov...@gmail.com wrote: Hi, We have some problems with SQL and cannot find the code which causes them. So I'd like to inherit from Propel and override some of it's methods so I can log application state upon certain query types execution. The question is how to switch Propel with child class application- wide? Thanks, Kostia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] how to get PK after save()
$user=new user(); $user-setUname('ethan'); $user-setPassword('111'); $user-save(); *$id = $user-getId();* 2011/4/20 Ethan ruanx...@gmail.com hello, everybody, I'm a newer in symfony. Now I have a question. when I set attributes and use save() to store data in database, then I need to get the PK of this new row. How can I get it? e.g. $user=new user; $user-setUname('ethan'); $user-setPassword('111'); $user-save(); then I need to getId of the $user. I hope the method isn't something like use $user=userPeer::retrieveByUname('ethan'); $user-getId(); -- 少许诺多兑现 -- -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] how can login to forum?
http://forum.symfony-project.org/ucp.php?mode=registersid=8c78ea17e7252f15144da3c0d509ec55 On Fri, Apr 15, 2011 at 4:42 PM, libero rin...@libero.it wrote: How can i access the forum? (http://forum.symfony-project.org) I can't get the password and username: I compile the form to ask for the data but it always replies The e-mail/username information submitted could not be found. Thank you in advance for your help R. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [symfony2]invalid csrf
Make sure you render the hidden fields too On Thu, Apr 14, 2011 at 2:27 PM, samuel zoulil...@gmail.com wrote: hello, I'm trying to make my first form and I have some trouble with the csrf. I've seen previous discussion on this subject but no one solve them. here is my code : //Entity with annotations class TestEntity { /** * @validation:MaxLength(160) * @validation:NotBlank */ public $rawtext = ''; } //the form class class TestForm extends Form { public function configure() { $this-setDataClass('Entity\\TestEntity'); $this-add('rawtext'); } } //controller public function indexAction() { $form = TestForm::create($this-get('form.context'), 'test'); $form-bind($this-container-get('request'),new TestEntity); if($form-isValid()){ var_dump($form-getData()); } return array( 'form' = $form, ); } //the view form action=# method=post {{ form_field(form) }} input type=submit value=Send! / /form I allways got the error : The CSRF token is invalid. Please try to resubmit the form But in the final form html element appear a hidden input witch name is _token. So I'm wondering where am I wrong ? Thank you for reading -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: Re : Re: [symfony-users] [symfony2]invalid csrf
The csrf field is also a hidden field On Thu, Apr 14, 2011 at 2:38 PM, sam zoulil...@gmail.com wrote: I have one hidden field : input type=hidden id=test__token name=test[_token] value=db845c8ea6164b93205d08977fd583139c5c / -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to inform user that session has timed out?
A quick Google got this: http://stackoverflow.com/questions/1845452/how-to-detect-session-timeout-in-symfony On Wed, Apr 13, 2011 at 2:35 AM, benze ebenza...@gmail.com wrote: Hi, I'm using symfony 1.4 and am relatively new to it. I'm looking for a way to inform the user that his session has timed out. Right now, what is happening, is that a user is logging into the site, waiting an extended period of time, and then clicking on an action. Given that his session is expired, he is redirected to the home page. Is there a way that I can instead redirect the user to a We're sorry, but your session has timed out due to inactivity. Please log in again. page? I've looked through the docs, but can't seem to find the place where it discusses this issue. Thanks! Eric -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to inform user that session has timed out?
One other way to do it is when the user logs in, store his username as a session variable: $this-getUser()-setAttribute('username', $username); Then when the user is redirected to the action that produces the login page when his session times out, check to see if that session variable exists and if so, then his session has timed out: if ($this-getUser()-hasAttribute('username')) { $session_timed_out = true; } else { $session_timed_out = false; } If the username exists as a session variable it means he must have logged in before as only after login do you create that session variable. If the username variable is NOT set, then obviously he is logging in he first time. On Wed, Apr 13, 2011 at 2:35 AM, benze ebenza...@gmail.com wrote: Hi, I'm using symfony 1.4 and am relatively new to it. I'm looking for a way to inform the user that his session has timed out. Right now, what is happening, is that a user is logging into the site, waiting an extended period of time, and then clicking on an action. Given that his session is expired, he is redirected to the home page. Is there a way that I can instead redirect the user to a We're sorry, but your session has timed out due to inactivity. Please log in again. page? I've looked through the docs, but can't seem to find the place where it discusses this issue. Thanks! Eric -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] problem displaying a uploaded image
You are mixing backslashes and forward slashes On Wed, Apr 13, 2011 at 9:11 AM, Laxmi laxmipsa...@gmail.com wrote: Hi hear is the code which I used to upload image and save the image name in database. $dir = sfConfig::get('sf_web_dir').'\images\user\ '; $user = $this-getUser()-getAttribute('user'); $filename = $_FILES[file][name]; move_uploaded_file($_FILES[file][tmp_name],$dir.$filename); $fuser = Doctrine_Core::getTable('friendlynationuser')- find($user); $fuser-set('picture',$filename); $fuser-save(); $this-redirect('dashbord/index'); but when i am trying to display image i am unable to display please let me know where i am going wrong $picture = Doctrine_Core::getTable('user')-getPicture($user); //echo $picture; $location = '/images/user/'.$picture; img class =user_image src=?php echo $location; ? /br Thanks in advance -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Disable view for certain actions
return sfView::NONE; On Wed, Apr 13, 2011 at 12:39 PM, coviex cov...@gmail.com wrote: Hi, In the project which I work on currently there are a lot of empty view files. Corresponding actions do something useful but don't need views. How can I disable views in actions or elsewhere and do not stock those empties. Regards, Kostia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Website written on RoR Passed to Symphony??
Sometimes redeveloping from scratch is a good idea, we have done it a few times. However when selecting which language or framework to use you need to bear in mind things like available skills (i.e. people around that can code in that language or framework). RoR, unfortunately, does not have as big a developer pool available as PHP has. Even if you got a good PHP developer who hasn't used symfony before, symfony is not that complex to learn. Also, bear in mind that languages do not force developers into good practices. You can right an app badly in RoR just as easily as you can with PHP+symfony. Basically, you need to weigh the advantages and disadvantages of platforms, tools, etc. You may think RoR is a cleaner and more cutting edge language to use but the difficulty and cost of getting good developers for it may outweigh those benefits. On Sun, Apr 10, 2011 at 12:22 PM, Magali Boisseau magali.boiss...@gmail.com wrote: Hi Justen, Thanks for your response. Actually, I don’t really have the choice. Three years ago, I really got interested into Ruby On Rails because as an Web entrepreneur, I tend to select the more effective and innovative tools for my company. The problem is that if you don’t program a website with the best practices and all the tests needed, whatever the language, then, each time you want to implement a new feature, it takes you twice the time and generates a lot of bugs. It exactly what happened with Bedycasa. I wanted to implement a nice, simple, clean and scalable website but the developers I worked with did not follow my specs and most of them just did not care about writing the tests. Since then, a good and reliable developer has been trying to fix the bugs and simplify the platform but it takes just too much time because things have not been written right since the beginning. Now, I’m searching for a good and reliable dev to program the new version of Bedycasa. I’m also considering learning symfony myself… Thanks for considering my request, You can know more about Bedycasa by clicking on this page: http://www.bedycasa.com/documents/bedycasa-press -- *De :* symfony-users@googlegroups.com [mailto: symfony-users@googlegroups.com] *De la part de* Justen Doherty *Envoyé :* samedi 9 avril 2011 23:56 *À :* symfony-users@googlegroups.com *Objet :* Re: [symfony-users] Website written on RoR Passed to Symphony?? its not impossible, but why would you want to make life difficult for yourself? On Sat, Apr 9, 2011 at 7:02 PM, serena79 magali.boiss...@gmail.com wrote: hello to the community! Do you know if it s possible to turn a ror website into a symphony one? Thanks for your answers because i m considering doing it for my etourism website, www.bedycasa.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 -- - http://www.linkedin.com/in/justendoherty - LinkedIn http://www.twitter.com/phpchap - Twitter http://www.anotherwebdeveloper.com - Portfolio -- 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Custom view helpers
Its on the symfony website: http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer#chapter_07_sub_helpers On Mon, Apr 11, 2011 at 11:38 AM, coviex cov...@gmail.com wrote: Hi, How do I get my function available in all views just like url_for()? Regards, Kostia -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] ajax chellanging question
http://jquery.com/ On Wed, Apr 6, 2011 at 9:59 PM, Jehan jeeha...@gmail.com wrote: Dear All I am using symfony 1.4. I want to show data in table format, with each record show a hyperlink. when click on link then that specific record edited using ajax. How to do it. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] ajax in symfony [error:javascript.php not found]
/extras/mibs MYSQL_HOME: \xampp\mysql\bin OPENSSL_CONF: /xampp/apache/bin/openssl.cnf PATH: 'C:\Perl\site\bin;C:\Perl\bin;C:\Program Files\PC Connectivity Solution\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Java\jdk1.6.0_21\bin;D:\tomcat_sakai\tomcat_sakai\bin;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\xampp\mysql\bin;C:\Program Files\Windows Live\Shared;C:\Sakai Development\subversion\bin;C:\Sakai Development\maven-2.0.9\bin;D:\xampp\php' PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PATH_INFO: /hello/jay PATH_TRANSLATED: 'D:\xampp\htdocs\hello\jay' PHPRC: \xampp\php PHP_PEAR_SYSCONF_DIR: \xampp\php PHP_SELF: /jproject/web/frontend_dev.php/hello/jay QUERY_STRING: '' REMOTE_ADDR: '::1' REMOTE_PORT: '55071' REQUEST_METHOD: GET REQUEST_TIME: 1302087694 REQUEST_URI: /jproject/web/frontend_dev.php/hello/jay SCRIPT_FILENAME: 'D:/xampp/htdocs/jproject/web/frontend_dev.php' SCRIPT_NAME: /jproject/web/frontend_dev.php SERVER_ADDR: '::1' SERVER_ADMIN: postmaster@localhost SERVER_NAME: localhost SERVER_PORT: '80' SERVER_PROTOCOL: HTTP/1.1 SERVER_SIGNATURE: addressApache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1 Server at localhost Port 80/address\n SERVER_SOFTWARE: 'Apache/2.2.14 (Win32) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l mod_autoindex_color PHP/5.3.1 mod_apreq2-20090110/2.7.1 mod_perl/2.0.4 Perl/v5.10.1' SystemRoot: 'C:\Windows' TMP: \xampp\tmp WINDIR: 'C:\Windows' argc: 0 argv: { } session: { } symfony v.1.4.11 - php 5.3.1 for help resolving this issue, please visit http://www.symfony-project.org/. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] ajax chellanging question
Using the ajax function inside JQuery. Your question is like asking How do I use PHP?. There is a lot you need to know and can't be described in a single message on the message lists. Read the site and learn how JQuery works and then learn how to use the ajax functions within JQuery. On Thu, Apr 7, 2011 at 9:00 AM, Jehan jeeha...@gmail.com wrote: I know it can be done by jquery but how. On Thu, Apr 7, 2011 at 11:59 AM, Gareth McCumskey gmccums...@gmail.comwrote: http://jquery.com/ On Wed, Apr 6, 2011 at 9:59 PM, Jehan jeeha...@gmail.com wrote: Dear All I am using symfony 1.4. I want to show data in table format, with each record show a hyperlink. when click on link then that specific record edited using ajax. How to do it. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] MP4 mime type sfValidatorFile troubles with IE6
The other solution is do not support IE6. Many major web companies have stopped support and even Microsoft is stopping support for it and has created a website to try and discourage web developers developing for it. At some point you need to decide to stop supporting ageing technologies. IE6 is a dinosaur in the browser world. You will be doing yourself a major favour by not bothering with it anymore. On Thu, Mar 31, 2011 at 5:17 PM, _kud kud.g...@gmail.com wrote: Hello, I've some troubles with IE6 (oh, really?), I'd like to validate my mp4 uploaded file but sf 1.4 answers me it's a wrong mime type. What I've done: $this-setValidator('video', new sfValidatorFile( array( 'mime_types' = array('video/mpeg','video/mpg','video/ mp4'), 'path' = sfConfig::get('sf_upload_dir').'/users/video', 'required' = false, 'max_size' = '10485760' ), )); I checked my file with 'file --mime-type example.mp4' in shell (macos), it returns 'video/mp4', and when I use my form with Fx4 or Safari or Chrome, I've no trouble. Do you have any idea how to validate a mp4 file with IE6? Thank you. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Form to change a username logs me in as another user if I enter their username
Your code to set a user as authenticated is before your code to add them to database. Therefore the user is marked as authenticated, then the database gets checked and then fails ... but the user is still authenticated. On Fri, Apr 1, 2011 at 6:26 PM, Philip Cole phi...@pcole.me wrote: Hi all, This is kind of weird and I don't understand how it happens. Hope someone can help or has an idea why it could happen. I created a simple form to change my authenticated user's username and when I change to somebody else's username I get an error (because the username is unique) but on the next page refresh I am suddenly authenticated as the other user. Note: I a doctrine entities for my users. Any thoughts? Thanks, Philip -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Fatal error: Call to a member function getprenom() on a non-object
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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Content Negotiation Functionality
With symfony 1.x you can easily get access to ALL request headers in your controller actions. Using this, you can also alter the response headers as well as the content you respond with by reading what the request header is. If you wish to do this across an entire application you can also pre or post filters to help manage it easier. With Symfony 2 I am not sure as I have not yet spent enough time learning the newer version, primarily because our deployment servers cannot install a PHP version higher than 5.1 right now. On Thu, Mar 31, 2011 at 8:07 AM, Tobias webmas...@tubo-world.de wrote: Hey, that's also what I need. I made it work in sf1.4 but it was only hacked together. As far as I see such functionally is also not prebuilt in sf2. Thats a pity because its a regular use case. I imagine a custom route which supports to specify all available formats and then returns the most appropriate according to Accept header. It should also include the Content-Location header in the response and allow generic URI which have the Vary response header. Example: article_show: class: ContentNegotiationRoute pattern: /articles/{year}/{title}.{_format} defaults { _controller: AcmeDemo:Article:show, _format: html } requirements: _format: html|rss|json year: \d+ So /articles/2011/title would return 200 with Content-Location / articles/2011/title.html and Vary: Accept And the format requirement can be used to specify all available formats for this route. And the URL-generator needs to return the generic URI when no format specified. On 29 Mrz., 02:01, raviu ravi.undupit...@gmail.com wrote: Hi, I'm embarking on a project where I require one URL to provide multiple formats of a document. The document should be served depending on the Accept field of the HTTP header. HTML or RDF. I know this can be done using apache mod_rewrite. Just want to know if this functionality is supported by Symfony and if so is it as simple as updating a htaccess file? Thanks, Ravi -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Fatal error: Call to a member function getprenom() on a non-object
Then thats your problem... On Thu, Mar 31, 2011 at 2:43 PM, mohamed sabri ben sassi mohamedsabri.bensa...@gmail.com wrote: it dont return any value 2011/3/31 mohamed sabri ben sassi mohamedsabri.bensa...@gmail.com elle ne retourne aucune valeur 2011/3/31 Haris Fauzi haris.fa...@gmail.com Hi Mohamed, This means that when you call $utilisateur-getprenom() The variable $utilisateur is not an instance of a class. Check the value of $request-getParameter('matricule') if it's returning a valid value to pass for find(). $matricule_value = $request-getParameter('matricule'); printf(matricule_value = %s\n, $matricule_value); exit(); $this-utilisateur = Doctrine::getTable('utilisateur')-find(array($matricule_value)); Regards, Haris On 31 March 2011 20:01, mohamed sabri ben sassi mohamedsabri.bensa...@gmail.com wrote: yes i tried with this ,,i have passed in find the primary_key weach is matricule but the same thing ,,i really stocked its bizare,,because when i generate an other module with showSuccess it works ,,but if i create my own function in action.class and my own template it makes an error Fatal error: Call to a member function getprenom() on a non-object please give some solutions 2011/3/31 deepak deepakkumar...@gmail.com Hi Please try with $this-utilisateur = Doctrine::getTable('utilisateur')-find($request- getParameter('matri cule')); find tries to search the row on the basis of primary key. That means you must pass primary key in find('PRIMARY_KEY') try this and post your feedback. -deepak On Mar 31, 1:19 pm, mohamed sabri ben sassi mohamedsabri.bensa...@gmail.com wrote: hi guys,,i need help i have an error when i want to view my name or some information extracted from base with function getprenom or getmatricule ,,,the error is: Fatal error: Call to a member function getprenom() on a non-object in C:\development\sfprojects\gestion des competences\apps\frontend\modules\login\templates\CVSuccess.php on line*55* * * *there is the code of fuction executecv:* * class loginActions extends sfActions { public function executeCv(sfWebRequest $request) { $this-utilisateur = Doctrine::getTable('utilisateur')-find(array($request-getParameter('matri cule'))); $this-forward404Unless($this-utilisateur); } and there is the code of cvsSuccess: span class=i3 Votre non/spanspan class=i2?php echo $utilisateur-getprenom(); ?/span i need help please * -- 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [symfony2]authentication with email
Just make your username an email address On Thu, Mar 31, 2011 at 2:26 PM, symfonyMan ezziani.cha...@gmail.comwrote: Hello, I created a userBundle in my symfony2 project, it work good with authentication by username. I want to authenticate the users with the email property, and i don't know what to change in configuration, entities to enable that. any idéas ?? Thnaks sorry for my bad english -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Fatal error: Call to a member function getprenom() on a non-object
Your query returns no results from the database. THEREFORE there are no objects to call getPrenom on because none were extracted from the database. You need to where you call $utilisateur-getprenom() do something in case there are no results. This isn't a symfony issue but a PHP one. Think a little!! On Thu, Mar 31, 2011 at 3:23 PM, mohamed sabri ben sassi mohamedsabri.bensa...@gmail.com wrote: like what because i use symfony for first time so can you help me 2011/3/31 Christophe COEVOET s...@notk.org Le 31/03/2011 15:12, mohamed sabri ben sassi a écrit : yess i cant get my column with the methode get() it didnt work when i make $utilisateur-getprenom() Fatal error: Call to a member function getprenom() on a non-object You issue is not with -getprenom. The issue is that you don't get any $utilisateur instance but null because your query return no result. So you need to handle this special case in your controller by doing something else when there is no result. -- Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: [symfony2]authentication with email
No, just make the username = email On Thu, Mar 31, 2011 at 5:34 PM, symfonyMan ezziani.cha...@gmail.comwrote: Hello Thanks for your replay I have to delete email property in user entity ?? there is not other method ?? thanks On 31 mar, 12:59, Gareth McCumskey gmccums...@gmail.com wrote: Just make your username an email address On Thu, Mar 31, 2011 at 2:26 PM, symfonyMan ezziani.cha...@gmail.com wrote: Hello, I created a userBundle in my symfony2 project, it work good with authentication by username. I want to authenticate the users with the email property, and i don't know what to change in configuration, entities to enable that. any idéas ?? Thnaks sorry for my bad english -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [Symfony2] link_to() helper for Symfony2???
Inline javascript is really frowned upon these days as bad practice Consider looking at using a javascript library like JQuery. It simplifies your Javascript code immensely, makes calling abstracted functions dead easy from an external file based on triggering events on DOM elements and best of all, ensures your code is compliant with the major browsers. On Thu, Mar 31, 2011 at 2:09 AM, oscar balladares liebegr...@gmail.comwrote: Hi everybody [?] I need the functionallity of the link_to() helper. It generates a link tag when clicked it triggers an Onclick event that submit an embbeded form which is similar to: a href='#' onclick=if (confirm('Are you sure?')) { var f = document.createElement('form'); f.style.display = 'none'; this.parentNode.appendChild(f); f.method = 'post'; f.action = 'IDontKnow.php'; var m = document.createElement('input'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'token'); m.setAttribute('value', '12345tfftr44lkj4l04'); m.setAttribute('type', 'hidden'); m.setAttribute('name', 'user'); m.setAttribute('value', '1'); f.appendChild(m); f.submit(); }; return false;Delete/a With Macros on twig I could implement a similar helper, but the usefullness of link_to() is that it generates a CRF token to validate the post value and prevent XSS attacks. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en 349.gif
Re: [symfony-users] How do I start the session in symfony1.4 ?
http://www.symfony-project.org/gentle-introduction/1_4/en/06-Inside-the-Controller-Layer#chapter_06_user_session On Tue, Mar 29, 2011 at 7:46 AM, sunny4sfony putta.su...@gmail.com wrote: So far I have been using session_start() for starting the session. What is the way to start the session using symfony1.4 libraries ? Also please point to the documentation on managing sessions, if available. 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Symfony always redirects to https
Eliminate the likely candidates: 1. Problem happens on one machine and not the other. 2. Code does not change between one machine and the other. 3. Therefore problem is not code, problem is the other machine. There is probably a web server or proxy setting that is converting all port 80 http traffic to https automatically. On 08/03/2011 01:54, Gergely Csépány wrote: Hi, I'm having a strange problem: on a shared host, all the redirects (eg. -redirect('@homepage')) result in https urls, even if I was on bare http. In the logs I see that the WebController receives this https url from the Routing, but I never told it to do so. And the really strange is that it only happens on one shared host, not on my computer, so debugging is slow and difficult. I welcome any ideas what can cause this, or where to look to find the problem. Thanks, Gergely -- 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] Is it possible to programmatically login to Symfony2?
I have not used Symfony2 at all yet, but in symfony 1.x, all you had to do was $this-getUser()-setAuthenticated(true); and they were authenticated. The best way to lead up to that point is create a unique code (maybe using md5(microtime()) ) and store that against the users account in the database. When you send the email, add that unique code to the link you send him (i.e. http://mysite.com/users/login/autocode/RANDOM_CODE_HERE/username/USERNAME). When he clicks the link, you can then compare his username to the code you generated, then remove the code from the database and use $this-getUser()-setAuthenticated(true) using the Symfony2 equivalent. On 07/03/2011 20:18, Brandon wrote: I'm loving Symfony2, but I'm a newbie. I have a form-login security function that is working great. But when a new user registers they are sent an email confirmation link, and it would be a little wonky to send them to the login page after registering. How do I log them in after they click the confirmation link? And for various reasons I would much prefer to build this on my own instead of the FOS bundle (even though it's great, wow!) -- 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] How to change default sfValidatorString max length message?
Overwrite the constructor of the sfValidatorString class to force your own message on all sfValidatorString objects: class mySfValidatorString extends sfValidatorString { public function _construct ($options, $messages) { $messages = array(max_length=Your message here); parent::_construct($options, $messages); } } In your own form use your new class instead of the original sfValidatorString: $validators['string_widget_name'] = new mySfValidatorString(array(max_length=100)); On Tue, Jan 18, 2011 at 7:47 PM, Basil Hussain basil.huss...@experience-engine.co.uk wrote: I have a couple of forms with many sfValidatorString validators on them. The default 'max_length' error message ('%value% is too long (%max_length% characters max).') is really not suitable to the way my forms are laid out in the HTML, because repeating the too-long value within the message throws everything out of alignment. So, I want to set a shorter message (e.g. 'Too long, %max_length% characters max'), but I don't want to have to add the same message array repeatedly for every single sfValidatorString instance on these forms - each has 20 of them! Is there a way to set a default 'max_length' message once for every sfValidatorString on a form? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] [Symfony 1.4] Deploying on Windows
On your server in your project root run symfony project:permissions which will automatically set the right permissions. The permissions issue is the same even if you use other deployment methods (like svn for example). Just be aware of it and each time you update run that symfony command. 2011/3/6 Sebastian Göttschkes sebastian.goettsch...@googlemail.com Hi, I'm currently having issues deploying symfony from my Windows machine as rsync breaks file/folder permissions. I wrote a shell-script which is setting the correct permissions and groups again but I'm not sure about the best way using the script. I find it complicated to log in via ssh after the deploy is done and run the script manually. I know, this is not a symfony issue, but I figured since people here might use rsync with symfony, they'll have found a way to work around this. Regards, Sebastian -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: mysql_real_escape_string
You do not need to use mysql_real_escape_string if you are using symfony properly. It does this automatically for you. Try reading peoples responses properly and perhaps consider doing one of the symfony tutorials to learn symfony as well. On 04/03/2011 04:09, Laxmi wrote: hello Thanks for reply, Yes I am new to symfony. i just want to replace special characters with raw data while saving the data into database. I tried to use sfOutputEscaper class but no sucess. Can you please let me know which is the better class to implement it Thanks On Mar 3, 4:34 pm, Alex Pilonalex.pi...@gmail.com wrote: This sort of task should be done for you by Doctrine - assuming you are using database models and such. The question you are asking indicates that you have not done very much reading into the specifics of the framework. I would recommend you run through this tutorialhttp://www.symfony-project.org/jobeet/1_4/in order to gain a more thorough understanding of what symfony and Doctrine/Propel are meant to do. On Thu, Mar 3, 2011 at 19:17, Laxmilaxmipsa...@gmail.com wrote: Hello How can i implement mysql_real_escape_string in symfony. I am submitting a form and by using mysql_real_escape_string i want replace special characters in database by slash. 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 -- Alex Pilon (613) 608-1480 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Error:Call member function getDescription() in non object
Your code is written in a way that totally disregards the entire mccumskey design pattern that symfony is built around. You have business logic lettering your template and controller decisions scattered in there too. I very strongly recommend you stop coding smd learn symfony-users properly with the tutorials. On 02 Mar 2011 7:01 AM, Kiran kirankada...@gmail.com wrote: Hello Friends, I am using symfony 1.1.1. I got error in my template file. I do not understand error meaning. I think the the error is occured at foreach loop. Error is as follow Call memmber function getDescription() in non object /// My template code is as follow ?php include_partial(registration/topnav); ? ?php $c=new Criteria(); $c-add(StudentDocumentPeer::STUDENT_CODE,$sf_user- getAttribute('studentcode')); $studentdocument=StudentDocumentPeer::doSelect($c); ? form action=?php if($sf_user- hasCredential('Application_Part_L_Change') || $sf_user- hasCredential('Application_Part_L_Input')){ echo url_for('registration/forml'); }? method=POST enctype=multipart/ form-data div class=wrapper_form_con ?php echo $formdocument['id'] ? div class=cointainer_grayborder table width=100% border=0 cellspacing=0 cellpadding=3 id=tableformcontainer tr td colspan=3 class=tdbgcol align=leftstrongPART L: UPLOAD DOCUMENT/strong /td /tr tr td colspan=5 class=bg_g /td /tr tr td class=border_gray align=left valign=topUpdoad Documentbr / ?php echo $formdocument['student_code']-renderError();? ? php echo $formdocument['student_code']-render(array('value' = $sf_user-getAttribute('studentcode',''),'style' = 'display:none')) ? ?php echo $formdocument['document']-renderError();? ?php echo $formdocument['document']-render(array(tabindex = 1,'class' = 'input_name')) ? /td td class=border_gray align=left valign=topDescriptionbr / ?php echo $formdocument['description']-renderError();? ? php echo $formdocument['description']-render(array(tabindex = 2,'class' = 'input_name')) ? nbsp;/td /tr tr td colspan=3 align=left valign=top input type=submit name=submit value= id=submit class=button_submit//td /tr tr td?php foreach($studentdocument-getDescription() as $value){ echo link_to($value,'registration/forml'.$studentdocument- getDocument()); } ?/td /tr /table br/ br/ br/ /div div class=div3px/div /form /body/html Please give me some hint to remove this error. Thanks In Advance Kiran -- 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] include_slot handling zero value wrong?
AFAIK include_slot has only 1 parameter. You may be thinking of the slot() helper as mentioned here: http://www.symfony-project.org/gentle-introduction/1_4/en/07-Inside-the-View-Layer#chapter_07_sub_slots On 02/03/2011 12:35, Sebastian Göttschkes wrote: Hi, I was trying to do the following: ?php include_slot('test','0') ? To my surpirse, if the slot test is not set, it shows nothing at all and even if the slot is set to '0' it shows nothing at all. If I change it to '1' it works as expected. Am I doing something wrong? Regards, Sebastian -- 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] Remember: how to create a Doctrine project in symfony 1.2?
What do you need to remember? Go read! On 02/03/2011 11:29, Javier Garcia wrote: Hi, someone can remember how to create a Doctrine project in symfony 1.2? 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] entity mapping of library class in OOPs paradigm
Model classes are the place designed for it. If, however, you are performing a distinct set of functionality create your own class that will instead call simplified version of doctrine queries from it. Anything that runs the actual query should be in your model classes. There really is no problem storing lots of static functions, thats kinda the point... a central location to store functions you may or may not reuse. On 01/03/2011 08:49, charanjeet wrote: Hi I have got doctrine queries that operate on multiple tables and even across databases. Where should i place these? Model classes dont seem appropriate for it. if I place these in library class, the code doesn't remain structured and i will end up having a class with lots of static functions! What would be the better approach to handle it. Please help. (I am posting this query again as last time its formatting was spoiled) Thanks Regards Charanjeet Kaur -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Natural date parsing like Chronic
The closest would be strtotime: For example: date('Y-m-d', strtotime(date('Y-m-d').' + 2 days')); would give you 2011-03-03 date('Y-m-d',strtotime(date('Y-m-d').' - 2 days')); would give you 2011-02-27 etc On 01/03/2011 09:09, pbkyriak wrote: Hi all, last night I was checking out for new fancy staff, and i got onto a ruby gem called Chronic a natural date parsing lib. http://chronic.rubyforge.org/ eg tomorrow is 2011/3/2, or next monday is 2011/3/7!! extremely user friendly!! does anyone knows if there is something similar in php? best regards Panos -- 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] Update database schema
Edit your schema.ym as you need it then manually add the fields yourself to your existing database just as you defined it in your schema. There is no automatic way to do that with symfony. Besides, your data you should have now during development should be able to be repopulated through fixtures. If you are making changes that will affect a live system you WANT to do it manually to be able to watch that the changes are right. On 01/03/2011 03:19, Laxmi wrote: Hello, I already wrote the database model in config/doctrine/schema.yml I want to modify the table structure. what are the steps i need to do to modify my database with out losing data. 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
Re: [symfony-users] Web hosting provider for Symfony 2? What do you recommend?
If you feel like being a bit of a DIY man, you could setup your own server on one of the cloud providers like Linode (www.linode.com).Their cheaper option is US$20 which I use and never had a problem. On Mon, Feb 28, 2011 at 6:34 AM, oscar balladares liebegr...@gmail.comwrote: Hi everybody. As everyone knows, PHP 5.3 is not supported by all web hosting providers. I would be happy to hear about your experience and I would like you to recommend to me a good web hosting provider. There are lots cheaps WHP but I know that you get what you paid for. any suggestion?? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Trying to get a list of tables/object for a database (propel)
Why not take a look at what the symfony command symfony propel:build-schema does? That command is used to build model from an existing database. If you investigated how the code of that command did it it would probably show you how to accomplish it yourself. On Mon, Feb 28, 2011 at 12:04 PM, noamicko noam.na...@gmail.com wrote: Hi all I'm trying to get a list of tables/objects in an existing database, that i already built using propel (via symfony's task manager) so i already have modules, and a yaml configuration. The main purpose on this is to index the data for few tables, but since the tables are quite dynamic and change from time to time, i'm trying to build something dynamic. what I want to retrieve is a relational database map, but for now just a map would do it... I tried propel::getDatabaseMap(), but this only returns a database map builder, and it doesn't contain the actual list of tables. Thanks a lot Noam -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: dynamically extending classes
I will concur with Richter here. It is far better maintenance-wise to keep all your application logic in the app and not distribute that around into the database. The only time a view is of use is when an outside batch-script or cron job might use it as that is not directly related to your application logic, and even then I'd not rush into that. Imagine a year from now, another developer needs to take over maintaining the application. If he needs to start looking outside the application for code it will make his job that much harder. Thats just one example. Debugging becomes a bit tougher too with database-located logic as you need to determine if its DB or app. On 26/02/2011 19:27, Richtermeister wrote: Hi Himanshu, this seems overly complicated. Since you're getting the same fields from the database regardless of which user is logged in, you should be fine using the same class to access those fields. The model shouldn't change depending on which user uses it, only different data should be accessed. This is simple enough to do: ProperyQuery::create() - filterByOwnerId(1) - find(); //Propel example Secondly, views give no performance boost, because underneath it pre- executes the query that defines the view every time you access it, so you may not have to write the WHERE clause, but it's still being executed. In symfony land, by using ORMs, we derive similar flexibility just in code. For example, if you find it too tedious to filter the Property entity for the current user every time you access it, just add a getPropertyQuery() method to your session user (myUser) so that does this filtering for you in one spot. The reason this is the recommended approach is because you're not spreading your business logic across multiple layers (application, storage, etc). It's all in one place - the application. Imagine you want to switch to a database that doesn't support views, then you'd have a big problem. Using Propel/Doctrine logic instead - no problem. Of course you're free to do whatever you like, this is just my opinion. :) Daniel On Feb 26, 5:11 am, himanshuhisupa...@yahoo.com wrote: Hi, I want to extend base classes dynamically. Following explains my requirements. I have a table 'Property'. Columns are 'property_id', 'owner_id', 'name' and many more. So default there will be BaseProperty class, Property class extending BaseProperty class. I want to use mysql views. views will be ctreated like following: vwProperty1 : SELECT * FROM Property WHERE owner_id = 1 vwProperty2 : SELECT * FROM Property WHERE owner_id = 2 I want to extend BaseVwProperty1, BaseVwProperty2 class dynamically. Based on login of Owner, I want either class Property extends BaseVwProperty1 or class Property extends BaseVwProperty2 And not following, which is default class Property extends BaseProperty. The usage of views can give performance boost and many thing you need not set every time, it eliminates lot of physical where conditions. This is an example and can be used in complex conditions. Any help will be appreciated. A solution or a suggestion of using any design pattern to achieve above. Himanshu -- 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] Create dynamic folder and save files in it.
Create the directory in the uploads folder using the mkdir function (http://php.net/manual/en/function.mkdir.php) and then store the uploaded file in there. On 24/02/2011 16:27, Kiran wrote: Hello friends I want to create dynamic folder with specific name and file must save in that folder. For example if user upload a file , the file must be save in folder name as UserID. Suppose UserID is XYZ-001 So File must be save in Folder named as XYZ-001 Can some body give me idea to complete this task? Thanks In advanced Kiran -- 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] Backup MySQL via php, in a Symfony application
Try using the API of the sfDatabaseManager class On 23/02/2011 15:09, Manu wrote: Hi, I'm trying to do a php script to backup my database. Here's what I've tried so far (in an action) : $command = mysqldump -u [username] -p [password] [databasename] | gzip db.sql.gz; $this-output = system($command); 1) How do I get the password and username from databases.yml ? 2) How can I do a script that sends me the backup file, instead of saving it on the server (à la phpmyadmin) ? -- 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 get a 500 instead of a 404
those functions need to be within a class to actually work ;) On 23/02/2011 18:00, Manu wrote: Hi, I've created custom 404 error pages for my symfony application, but they don't seem to work. In dev I see : This request has been forwarded to a 404 error page by the action blabla. But in prod, the page is just blank; I get a 500 error. In the logs, the error is : PHP Parse error: syntax error, unexpected T_PUBLIC in /var/www/ myproject/apps/myapp/modules/default/actions/actions.class.php on line 7 default/actions/actions.class.php is the following : ?php /** * Error page for page not found (404) error * */ public function executeError404() { } public function executeSecure() { } ? What is going on ? -- 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] Getting information from simple drop-down list form
Inside an action $this-value is not the same as $value. Use either $this-value or $value not both. Also, it would be a better idea to use the forms framework even for simple forms. It protects you from alsorts of malicious attacks. Or, at the very least, have some very good validations of your own for the form data before processing it. On 22/02/2011 15:00, Marcin wrote: Hello All, I've a simple form in the homepage (layout.php): form action= select class=ddlist name=selectedValue onchange='this.form.submit()' option value=val1Value1/option option value=val2Value2/option option value=val3Value3/option /select /form In actions.class.php I want to differentiate an action based on chosen value. I have: public function executeIndex($request) { $this-value = $request-getParameter('selectedValue); if($value == 'Value1') { do some action} elseif($value == 'Value2') { do another action} else {default action} } The problem is that whatever I choose in drop-down list, default action is always triggered. I suppose there can be some problem with passing the value from form into actions.class.php. Do You have any ideas? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Symfony 1.4, Linux and MsSQL
It has nothing to do with a plugin or symfony. Your MSSQL server is not allowing connections from locations outside the local machine. I.e. remote connections are not being allowed by the MSSQL server. If it was MySQL I would say make sure the host value for the user you are trying to connect to allows connections from the remote machine or from everyone (%). I do not know how to manage users on MSSQL or if its different. On 22/02/2011 02:16, Ernesto Garcia wrote: Hello. I want to connect a computer running Linux Symfony with MSSQL server. If I make the connection with php on the same machine works fine but if I try from symfony doctrine waiting time is very long and impossible to establish a connection. It is possible with this setup?. I need a plugin or something I have to upgrade my Linux machine? Thanks. -- Ernesto García erne...@taxusnet.com mailto:erne...@taxusnet.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 -- 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] Symfony as a webservice for an iPhone app
Look for more information regarding HTTP Digest Authentication. Also, because web services do not have the luxury of allowing for client-side cookies (as you are not loading a URL through the browser) most web services require the authentication to happen on every request. HTTP Digest Authentication allows you to bundle authentication with your request. On 22/02/2011 20:35, HiDDeN wrote: Hello. I'm building a simple iPhone app that synchronizes to a webservice served by Symfony 1.4. This app requires the user to be logged in. My question is, how can the user log in Symfony from the iPhone app? And how can I keep the session opened through the next petitions? Is this secure? Chapter 15 of the Practical Symfony book talks about webservices, but I can't find any guide about sessions. Thanks in advance. -- 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] How to install sfCaptcha plugin into netbeans
Netbeans is your IDE. It is where you develop your applications. You do not install symfony plugins into Netbeans. If you read the instructions it tells you how: http://www.symfony-project.org/plugins/sfCaptchaPlugin http://www.symfony-project.org/plugins/sfCaptchaPluginClick on the Readme tab. On Fri, Feb 18, 2011 at 7:35 PM, rahhal mahassen rahhal.mahas...@gmail.comwrote: Hello, Can you please explain to me how to install sfCaptcha plugin into netbeans? I tried to do this but i did't succeed. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Netbeans with sudo root permission problem
As I mentioned before, the best and most secure setup is to have your files sitting in your home directory (where your user account has all the permissions necessary to edit) and setup virtual hosts on Apache instead. On Thu, Feb 17, 2011 at 10:45 AM, ModaCalcio.com - e-reall ebay ereallst...@gmail.com wrote: Hi Gabriel and thanks for explanation Problem putting files on 664 is that they won't be handled if they are included. I am trying some galleries with Flex that uses XML for flashvars, and they are not streamed correctly, so I had to place that with 775 too. My worry is that some handle of file is not done sometimes, and I don't see the error , wasting my time troubling why it won't work as well eheheheh The soution with id is very interesting, but I have to study how to do it! Thanks anyway for your explanation. 2011/2/17 Gabriel Petchesi pghora...@gmail.com What you said is correct, the same setup I use for my development environment as well. umask: 002 development users belonging to www-data group. Directories created with 775 and files with 664. Another thing that you could do, have not tried it myself, have multiple users share the same user id that is the same as the one used by www-data user. Something similar is used by Dreamhost hosting all static files belong to my user and apache (via fastcgi) uses the same user:group to run the php code, it's clean and does not cause problems. A couple of more suggestions: 1. Do not use the netbeans packaged with Ubuntu. AFAIK that is the java version (optimized for developing java code) and usually is old one so better install the php only version downloaded from the netbeans site. It's much lighter and should work better. 2. Install the official jre if you haven't done so already, now belonging to Sun/Oracle. gabriel On Wednesday, February 16, 2011 5:31:04 PM UTC+2, ereallstaff wrote: Hi I have an annoying problem develoing application with netbeans I am on Ubuntu 10.10 and use netbeans 6.9 , installed from Ubuntu software center repository I know that applications Symonfy and php file should belong to www:data user and group, where www-data that is the default Apache user. But if all files belong to www-data using netbeans with normal user permissions, won't makes me modify them. Opening netbeans or any program with sudo or gksudo , could bring a lot of problem. Also Firefox opened in debug with sudo permission, makes it not function good anymore. A nice solution should be setting all files to NormalUser:www-data ( user and group I mean) . So you can modify them in local, and when they are uploaded by ftp to server, they go automatically with correct ownership. As a known problem of this, is sure that fopen php function, for example, won't open files, unless you set permission to group too ( 775 in total if I not go wrong rwxrwxr-x on files) I want to ask you all if you face same problem, and how did you solved that. Thanks Giuseppe -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Symfony 2 or Symfony 1.4?
This has been asked before but basically what it boils down to is: - Do you have an application that will be complete and ready to go live only after March? - Will you be willing to make alterations (perhaps extensive alterations even) after Symfony 2 is released in March to your application? - Do you mind even after the March release there being bugs that need to be worked out framework; i.e. stability might be an issue right after release. If you answered yes to all those questions then feel free to use Symfony 2. If however having a stable, thoroughly tested and implemented framework that works well and reliably with little downtime for corrections is more important, use 1.4. On Thu, Feb 17, 2011 at 9:11 AM, Daniel daniel.ra...@msn.com wrote: I am not sure if this question has been asked before. I looked and didn't see anything. I'm starting a project and I'm thinking I should do it on Symfony 2 since the release is scheduled for March. What do you guys think? Any advice? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Multiple databases and data exchange
Your best bet for ensuring you have good database backups is to look at setting up replication with master/slave setup. This is done through mysql directly and not with the application. The only way to do it through the application is to overwrite the save() method within your propel model classes (the non Peer classes) and tell it to save in your alternate database as well. But this will add extraordinary load onto your app, essentially doubling every write transaction. On Thu, Feb 17, 2011 at 9:41 AM, Thor thorste...@gmail.com wrote: Hi all, i have a question about multiple databases: supposing that i have the database.yml and everything setup to use two databases instead of one, with one that serve as a backup , and the other as the production... how can i achieve that with propel? i found a simple way to implement the 2 databases , here ( http://www.lampjunkie.com/2008/04/using-multiple-databases-in-symfony-with-propel/ ), what i need to know is: 1) is there a way to get records from the backup server ,and with those , replace the production data ? ( i could work on entire tables too ,don't know what is simpler ) 2) how can i eventually save data in both databases at the same time? Thank you in advance -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] error
Is your action called executeCreate? If so, what is happening is that your if condition is not being met so it does not hit your $this-setTemplate() call and so continues on to try and find the default template for the executeCreate action called createSuccess.php and errors out because you have not created it. Thats all I can offer seeing as you haven't included much information regarding the problem or much code to look at. On Tue, Feb 15, 2011 at 11:52 PM, Laxmi laxmipsa...@gmail.com wrote: I am hear trying to find weather email is existing in database or not but i am getting error The template create.php does not exist symfony. Please help $user = $this-user; $user = Doctrine_Core::getTable('user') -createQuery('a') -where('a.email = ?',$email) -execute(); if($user == false){ $this-form = new userForm(); $this-form-getwidgetSchema()-setNameFormat('user[%s]'); $this-form - bind($req); $friendlynationuser = $this-form -save(); $this-setTemplate('new'); } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] jquery validation
Try asking on the jquery forums etc. http://plugins.jquery.com/project/jqueryvalidate On Tue, Feb 15, 2011 at 11:53 PM, Laxmi laxmipsa...@gmail.com wrote: i am trying to do validation by using j query but it is not working can any one help me please $(#form_register).validate({ rules: { user[username]: required, user[first_name]: required, user[last_name]: required, user[email]: { required: true, email: true }, user[password]: required } }); $(user[username] name:last).addClass(error); }); -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Fatal error: Class 'BaseForm' not found
: updated_at: servicio_has_reporteTaller: servicio_id: { type: integer, required: true, primaryKey: true, foreignTable: servicio, foreignReference: id_serv } reporte_id: { type: integer, required: true, primaryKey: true, foreignTable: reporteTaller, foreignReference: id_reporte } reporteRedes: _attributes: { phpName: RRedes } id_reporte: { type: integer, required: true, primaryKey: true, autoIncrement: true } created_at: updated_at: servicio_has_reporteRedes: servicio_id: { type: integer, required: true, primaryKey: true, foreignTable: servicio, foreignReference: id_serv } reporte_id: { type: integer, required: true, primaryKey: true, foreignTable: reporteRedes, foreignReference: id_reporte } reporteConectividad: _attributes: { phpName: RConectividad } id_reporte: { type: integer, required: true, primaryKey: true, autoIncrement: true } created_at: updated_at: servicio_has_reporteConectividad: servicio_id: { type: integer, required: true, primaryKey: true, foreignTable: servicio, foreignReference: id_serv } reporte_id: { type: integer, required: true, primaryKey: true, foreignTable: reporteConectividad, foreignReference: id_reporte } reporteRodas: _attributes: { phpName: RRodas } id_reporte: { type: integer, required: true, primaryKey: true, autoIncrement: true } created_at: updated_at: servicio_has_reporteRodas: servicio_id: { type: integer, required: true, primaryKey: true, foreignTable: servicio, foreignReference: id_serv } reporte_id: { type: integer, required: true, primaryKey: true, foreignTable: reporteRodas, foreignReference: id_reporte } Thank you! BR, Dieter. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] sfJqueryReloadedPlugin - show loading
Have your change_zone div contain the spinner image you want but set its style attribute as style=display:none and then just toggle its display during loading. When the content you want inside it loads it will replace the image. div id=my_content_is_here !-- Whatever content I need for my user -- ?php echo jq_submit_to_remote('name', 'Odoslať', array( 'update' = 'change_zone', 'loading' = $('#change_zone').toggle(), 'url' = url_for('fotografia_send_contactmail'), )) ? /div div id=change_zone style=display: none img src=path/to/spinner / /div On Tue, Feb 15, 2011 at 6:19 PM, hribo hribo...@gmail.com wrote: Hi guys, how to achieve to display loader using *jq_submit_to_remote* method? ?php echo jq_submit_to_remote('name', 'Odoslať', array( 'update' = 'change_zone', *'loading' = #loading, //???* 'url' = url_for('fotografia_send_contactmail'), )) ? in my template is already div with id=loading thank you -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Why doesn't sfOutputEscaperArrayDecorator escape keys?
Because the key needs to stay exactly as it is because that is considered a reference to the value, not a value itself. If sfOutputEscaperArrayDecorator escaped your keys how could you call them with $array['key'] if the key gets changed? On Tue, Feb 15, 2011 at 5:23 PM, Basil Hussain basil.huss...@experience-engine.co.uk wrote: I was checking the validity of my project's HTML and noticed that some things weren't being escaped properly. After investigating, I discovered the problems were in certain places where I am outputting an array with string keys. Basically, in my code I am doing this: // Action $this-foo = array('' = 'bbb', '1' = 'aaa', '2' = 'bbb', '3' = null, '4' = 'ddd', '' = 'ddd'); // Template ?php foreach($foo as $k = $v) ? a href=?php echo $v; ??php echo $k; ?/a ?php } ? The $foo template value, being an array, obviously gets converted to an instance of sfOutputEscaperArrayDecorator. But, I discovered that sfOutputEscaperArrayDecorator does not apply any escaping to keys, but only values! So where, as I am doing, you are iterating over the array and want to output both value *and* key, you get broken HTML where your keys happen to contain special characters. Is there any particular reason why sfOutputEscaperArrayDecorator doesn't escape keys? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] sfWidgetFormPropelChoice newbie problem help needed please
.] and also: $errorSchema = new sfValidatorErrorSchema($this); // check that post_max_size has not been reached if (isset($_SERVER['CONTENT_LENGTH']) (int) $_SERVER['CONTENT_LENGTH'] $this- getBytes(ini_get('post_max_size'))) can ANYBODY PLEASE help me i am desperate please many 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Auto-filling caches
Why not just chain ajax requests? Have two divs, one visible one invisible. Load what the person wants to see with one ajax request. When that completes it calls another ajax request which loads the next page into the invisible div. When the person goes to the next page, the act of making that page visible starts loading the next page into the hidden div. 2011/2/10 Robert Gründler r.gruend...@gmail.com Hi, Imagine a blog where each BlogEntry has one Author, and can be tagged with one ore more Tags. The mainpage displays a paginated list of all blogentries. Every entry displays the title, author and the tags. The pagination is implemented using AJAX. To display the paginated list using symfony + doctrine, 3 Database queries are needed: 1. select count(*) # get the total number of entries 2. select distinct ... limit ... offset # get the actual ids of blog entries for that page 3. select ... where in (...) # retrieve the data to display for that page When the number of blogs and the authors + tags is getting large, these 3 queries can take up to 800 - 1000 ms, which is not fast enough, if you want ajax pagination. If a single page is cached, the ajax request takes about 200 - 300 ms, but the uncached page takes over 1 second to load. What we're thinking about is to pre-fill the cache of every page in that list, so that no user ever hits an uncached page. This pre-fillling could take place in a cronjob, which is run every 5 minutes or so - frequent enough for this use case. What i was thinking about is to set the cache-lifetime of the partial for a single page to one day, and update the cached results in the background - which actually is the part i'm not sure how to implement. Anyone knows if this kind of logic could be implemented using symfony + doctrine? thanks! -robert -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to check if a file exist before uploading it ?
http://www.google.co.za/search?sourceid=chromeie=UTF-8q=php+file+exists http://www.google.co.za/search?sourceid=chromeie=UTF-8q=php+file+existsGoogle is your friend. On Thu, Feb 10, 2011 at 12:35 PM, Manu emmanuel.parf...@gmail.com wrote: I use a custom validator to keep the filename during the upload : class mySfValidatorFile extends sfValidatorFile { protected function configure($options = array(), $messages = array()) { parent::configure(); $this-addOption('validated_file_class', 'mysfValidatedFile'); } } class mysfValidatedFile extends sfValidatedFile { public function generateFilename() { return $this-getOriginalName(); } } How can I check if the filename already exists in the folder ? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: How to check if a file exist before uploading it ?
Thats the only place you can do it .. On Thu, Feb 10, 2011 at 1:18 PM, Manu emmanuel.parf...@gmail.com wrote: Nevermind I'll do it in the action before -save() -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Use compenents from symfony 2.0 in symfony 1.4
I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those of symfony 1. On Wed, Feb 9, 2011 at 9:48 AM, soulfly yelena...@gmail.com wrote: Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those of symfony 1. On Wed, Feb 9, 2011 at 9:48 AM, soulfly yelena...@gmail.com wrote: Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
But ... symfony 1.4 has routing capabilities already built in. On Wed, Feb 9, 2011 at 11:01 AM, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. On Feb 9, 11:51 am, Gareth McCumskey gmccums...@gmail.com wrote: I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those of symfony 1. On Wed, Feb 9, 2011 at 9:48 AM, soulfly yelena...@gmail.com wrote: Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
Do you currently have performance related issues with your application? If you do not actually have performance issues then I would say not to worry about. If the application is performing efficiently, 30% of an efficient app is still efficient. If your application is struggling performance-wise then sure go ahead and find something to optimise, but don't leap to trying to optimise stuff when you do not actually have an issue related to it. In addition, what is the other 70%? If the other 70% is related to your own app code then I would say thats where you should be focussing. Making your own code more efficient is a bigger win than trying to hack the framework library for potentially small to zero returns. I can understand that you see 30% of script execution happens and jump to fix routing as it looks like low hanging fruit but you could cause bigger problems chasing that. Especially if you are not actually having any performance related issues. Optimising of performance should be a focus of an application once it goes live and you see there are performance issues, not before. On Wed, Feb 9, 2011 at 12:42 PM, soulfly yelena...@gmail.com wrote: We tested our project with xhprof and realized that routes take 30% of script executing. And we expect that routes in symfony 2.0 have better performance (even take in consideration that it in beta version now). So we have to optimize code or use better solution. On Feb 9, 1:35 pm, Gareth McCumskey gmccums...@gmail.com wrote: But ... symfony 1.4 has routing capabilities already built in. On Wed, Feb 9, 2011 at 11:01 AM, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. On Feb 9, 11:51 am, Gareth McCumskey gmccums...@gmail.com wrote: I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those of symfony 1. On Wed, Feb 9, 2011 at 9:48 AM, soulfly yelena...@gmail.com wrote: Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you
Re: [symfony-users] [Symfony2] Long Polling
The problem is session write locking. We had the same issue in symfony 1. I don't know how to do this for symfony 2 but I wrote a blog post to deal with it in symfony 1. Perhaps you can just convert this for use with symfony 2: http://garethmccumskey.blogspot.com/2009/10/php-session-write-locking-and-how-to.html On Wed, Feb 9, 2011 at 1:07 PM, Gabriele Genta gabriele.ge...@gmail.comwrote: Hello, I'm trying to implement long polling in a Synfony 2 project to shorten response times in a real-time application I'm making. Essentially I have an ajax front end that requests data to the symfony-driven backend through XHR. My problem arises when I try to send a second request to the backend while a first one is on hang for long polling; the second request just get queued after the first, and doesn't get processed until the first returns. I've googled a bit about the problem and found out that it could depend on session files being locked (see here: http://stackoverflow.com/questions/1430883/simultaneous-requests-to-php-script) during requests, but getting rid of session files didn't help (my backend is completely stateless, so it doesn't need sessions at all actually). Has anyone come across this problems before? I think the problem might have to do with symfony and caching (setting locks on cache files during requests, maybe?), but I don't know enough of the guts of symfony itself to find a solution or a workaround.. Thanks a lot! Gabriele Genta -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
I'm not trying to argue :) Only trying to help as the first thing that comes to my mind is that trying to shoehorn symfony2 stuff into symfony1, especially when you do not really know for sure if the symfony2 stuff will actually improve performance, seems to be a little rushed. Other things to consider that can help is using an opcode cache like APC if you do not already as that can make a major difference to performance and is far easier and better supported. On Wed, Feb 9, 2011 at 1:19 PM, Yelena Bunina yelena...@gmail.com wrote: We have performance issues, so we take xhprof to find the problem. Another big part in execution take Doctrine stuff calls. And in some places we have to refuse from Doctrine using plain sql (e.g. tasks). So I need an answer at my distinct question: how to built in symfiny's 2 route into symfony 1.4 properly :) I don't want to argue about what should we optimize. Another way is to give up using framework at all. But I like symfony and don't want to rewrite common stuff. On Wed, Feb 9, 2011 at 1:47 PM, Gareth McCumskey gmccums...@gmail.comwrote: Do you currently have performance related issues with your application? If you do not actually have performance issues then I would say not to worry about. If the application is performing efficiently, 30% of an efficient app is still efficient. If your application is struggling performance-wise then sure go ahead and find something to optimise, but don't leap to trying to optimise stuff when you do not actually have an issue related to it. In addition, what is the other 70%? If the other 70% is related to your own app code then I would say thats where you should be focussing. Making your own code more efficient is a bigger win than trying to hack the framework library for potentially small to zero returns. I can understand that you see 30% of script execution happens and jump to fix routing as it looks like low hanging fruit but you could cause bigger problems chasing that. Especially if you are not actually having any performance related issues. Optimising of performance should be a focus of an application once it goes live and you see there are performance issues, not before. On Wed, Feb 9, 2011 at 12:42 PM, soulfly yelena...@gmail.com wrote: We tested our project with xhprof and realized that routes take 30% of script executing. And we expect that routes in symfony 2.0 have better performance (even take in consideration that it in beta version now). So we have to optimize code or use better solution. On Feb 9, 1:35 pm, Gareth McCumskey gmccums...@gmail.com wrote: But ... symfony 1.4 has routing capabilities already built in. On Wed, Feb 9, 2011 at 11:01 AM, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. On Feb 9, 11:51 am, Gareth McCumskey gmccums...@gmail.com wrote: I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2. In addition, from what I understand, the class structures of everything in symfony 2 is different to those of symfony 1. On Wed, Feb 9, 2011 at 9:48 AM, soulfly yelena...@gmail.com wrote: Hi Is it possible to use compenents from symfony 2.0 in symfony 1.4 project. If so, would you explain how to do it right? Thnx -- 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 McCumskeyhttp://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
My point is not there aren't performance improvements if you were able to switch to symfony 2 routing. My point is that the risk vs rewards is not worth it as long as other options exist with a better risk vs reward. Hacking symfony 1 to use symfony 2 routing might never work well after hours of attempts for an unknown potential performance improvement whereas installing an APC cache (and this is just ONE example of other things you could try) would take about 15 - 30 minutes with no risk of anything not working and can provide measured and proven performance improvements. I'd rather go for low risk, proven improvements if I can than something that might be cool but can waste an enormous amount of time for an improvement that us unknown ... thats all. On Wed, Feb 9, 2011 at 1:43 PM, Yelena Bunina yelena...@gmail.com wrote: Whats new in routing: - Moved to components - Increased performance. Don't create rout object at any routing rule - When compare rout and url using strpos() except pre_match - To generate url and routes uses different objetcs (ProjectUrlGenerator, ProjectUrlMatcher) I think it is great to improve my project in such a way :) On Wed, Feb 9, 2011 at 2:25 PM, Gareth McCumskey gmccums...@gmail.comwrote: I'm not trying to argue :) Only trying to help as the first thing that comes to my mind is that trying to shoehorn symfony2 stuff into symfony1, especially when you do not really know for sure if the symfony2 stuff will actually improve performance, seems to be a little rushed. Other things to consider that can help is using an opcode cache like APC if you do not already as that can make a major difference to performance and is far easier and better supported. On Wed, Feb 9, 2011 at 1:19 PM, Yelena Bunina yelena...@gmail.comwrote: We have performance issues, so we take xhprof to find the problem. Another big part in execution take Doctrine stuff calls. And in some places we have to refuse from Doctrine using plain sql (e.g. tasks). So I need an answer at my distinct question: how to built in symfiny's 2 route into symfony 1.4 properly :) I don't want to argue about what should we optimize. Another way is to give up using framework at all. But I like symfony and don't want to rewrite common stuff. On Wed, Feb 9, 2011 at 1:47 PM, Gareth McCumskey gmccums...@gmail.comwrote: Do you currently have performance related issues with your application? If you do not actually have performance issues then I would say not to worry about. If the application is performing efficiently, 30% of an efficient app is still efficient. If your application is struggling performance-wise then sure go ahead and find something to optimise, but don't leap to trying to optimise stuff when you do not actually have an issue related to it. In addition, what is the other 70%? If the other 70% is related to your own app code then I would say thats where you should be focussing. Making your own code more efficient is a bigger win than trying to hack the framework library for potentially small to zero returns. I can understand that you see 30% of script execution happens and jump to fix routing as it looks like low hanging fruit but you could cause bigger problems chasing that. Especially if you are not actually having any performance related issues. Optimising of performance should be a focus of an application once it goes live and you see there are performance issues, not before. On Wed, Feb 9, 2011 at 12:42 PM, soulfly yelena...@gmail.com wrote: We tested our project with xhprof and realized that routes take 30% of script executing. And we expect that routes in symfony 2.0 have better performance (even take in consideration that it in beta version now). So we have to optimize code or use better solution. On Feb 9, 1:35 pm, Gareth McCumskey gmccums...@gmail.com wrote: But ... symfony 1.4 has routing capabilities already built in. On Wed, Feb 9, 2011 at 11:01 AM, soulfly yelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. On Feb 9, 11:51 am, Gareth McCumskey gmccums...@gmail.com wrote: I never said 1.4 couldn't work on php 5.3. To help with your problem, it would probably be easier to port the symfony 1.4 ode to a symfony 2 application than symfony 2 to 1.4. On Wed, Feb 9, 2011 at 10:27 AM, soulfly yelena...@gmail.com wrote: We use php 5.3 with symfony 1.4 - working good. On Feb 9, 11:14 am, Gareth McCumskey gmccums...@gmail.com wrote: I am not entirely sure but from what I have seen of symfony 2 it would not be possible. Firstly because symfony 2 requires php 5.3 as its minimum php version and symfony 1.4 requires php 5.2
Re: [symfony-users] Re: Long Polling
With symfony 1 you cannot use session_write_close reliably. There is a specific symfony function you call on the sfUser object to actualy have it close properly ;) Thats why I linked my blog post to help with that info. On Wed, Feb 9, 2011 at 3:04 PM, Gabriele Genta gabriele.ge...@gmail.comwrote: Thanks Garreth for your response. As I pointed out in my original post, though, I already tried the fixes regarding session files locking by calling session_write_close() and also by discarding session saving at all, by doing something like this: function foo() {} session_set_save_handler(foo, foo, foo, foo, foo, foo); Anyway, none of them worked, there's still something preventing the requests from running. Thanks anyway, Gabriele On mercoledì 9 febbraio 2011 at 12.10, Gareth McCumskey wrote: The problem is session write locking. We had the same issue in symfony 1. I don't know how to do this for symfony 2 but I wrote a blog post to deal with it in symfony 1. Perhaps you can just convert this for use with symfony 2: http://garethmccumskey.blogspot.com/2009/10/php-session-write-locking-and-how-to.html On Wed, Feb 9, 2011 at 1:07 PM, Gabriele Genta gabriele.ge...@gmail.com wrote: Hello, I'm trying to implement long polling in a Synfony 2 project to shorten response times in a real-time application I'm making. Essentially I have an ajax front end that requests data to the symfony-driven backend through XHR. My problem arises when I try to send a second request to the backend while a first one is on hang for long polling; the second request just get queued after the first, and doesn't get processed until the first returns. I've googled a bit about the problem and found out that it could depend on session files being locked (see here: http://stackoverflow.com/questions/1430883/simultaneous-requests-to-php-script) during requests, but getting rid of session files didn't help (my backend is completely stateless, so it doesn't need sessions at all actually). Has anyone come across this problems before? I think the problem might have to do with symfony and caching (setting locks on cache files during requests, maybe?), but I don't know enough of the guts of symfony itself to find a solution or a workaround.. Thanks a lot! Gabriele Genta -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
Well heelll.. I been saying that all day. Maybe not as clearly but that is in essence what I have been trying to point out. Developer time by the hour, especially since you don't really have any idea how long that integration could take, it could be a couple hours or a couple weeks, vs ANY OTHER solution, even temporary, that can fix the problem in a shorter time with known results. I'd rather take the quick, cheap fix with proven results (buying hardware, quick and dirty user memory cache for database queries at the model level, etc) than the unknown timescale, unknown cost with unproven results (trying to force a single library of one application to replace a similar library in another without sharing the same base). And then run the risk of things coming to bite you in the ass later. In fact, I'd go one step further. It would be a better use of your time and energy to port the ENTIRE symfony 1.4 application into a Symfony 2.0 application. You will have better consistency for maintenance purposes, security and bug fix updates will not potentially destroy your entire application and the kicker is that you already know all YOUR OWN code instead of trying to mangle someones elses code into someone elses code the way you are suggesting. Much easier to take what you built and port that to a higher version. On 09/02/2011 19:09, Matt Robinson wrote: On Feb 9, 9:01 am, soulflyyelena...@gmail.com wrote: I just try to know if it possible to take one component - Routing and use it in project on sf 1.4. May be it's enough to take folder with routes and pu it in folder in symfony 1.4. But may be I should write smth in factories or elsewhere. I'm sure it's technically possible, but it hasn't been designed to do that and there's no current procedure for doing it, so you'd be on your own - it'd be a LOT of work, and it might not pay off as well as you hope. Very often, developer time costs more than simply adding more servers, so I'd suggest throwing more hardware at it as the most cost-effective step after the obvious caching one (you're using APC, and I assume that you've thought about using something like Varnish or nginx). That'll give you the breathing room to look at specific optimisations in your app. It's really quite surprising that routing is taking up 30% of your script execution - I'm not arguing, mind you. How complex a routing table are we talking? Hundreds of routes? -- Matt -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] How to let the user choose the upload directory ?
The save() methods reads its location the same way you can by using sfConfig::get('sf_upload_dir'). And where there's a getter theres usually a setter. So before calling save use: sfConfig::set('sf_upload_dir', sfConfig::get('sf_root_dir').DIRECTORY_SEPERATOR.'new_directory'); Now when save calls sfConfig::get() for the upload directory it will use your setting. \On 09/02/2011 17:12, Manu wrote: I have a form used to upload images in my blog engine. The files are uploaded to web/uploads, but I'd like to add a choice widget to let the users pick from a list of folders, for instance 'photos', 'cliparts', 'logos'. Here's my form class ImageForm extends BaseForm { public function configure() { $this-widgetSchema-setNameFormat('image[%s]'); $this-setWidget('file', new sfWidgetFormInputFileEditable( array( 'edit_mode'=false, 'with_delete' = false, 'file_src' = '', ) )); $this-setValidator('file', new mysfValidatorFile( array( 'max_size' = 50, 'mime_types' = 'web_images', 'path' = 'uploads', 'required' = true ) )); $this-setWidget('folder', new sfWidgetFormChoice(array( 'expanded' = false, 'multiple' = false, 'choices' = array('photos', 'cliparts', 'logos') ) )); $this-setValidator('folder', new sfValidatorChoice(array( 'choices' = array(0,1,2) ))); } } and here is my action : public function executeAjout(sfWebRequest $request) { $this-form = new ImageForm(); if ($request-isMethod('post')) { $this-form-bind( $request-getParameter($this-form-getName()), $request-getFiles($this-form-getName()) ); if ($this-form-isValid()) { $this-form-getValue('file')-save(); $this-image = $this-form-getValue('file'); } } So how do I tell the file upload widget to save the image in a different folder ? -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Including a custom global YAML file?
Actually, all my apps so far are symfony 1.1 due to PHP version limitations on our production servers and the autoloading works a treat for us with no problems whatsoever. On 15/01/2011 15:48, Felix E. Klee wrote: On Sat, Jan 15, 2011 at 11:59 AM, Gareth McCumskey gmccums...@gmail.com wrote: You do not need to do an include or require. Not in Symfony 1.1: When you need the code based on the map.yml file and generated by the myMapConfigHandler handler in your application, call the following line: include(sfContext::getInstance()-getConfigCache()-checkConfig( 'config/map.yml')); url:http://www.symfony-project.org/book/1_1/19-Mastering-Symfony-s-Conf iguration-Files Yes, an upgrade to 1.4 is pending. Lots of messy legacy code, though... -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Long Polling
Well, in that case, have you verified that your web server is configured correctly? Is it perhaps set to only allow one process or connection at a time which would cause your queuing problem? Typically Apache should be able to handle very many child processes but often this setting can mistakenly be altered thinking its a load saving technique. On 09/02/2011 15:46, Gabriele Genta wrote: Ok then, following your advice I found a more canonical way of handling the problem without forcing the framework. To do so I configured symfony so that a session is not started automatically and I've also told it to use the ArraySessionStorage in place of the native one. As a result, now the application never calls the php functions for session handling (session_*), and no session file/record is created at all when the backend is invoked. Nevertheless the problem is still occuring, so at this stage I think it isn't related to session locks at all. Thanks, Gabriele On mercoledì 9 febbraio 2011 at 14.13, Gareth McCumskey wrote: With symfony 1 you cannot use session_write_close reliably. There is a specific symfony function you call on the sfUser object to actualy have it close properly ;) Thats why I linked my blog post to help with that info. On Wed, Feb 9, 2011 at 3:04 PM, Gabriele Genta gabriele.ge...@gmail.com wrote: Thanks Garreth for your response. As I pointed out in my original post, though, I already tried the fixes regarding session files locking by calling session_write_close() and also by discarding session saving at all, by doing something like this: function foo() {} session_set_save_handler(foo, foo, foo, foo, foo, foo); Anyway, none of them worked, there's still something preventing the requests from running. Thanks anyway, Gabriele On mercoledì 9 febbraio 2011 at 12.10, Gareth McCumskey wrote: The problem is session write locking. We had the same issue in symfony 1. I don't know how to do this for symfony 2 but I wrote a blog post to deal with it in symfony 1. Perhaps you can just convert this for use with symfony 2: http://garethmccumskey.blogspot.com/2009/10/php-session-write-locking-and-how-to.html On Wed, Feb 9, 2011 at 1:07 PM, Gabriele Genta gabriele.ge...@gmail.com wrote: Hello, I'm trying to implement long polling in a Synfony 2 project to shorten response times in a real-time application I'm making. Essentially I have an ajax front end that requests data to the symfony-driven backend through XHR. My problem arises when I try to send a second request to the backend while a first one is on hang for long polling; the second request just get queued after the first, and doesn't get processed until the first returns. I've googled a bit about the problem and found out that it could depend on session files being locked (see here: http://stackoverflow.com/questions/1430883/simultaneous-requests-to-php-script) during requests, but getting rid of session files didn't help (my backend is completely stateless, so it doesn't need sessions at all actually). Has anyone come across this problems before? I think the problem might have to do with symfony and caching (setting locks on cache files during requests, maybe?), but I don't know enough of the guts of symfony itself to find a solution or a workaround.. Thanks a lot! Gabriele Genta -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Re: Long Polling
I figured it was something server related either session (which we determined was the case) or the actual web server configuration (as was the case) as any framework that doesn't allow concurrent requests would be essentially useless. Imagine developing an application only one user at a time could use . On 09/02/2011 23:23, Gabriele Genta wrote: I finally pointed out the problem, and it has nothing to do with symfony, nor the server configuration. The problem was on the client side of the application: I'm developing it with Sproutcore, and using their development server (sc-server) to test it; unfortunately, sc-server does not support concurrent requests. So I'll have to fall back to a good old standard polling mechanism until they fix the issue (and hoping that they would). Thanks Gareth for your help, really appreciate it. By the way, this gave me a good knowledge of session file locking problems and solutions, which could be handy in future :) Gabriele On mercoledì 9 febbraio 2011 at 19.35, Gareth McCumskey wrote: Well, in that case, have you verified that your web server is configured correctly? Is it perhaps set to only allow one process or connection at a time which would cause your queuing problem? Typically Apache should be able to handle very many child processes but often this setting can mistakenly be altered thinking its a load saving technique. On 09/02/2011 15:46, Gabriele Genta wrote: Ok then, following your advice I found a more canonical way of handling the problem without forcing the framework. To do so I configured symfony so that a session is not started automatically and I've also told it to use the ArraySessionStorage in place of the native one. As a result, now the application never calls the php functions for session handling (session_*), and no session file/record is created at all when the backend is invoked. Nevertheless the problem is still occuring, so at this stage I think it isn't related to session locks at all. Thanks, Gabriele On mercoledì 9 febbraio 2011 at 14.13, Gareth McCumskey wrote: With symfony 1 you cannot use session_write_close reliably. There is a specific symfony function you call on the sfUser object to actualy have it close properly ;) Thats why I linked my blog post to help with that info. On Wed, Feb 9, 2011 at 3:04 PM, Gabriele Genta gabriele.ge...@gmail.com wrote: Thanks Garreth for your response. As I pointed out in my original post, though, I already tried the fixes regarding session files locking by calling session_write_close() and also by discarding session saving at all, by doing something like this: function foo() {} session_set_save_handler(foo, foo, foo, foo, foo, foo); Anyway, none of them worked, there's still something preventing the requests from running. Thanks anyway, Gabriele On mercoledì 9 febbraio 2011 at 12.10, Gareth McCumskey wrote: The problem is session write locking. We had the same issue in symfony 1. I don't know how to do this for symfony 2 but I wrote a blog post to deal with it in symfony 1. Perhaps you can just convert this for use with symfony 2: http://garethmccumskey.blogspot.com/2009/10/php-session-write-locking-and-how-to.html On Wed, Feb 9, 2011 at 1:07 PM, Gabriele Genta gabriele.ge...@gmail.com wrote: Hello, I'm trying to implement long polling in a Synfony 2 project to shorten response times in a real-time application I'm making. Essentially I have an ajax front end that requests data to the symfony-driven backend through XHR. My problem arises when I try to send a second request to the backend while a first one is on hang for long polling; the second request just get queued after the first, and doesn't get processed until the first returns. I've googled a bit about the problem and found out that it could depend on session files being locked (see here: http://stackoverflow.com/questions/1430883/simultaneous-requests-to-php-script) during requests, but getting rid of session files didn't help (my backend is completely stateless, so it doesn't need sessions at all actually). Has anyone come across this problems before? I think the problem might have to do with symfony and caching
Re: [symfony-users] Re: Use compenents from symfony 2.0 in symfony 1.4
After all this what have we come back to. For now, temporarily, get some more hardware. What will this do for you? Buy you some time so that you can go through your application logic and try to optimise. If routing was 30% of the performance bottle-neck then go look at that other 70% even. You may not have a lot of business logic in your models but you can still create enormous inefficiencies with one or two methods. Maybe go look through your controller methods (actions.class.php) and interrogate the calls you make to your model. Are all your for loops really running efficiently? Can you switch out model methods that perform object hydration for ones that return pure resultsets instead? I am not providing you a checklist here. These are purely EXAMPLES. Go back to that 70% you seem to have ignored and look through what makes that up. And you know what? At some point you are going to have just decide that the app is about as efficient as its going to get and spending more dev time for micro incremental improvements in performance is a good way to waste time and money and you may need to look at the whole stack of hardware/software you currently use and try to find more efficiencies there. Its not always about the application you are developing. For example: 1. Is my memory getting constantly maxed out and I am being diverted to swap? Buy more physical memory. 2. Are the CPU cores on my server always hitting 100% load? Seperate the web server and database server onto two seperate machines. 3. Is my database server CPU cores hitting 100% all the time? Use memory cache mechanisms to reduce load and consider setting up a slave database server that you can use for all reads. 4. Is my web server's CPU cores hitting 100% max? Split out the static content onto another server (you can even do this quickly and cheaply with an Amazon S3 instance, Linode, Rackspace, etc). 5. Are my disks being used too much? Increase the amount of RAM and have more apps run in memory. Also, consider different RAID strategies to increase throughput and even the disks architecture themselves (SATA vs SAN etc). 6. Am I using Windows Server with IIS? Format and install a Linux distro :P On 09/02/2011 23:10, Alex Pilon wrote: Symfony 2 was rebuilt from. It is not architected the same way as symfony 1 at all. If you are going to put in the effort to hack symfony 2 components into symfony 1 you might as well just rebuild the application in symfony 2. Now if you are going to say that symfony 2 is not ready for production and you cant have any risks, then you should reconsider what you are trying to do.. which is take a risk by hacking to disparate system together. You would probably be wiser to find out what is slow in the routing framework and put your effort towards fixing that for your particular case. On Wed, Feb 9, 2011 at 15:56, Yelena Bunina yelena...@gmail.com mailto:yelena...@gmail.com wrote: Hi all! Thanx a lot for your attention. You are right - In our project we use nginx and its cache. Also we use mysql cache queries and put mysql full into the memory, we use APC to cache php code, we don't use Doctrine when there is no much business logic (in tasks) to make performance better. Also we use nginx as load balancer. But backend is still apache. So we need to optimize everything we can. So I don't waste time trying to build in symfony 2 routing into project. I wanted to ask experts if it can be done with some instructions. I see that there is no way to do it, so I won't. But may be Fabien know how to do it? :) BTW Symfony 2 is not for production projects yet so we can't have any risks with it. On Wed, Feb 9, 2011 at 9:20 PM, Gareth McCumskey gmccums...@gmail.com mailto:gmccums...@gmail.com wrote: Well heelll.. I been saying that all day. Maybe not as clearly but that is in essence what I have been trying to point out. Developer time by the hour, especially since you don't really have any idea how long that integration could take, it could be a couple hours or a couple weeks, vs ANY OTHER solution, even temporary, that can fix the problem in a shorter time with known results. I'd rather take the quick, cheap fix with proven results (buying hardware, quick and dirty user memory cache for database queries at the model level, etc) than the unknown timescale, unknown cost with unproven results (trying to force a single library of one application to replace a similar library in another without sharing the same base). And then run the risk of things coming to bite you in the ass later. In fact, I'd go one step further. It would be a better use of your time and energy to port the ENTIRE symfony 1.4 application into a Symfony 2.0 application. You will have better consistency
Re: [symfony-users] Fwd: problem with doctrine:build dsn
Do you have the php-pdo driver for mysql installed? I am not sure how this is done on Windows but it seems as if that is your problem. If you are unsure, create a single php script with the following: ?php phpinfo(); ? and run that in your browser. It will give you information about what has been installed for your php application and see if you can find any info on mysqli. On Tue, Feb 8, 2011 at 5:29 PM, Gab's mail lists gabinby...@gmail.comwrote: Hi, I'm on windows 7 with xampp, and SF 1.4.8 I've configured my db in databases.yml like this: all: doctrine: class: sfDoctrineDatabase param: dsn:'mysql://root:root@localhost/mydb' mydb exists in mysql. When I do : symfony doctrine:build --db I get : Unknown driver dsn Any idea or workaround? 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 -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc identi.ca: @garethmcc -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en