[symfony-users] clear form after post
hi, i try clear my form after post with jq_submit_to_remote, i try with this line 'complete' => jq_visual_effect('fadeOut', '#indicator'). "$('#contact_form').resetForm()", but dont work , dont clear or reset the input fields. 'eventocomentario/create', 'update' => 'comentario_evento', 'loading' => jq_visual_effect('fadeIn', '#indicator'), 'complete' => jq_visual_effect('fadeOut', '#indicator'). "$('#contact_form').resetForm()", )) ?> -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Doctrine Batch procesing
This is ridiculous. You mean Doctrine has no resultset function? Using Propel you normally build your criteria for a query and then run a doSelect call which returns your hydrated array. BUT. There is a more memory efficient call (doSelectRS for Propel 1.2 and doSelectStmt for Propel 1.3 and above) that essentially returns the resultset that you can while loop through to get your data. Using these calls we have been able to load up the results of 100's of thousands of rows from our DB at a time with minimal memory usage. Take a look at the doctrine documentation. There must be something! On Tue, Nov 16, 2010 at 10:56 PM, Luciano A. Andrade < andrade.luci...@gmail.com> wrote: > Thanks Daniel for the response, i am using PHP 5.3.2-1ubuntu4.5 with > Suhosin-Patch (cli) (built: Sep 17 2010 13:41:55), read some bug > reports related to circula reference and the garbage colector, but > they suld be fixed for 5.3. > > OnDemand hydration did't help, i am currently doing it, i am procesing > batches of 100 objects inside a method and i can currently hold the > objects but i only can call this method about 18 times until it run > out of memory. > > Incresing memory of the server may be a valid option but is not > sustentable, so i like to try other options. > > gc_collect_cycles may help a little but didn't change the situation. > > The only options is to implement a Fork/Subtask (Following the sample > provided by Rich). > > It's a shame since i could do this on propel with any problem :(. > > 2010/11/16 Daniel Lohse : > > That's unfortunate because you really have few options — I know because > I've been there just this week. > > > > So, array hydration is out of the question, fine, let's see what other > options you have: > > > > 1. Increase memory of the server (sorry, but it's one option) > > > > 2. Use the latest PHP 5.3.x and try to call "gc_collect_cycles();" after > each iteration — this will slow down your script some but could help. > Unfortunately, while garbage collection has certainly improved with PHP 5.3, > you can't rely on this because PHP is not forced to garbage collect and > sometimes can't; tricky stuff. > > > > 3. Fork another process after, say, 1000 objects. Each PHP process has > its own memory limit. I know of one project that uses this — you'll have to > go look for it, though. The update-search-index task of the Apostrophe CMS > is using this technique to work around this problem, you can find the source > on svn.apostrophenow.org. Sorry for not being more specific. :( > > > > 4. Only process a given amount of objects per call and work your way > through the queue, flagging objects you've finished processing along the > way. > > > > 5. Try to use the OnDemand object hydrator and see if that helps. > > > > If you already tried all options I listed above (and failed ;-)), you'll > need to tell us more about the process, about why they don't/won't work — > maybe we can then come up with a solution. > > > > > > I feel your pain, cheers, Daniel > > > > Sent from my iPad > > > > On Nov 16, 2010, at 8:48 PM, "Luciano A. Andrade" < > andrade.luci...@gmail.com> wrote: > > > >> I am tyring to make a batch processing for synchronization of two > >> databases, and i am running on limitation of the memory usage. I like > >> to be able to process 3 objects, i can't use arrays for the > >> hydration, since i have some logic i need to execute. I only need one > >> of this object at any time, but it looks like theres no way to > >> liberate the used objects, so memory usage grow rapidly. Any one has > >> be able to free some memory, i am using > >> $object->free(true); > >> unset($object); > >> > >> so i run out of ideas. Any one? > >> > >> -- > >> If you want to report a vulnerability issue on symfony, please send it > to security at symfony-project.com > >> > >> You received this message because you are subscribed to the Google > >> Groups "symfony users" group. > >> To post to this group, send email to symfony-users@googlegroups.com > >> To unsubscribe from this group, 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@googleg
[symfony-users] Task with DB access
When there is access to external systems, using a task that I want to log SymfonyDB access. When I execute "There is no open connection" that would have errors. What did you do wrong? > $databaseManager = new sfDatabaseManager($this->configuration); > $connection = $databaseManager->getDatabase('links')- >getConnection(); I tried to add code. But still error occurs. 「 Database "links" does not exist.」 "links" is correct DB name. C:\MyProject\link>php symfony link:access user01 111.111.111.111 #accessTask.class.php namespace = 'link'; $this->name = 'access'; $this->addArgument('username', sfCommandArgument::OPTIONAL); $this->addArgument('ip', sfCommandArgument::OPTIONAL); } public function execute($arguments = array(), $options = array()) { $access = new Accesslog(); $access->setUsername($arguments['username']); $access->setIp($arguments['ip']); $access->save(); $this->log('access from '. $arguments['ip']); } } -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Doctrine Batch procesing
Thanks Daniel for the response, i am using PHP 5.3.2-1ubuntu4.5 with Suhosin-Patch (cli) (built: Sep 17 2010 13:41:55), read some bug reports related to circula reference and the garbage colector, but they suld be fixed for 5.3. OnDemand hydration did't help, i am currently doing it, i am procesing batches of 100 objects inside a method and i can currently hold the objects but i only can call this method about 18 times until it run out of memory. Incresing memory of the server may be a valid option but is not sustentable, so i like to try other options. gc_collect_cycles may help a little but didn't change the situation. The only options is to implement a Fork/Subtask (Following the sample provided by Rich). It's a shame since i could do this on propel with any problem :(. 2010/11/16 Daniel Lohse : > That's unfortunate because you really have few options — I know because I've > been there just this week. > > So, array hydration is out of the question, fine, let's see what other > options you have: > > 1. Increase memory of the server (sorry, but it's one option) > > 2. Use the latest PHP 5.3.x and try to call "gc_collect_cycles();" after each > iteration — this will slow down your script some but could help. > Unfortunately, while garbage collection has certainly improved with PHP 5.3, > you can't rely on this because PHP is not forced to garbage collect and > sometimes can't; tricky stuff. > > 3. Fork another process after, say, 1000 objects. Each PHP process has its > own memory limit. I know of one project that uses this — you'll have to go > look for it, though. The update-search-index task of the Apostrophe CMS is > using this technique to work around this problem, you can find the source on > svn.apostrophenow.org. Sorry for not being more specific. :( > > 4. Only process a given amount of objects per call and work your way through > the queue, flagging objects you've finished processing along the way. > > 5. Try to use the OnDemand object hydrator and see if that helps. > > If you already tried all options I listed above (and failed ;-)), you'll need > to tell us more about the process, about why they don't/won't work — maybe we > can then come up with a solution. > > > I feel your pain, cheers, Daniel > > Sent from my iPad > > On Nov 16, 2010, at 8:48 PM, "Luciano A. Andrade" > wrote: > >> I am tyring to make a batch processing for synchronization of two >> databases, and i am running on limitation of the memory usage. I like >> to be able to process 3 objects, i can't use arrays for the >> hydration, since i have some logic i need to execute. I only need one >> of this object at any time, but it looks like theres no way to >> liberate the used objects, so memory usage grow rapidly. Any one has >> be able to free some memory, i am using >> $object->free(true); >> unset($object); >> >> so i run out of ideas. Any one? >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Doctrine Batch procesing
I've been there too :-) I've accomplished #3/#4 below by having a parent task which is what's run as your cronjob/batch process. This parent task then spawns subtasks which actually do the work, using some flag/indicator/PK lookup to determine which records to process. So you could do something like the following: * Parent task finds 1000 records out of 300,000 and records their primary key details in a table. * Parent task spawns subtask * Subtask reads the primary key details from same table; if any exist then process them accordingly * Subtask returns * Parent task empties table, and repeats the above process for each set of records. Something like the following in your task's execute() method: passthru( sprintf('%s %s/symfony myapp:subtask-name --env=%s', sfToolkit::getPhpCli(), sfConfig::get('sf_root_dir'), $options["env"]), $returnVar ); if ($returnVar !== 0) { $this->logSection("myapp", "Error occurred during subtask", null, "ERROR"); } This has the effect of limiting the number of objects you're holding in memory at any one time. Of course the rest of the below apply as well - unset(), $doctrineObjects->free() and so on. Cheers, Rich On Tue, Nov 16, 2010 at 8:13 PM, Daniel Lohse wrote: > That's unfortunate because you really have few options — I know because > I've been there just this week. > > So, array hydration is out of the question, fine, let's see what other > options you have: > > 1. Increase memory of the server (sorry, but it's one option) > > 2. Use the latest PHP 5.3.x and try to call "gc_collect_cycles();" after > each iteration — this will slow down your script some but could help. > Unfortunately, while garbage collection has certainly improved with PHP 5.3, > you can't rely on this because PHP is not forced to garbage collect and > sometimes can't; tricky stuff. > > 3. Fork another process after, say, 1000 objects. Each PHP process has its > own memory limit. I know of one project that uses this — you'll have to go > look for it, though. The update-search-index task of the Apostrophe CMS is > using this technique to work around this problem, you can find the source on > svn.apostrophenow.org. Sorry for not being more specific. :( > > 4. Only process a given amount of objects per call and work your way > through the queue, flagging objects you've finished processing along the > way. > > 5. Try to use the OnDemand object hydrator and see if that helps. > > If you already tried all options I listed above (and failed ;-)), you'll > need to tell us more about the process, about why they don't/won't work — > maybe we can then come up with a solution. > > > I feel your pain, cheers, Daniel > > Sent from my iPad > > On Nov 16, 2010, at 8:48 PM, "Luciano A. Andrade" < > andrade.luci...@gmail.com> wrote: > > > I am tyring to make a batch processing for synchronization of two > > databases, and i am running on limitation of the memory usage. I like > > to be able to process 3 objects, i can't use arrays for the > > hydration, since i have some logic i need to execute. I only need one > > of this object at any time, but it looks like theres no way to > > liberate the used objects, so memory usage grow rapidly. Any one has > > be able to free some memory, i am using > > $object->free(true); > > unset($object); > > > > so i run out of ideas. Any one? > > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to symfony-users@googlegroups.com > > To unsubscribe from this group, 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 > -- Rich Sage York, UK rich.s...@gmail.com -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Doctrine Batch procesing
That's unfortunate because you really have few options — I know because I've been there just this week. So, array hydration is out of the question, fine, let's see what other options you have: 1. Increase memory of the server (sorry, but it's one option) 2. Use the latest PHP 5.3.x and try to call "gc_collect_cycles();" after each iteration — this will slow down your script some but could help. Unfortunately, while garbage collection has certainly improved with PHP 5.3, you can't rely on this because PHP is not forced to garbage collect and sometimes can't; tricky stuff. 3. Fork another process after, say, 1000 objects. Each PHP process has its own memory limit. I know of one project that uses this — you'll have to go look for it, though. The update-search-index task of the Apostrophe CMS is using this technique to work around this problem, you can find the source on svn.apostrophenow.org. Sorry for not being more specific. :( 4. Only process a given amount of objects per call and work your way through the queue, flagging objects you've finished processing along the way. 5. Try to use the OnDemand object hydrator and see if that helps. If you already tried all options I listed above (and failed ;-)), you'll need to tell us more about the process, about why they don't/won't work — maybe we can then come up with a solution. I feel your pain, cheers, Daniel Sent from my iPad On Nov 16, 2010, at 8:48 PM, "Luciano A. Andrade" wrote: > I am tyring to make a batch processing for synchronization of two > databases, and i am running on limitation of the memory usage. I like > to be able to process 3 objects, i can't use arrays for the > hydration, since i have some logic i need to execute. I only need one > of this object at any time, but it looks like theres no way to > liberate the used objects, so memory usage grow rapidly. Any one has > be able to free some memory, i am using > $object->free(true); > unset($object); > > so i run out of ideas. Any one? > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, 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] Doctrine Batch procesing
I don't know doctrine very well, but with propel you can a function to return a resultset instead of an array of objects. My suggestion is go take a look at the Doctrine documentation on the Doctrine site for more info. On 16 Nov 2010 9:48 PM, "Luciano A. Andrade" wrote: I am tyring to make a batch processing for synchronization of two databases, and i am running on limitation of the memory usage. I like to be able to process 3 objects, i can't use arrays for the hydration, since i have some logic i need to execute. I only need one of this object at any time, but it looks like theres no way to liberate the used objects, so memory usage grow rapidly. Any one has be able to free some memory, i am using $object->free(true); unset($object); so i run out of ideas. Any one? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Doctrine Batch procesing
I am tyring to make a batch processing for synchronization of two databases, and i am running on limitation of the memory usage. I like to be able to process 3 objects, i can't use arrays for the hydration, since i have some logic i need to execute. I only need one of this object at any time, but it looks like theres no way to liberate the used objects, so memory usage grow rapidly. Any one has be able to free some memory, i am using $object->free(true); unset($object); so i run out of ideas. Any one? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Performances issues
On Nov 16, 7:17 pm, Remi wrote: > -> we don't use any .htaccess file : everything goes directly to an > "httpd.conf" = Also have AllowOverride none in apache config to not search for .htaccess files. > -> we don't use ORM since we don't use databases : only Webservices = Make sure you disable database functionality in the settings.yml http://www.symfony-project.org/reference/1_4/en/04-Settings#chapter_04_sub_use_database > -> how can I be sure that APC is well configured ? Do I have a way to > easily check if APC is working well ? = APC stats are available in browser via some web pages generate by APC itself. The configuration key to change the max php file size within APC: http://www.php.net/manual/en/apc.configuration.php#ini.apc.max-file-size by default is set to 1 M. Check in the cache dir if you have php files larger than 1M find . -type f -size +1000k If you have change the value of this key to something larger. Make sure you restart Apache after making the changes. > -> from what I heard, memcache and APC are not such different one from > another in term of performances. Was it a crapy advice ? We are > already using APC for the few objects we can store on cache. The two are different in the way they store the cache, where APC uses local SHM cache, Memcache uses a centralized model with a single server holding the cache. When using multiple machines having a single centralized cache (may) make more sense. > -> I thought that Symfony 2 was absolutly not ready for production > environment ? Can we expect a huge performance increase (or decrease > depending the side you are :) ) ? There are crazy people already using it for production, the trick is to use the stable parts of it :), and from what I understood you don't need the components that are not yet complete. According to the benchmarks published by Fabien it is faster than 1.4.x http://symfony-reloaded.org/fast Do you use the routing component, that's one of the slowest when it comes to processing? My suggestion for you is to establish some baseline measurements to see where you are, what's the best performance that you can achieve: a. measure how many requests can you do when requesting a static web page b. measure the overhead of php processing - have that page served by PHP (echo a template with symfony and separately by plain php) This way you can see if the overhead is with PHP, symfony or both. Realistically speaking a framework has quite an overhead compared to plain PHP so you can never achive the raw PHP speed with it. I remember reading somewhere about a presentation at the London Symfony Meetup on how to scale Symfony to process thousand requests per second, I don't remember the details, maybe some other member in this group can share more info about this. gabriel -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Multiple "CREATE TABLE" when generating SQL from a Doctrine model using Inheritance
Below are two schemas, these are simplified schemas where the problem occurs consistently: In summary: - Schema1: Class "Entity" is a base entity, "ChildA" & "ChildB" extend "Entity", and there's a One to Many relation between "ChildB" and "Other" (Other has many ChildB). - Schema2: Class "Entity" is a base entity, "ChildA" & "ChildB" extend "Entity" Schema1: detect_relations: false Entity: columns: column_x: { type: string(255) } ChildA: inheritance: { extends: Entity, type: column_aggregation, keyField: type, keyValue: 1 } columns: column_a: { type: string(255) } ChildB: inheritance: { extends: Entity, type: column_aggregation, keyField: type, keyValue: 2 } columns: column_b: { type: string(255) } other_id: { type: integer, notnull: true } relations: other: { class: Other, local: other_id, foreign: id, foreignType: many, type: one } Other: columns: column_y: { type: string(255) } Generated SQL: # CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x` VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b` VARCHAR(255), `other_id` BIGINT NOT NULL, PRIMARY KEY(`id`)) ENGINE = INNODB; CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x` VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b` VARCHAR(255), `other_id` BIGINT NOT NULL, INDEX `other_id_idx` (`other_id`), PRIMARY KEY(`id`)) ENGINE = INNODB; CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x` VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b` VARCHAR(255), `other_id` BIGINT NOT NULL, INDEX `tbl_entity_type_idx` (`type`), PRIMARY KEY(`id`)) ENGINE = INNODB; CREATE TABLE `tbl_other` (`id` BIGINT AUTO_INCREMENT, `column_y` VARCHAR(255), PRIMARY KEY(`id`)) ENGINE = INNODB; ALTER TABLE `tbl_entity` ADD CONSTRAINT `tbl_entity_other_id_tbl_other_id` FOREIGN KEY (`other_id`) REFERENCES `tbl_other`(`id`); you'll find that tbl_entity has 3 "CREATE TABLE" statements. A simpler example goes as follows: Schema2: detect_relations: false Entity: columns: column_x: { type: string(255) } ChildA: inheritance: { extends: Entity, type: column_aggregation, keyField: type, keyValue: 1 } columns: column_a: { type: string(255) } ChildB: inheritance: { extends: Entity, type: column_aggregation, keyField: type, keyValue: 2 } columns: column_b: { type: string(255) } Generated SQL: # CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x` VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b` VARCHAR(255), PRIMARY KEY(`id`)) ENGINE = INNODB; CREATE TABLE `tbl_entity` (`id` BIGINT AUTO_INCREMENT, `column_x` VARCHAR(255), `type` VARCHAR(255), `column_a` VARCHAR(255), `column_b` VARCHAR(255), INDEX `tbl_entity_type_idx` (`type`), PRIMARY KEY(`id`)) ENGINE = INNODB; you'll find that tbl_entity has 2 "CREATE TABLE" statements. On Nov 16, 1:19 pm, Alexandre Salomé wrote: > Could you show us your schema ? Can be because of a misconfigured schema. > > 2010/11/15 Hany El-Kerdany > > > > > > > > > > > Dear All, > > > I'm using inheritance in my Doctrine model (column_aggregation). > > When I generate the SQL from Models (using symfony's doctrine:generate > > --all), I find that there's a redundant CREATE TABLE statement (all for the > > same table, since I'm using column_aggregation).. > > This seems like a bug to me, and running the generated SQL on a MySQL > > client like (Query Analyzer) generates an error when attempting to run the > > second CREATE TABLE statement. > > > Is there a workaround for this? Should I perhaps create the SQL myself? > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com > legroups.com> > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en > > -- > Alexandre Saloméhttp://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: sfGuardUserProfile doesn't work? :-(
Very good!! To work properly. Thank you! On Nov 16, 8:52 pm, Daniel Lohse wrote: > You'll also need to select "s.id" like the error message says: "The root > class of the query (alias s) must have at least one field selected." – but > you also might need to select "p.id", too. > > Does that help? > > Cheers, Daniel > > On 16.11.2010, at 09:59, man mixi wrote: > > > > > Hi, experts. > > I set up a simple relationship using sfGuardUserProfile. > > But it does not work properly. > > > Remove 'p.name' from select method, In this case it works. > > Why? > > I do not understand the meaning of the error message. > > > Please help me. > > > --- > > > ERROR MESSAGE > >> 500 | Internal Server Error | Doctrine_Query_Exception > >> The root class of the query (alias s) must have at least one field > >> selected. > > > #action.php > > > $this->saless = Doctrine_Query::create() > > ->select('s.user_id as userid,p.name, sum(s.amount) as amount') > > ->from('Sales s') > > // ->where('s.created_at between ? and ?',array($start,$end)) > > ->leftJoin('s.Profile p') > > ->groupBy('userid') > > ->execute(); > > > #schema.yml > > Sales: > > tableName: sales > > actAs: { Timestampable: ~ } > > columns: > > user_id: > > type: integer > > amount: integer > > relations: > > User: > > class: sfGuardUser > > foreign: id > > local: use_id > > type: many > > onDelete: cascade > > foreignType: many > > foreignAlias: Sales > > Profile: > > class: sfGuardUserProfile > > foreign: user_id > > local: user_id > > type: many > > onDelete: cascade > > foreignType: many > > foreignAlias: Sales > > > sfGuardUserProfile: > > tableName: sf_guard_user_profile > > actAs: { Timestampable: ~ } > > columns: > > id: integer > > user_id: > > type: integer > > primary: true > > name: varchar(50) > > relations: > > User: > > class: sfGuardUser > > foreign: id > > local: user_id > > type: one > > onDelete: cascade > > foreignType: one > > foreignAlias: Profile > > > -- > > If you want to report a vulnerability issue on symfony, please send it to > > security at symfony-project.com > > > You received this message because you are subscribed to the Google > > Groups "symfony users" group. > > To post to this group, send email to symfony-users@googlegroups.com > > To unsubscribe from this group, send email to > > symfony-users+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/symfony-users?hl=en- Hide quoted text - > > - Show quoted text - -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Performances issues
Apc settings : http://www.php.net/manual/en/apc.configuration.php#ini.apc.stat Then you should install xhprof to find the bottleneck. On Tue, Nov 16, 2010 at 6:17 PM, Remi wrote: > -> we don't use any .htaccess file : everything goes directly to an > "httpd.conf" > -> we don't use ORM since we don't use databases : only Webservices > -> how can I be sure that APC is well configured ? Do I have a way to > easily check if APC is working well ? > -> from what I heard, memcache and APC are not such different one from > another in term of performances. Was it a crapy advice ? We are > already using APC for the few objects we can store on cache. > -> I thought that Symfony 2 was absolutly not ready for production > environment ? Can we expect a huge performance increase (or decrease > depending the side you are :) ) ? > > On Nov 16, 4:56 pm, pghoratiu wrote: > > Some other suggestions: > > - avoid .htaccess - move rewrite rules in the Apache configuration. > > - avoid the ORM - if you do access the database use plain SQL to > > manipulate the data. > > - make sure APC is configured correctly (so that it caches large PHP > > files, such as the ones generated by the routing). > > - try memcache for data frequently accessed > > - move to symfony2 - if the framework is only a shim layer over the > > actual data source you could use symfony2 > > > > gabriel > > > > On Nov 16, 11:36 am, Remi wrote: > > > > > Hi, > > > > > I'm working on a Symfony project for the past 11 months. The project > > > is basically to throw away the old FrontEnd of a well-known shopping > > > comparator, written in java and to replace it with a brand new > > > frontend written in PHP with a Service Oriented Architecture (SOA). > > > Our high-level architecture is to have a light-weighted frontend in > > > PHP (using Symfony 1.4) and a WebService Aggregator written in Java > > > (Jersey framework) to ensure all call to underlined webservices are > > > done in parallal. This aggregator is extremly performant : it handles > > > more than 200 Queries Per Second (QPS). > > > > > Our main issue is more about the PHP frontend. Despite all our > > > efforts, we can't handle more than 15 QPS on each server. Just to give > > > you an idea, here are a few key informations about our achitecture : > > > > > * 6 Servers with 4 physical cores (8 with HyperThreading enabled) > > > and 24GB of RAM > > > * Using Symfony 1.4.1 with PHP 5.2.10 > > > * No database access : all datas are fetched using WebServices > > > * Centos 5.4 Final 64 bits > > > * Apache 2.2.3 > > > * APC cache enabled > > > * using SimpleXml to read XML feeds (300 nodes tops) coming from > > > our WebServices > > > * using mod_php > > > * PHP memory limit is set to 128M in our production servers (we > > > noticed lots of performances issues with only 32M or even 64M) > > > > > Our FrontEnd does not handle complex algorithm. Basically, it get its > > > data from some High Performances webservices (all internal), read the > > > request, render the page and log some usefull data (access logs using > > > Apache and some custom logs for our business). Everything is monitored > > > closely and the bottleneck seems to come from CPU usage which reach > > > 100% pretty often. > > > We tried a few things : > > > > > * Using Apache FastCGI (quite complicated on Centos5.4 since we > > > have to re-compile it) : slight increase but is not worth all the > > > trouble it causes on our company architecture. Nevertheless, it seems > > > that we did some configuration mistakes and we need to bench it again. > > > * Caching a few modules : header, footer, ads, ... > > > * Replacing Apache by NGix : no change at all > > > > > For the moment, our average server time exceed 1 second which is > > > really bad compared to our old Java-based website (300-400 ms) and we > > > didn't have rollouted all supported pages or even all our countries > > > (we expect to double the number of connection by activating all > > > remaining countries). > > > Do you have any idea on how we could increase our performances ? Do we > > > need to directly contact SensioLabs to negociate some contractor time > > > (maybe a Symfony Guru ?) ? > > > Do you know some tools that can help us to profile our application in > > > production environment ? We've already tried XDebug on developer > > > workstations but we don't have the same exact behavior in production. > > > What I'd like to test is to (manually) instrumentate our source code > > > to add some timers around some potentially costly algorithms. So you > > > know any tool that could help us to do that ? > > > > > I already have created a topic on Symfony forum : > http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p... > > > > > 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 subsc
[symfony-users] Re: Performances issues
-> we don't use any .htaccess file : everything goes directly to an "httpd.conf" -> we don't use ORM since we don't use databases : only Webservices -> how can I be sure that APC is well configured ? Do I have a way to easily check if APC is working well ? -> from what I heard, memcache and APC are not such different one from another in term of performances. Was it a crapy advice ? We are already using APC for the few objects we can store on cache. -> I thought that Symfony 2 was absolutly not ready for production environment ? Can we expect a huge performance increase (or decrease depending the side you are :) ) ? On Nov 16, 4:56 pm, pghoratiu wrote: > Some other suggestions: > - avoid .htaccess - move rewrite rules in the Apache configuration. > - avoid the ORM - if you do access the database use plain SQL to > manipulate the data. > - make sure APC is configured correctly (so that it caches large PHP > files, such as the ones generated by the routing). > - try memcache for data frequently accessed > - move to symfony2 - if the framework is only a shim layer over the > actual data source you could use symfony2 > > gabriel > > On Nov 16, 11:36 am, Remi wrote: > > > Hi, > > > I'm working on a Symfony project for the past 11 months. The project > > is basically to throw away the old FrontEnd of a well-known shopping > > comparator, written in java and to replace it with a brand new > > frontend written in PHP with a Service Oriented Architecture (SOA). > > Our high-level architecture is to have a light-weighted frontend in > > PHP (using Symfony 1.4) and a WebService Aggregator written in Java > > (Jersey framework) to ensure all call to underlined webservices are > > done in parallal. This aggregator is extremly performant : it handles > > more than 200 Queries Per Second (QPS). > > > Our main issue is more about the PHP frontend. Despite all our > > efforts, we can't handle more than 15 QPS on each server. Just to give > > you an idea, here are a few key informations about our achitecture : > > > * 6 Servers with 4 physical cores (8 with HyperThreading enabled) > > and 24GB of RAM > > * Using Symfony 1.4.1 with PHP 5.2.10 > > * No database access : all datas are fetched using WebServices > > * Centos 5.4 Final 64 bits > > * Apache 2.2.3 > > * APC cache enabled > > * using SimpleXml to read XML feeds (300 nodes tops) coming from > > our WebServices > > * using mod_php > > * PHP memory limit is set to 128M in our production servers (we > > noticed lots of performances issues with only 32M or even 64M) > > > Our FrontEnd does not handle complex algorithm. Basically, it get its > > data from some High Performances webservices (all internal), read the > > request, render the page and log some usefull data (access logs using > > Apache and some custom logs for our business). Everything is monitored > > closely and the bottleneck seems to come from CPU usage which reach > > 100% pretty often. > > We tried a few things : > > > * Using Apache FastCGI (quite complicated on Centos5.4 since we > > have to re-compile it) : slight increase but is not worth all the > > trouble it causes on our company architecture. Nevertheless, it seems > > that we did some configuration mistakes and we need to bench it again. > > * Caching a few modules : header, footer, ads, ... > > * Replacing Apache by NGix : no change at all > > > For the moment, our average server time exceed 1 second which is > > really bad compared to our old Java-based website (300-400 ms) and we > > didn't have rollouted all supported pages or even all our countries > > (we expect to double the number of connection by activating all > > remaining countries). > > Do you have any idea on how we could increase our performances ? Do we > > need to directly contact SensioLabs to negociate some contractor time > > (maybe a Symfony Guru ?) ? > > Do you know some tools that can help us to profile our application in > > production environment ? We've already tried XDebug on developer > > workstations but we don't have the same exact behavior in production. > > What I'd like to test is to (manually) instrumentate our source code > > to add some timers around some potentially costly algorithms. So you > > know any tool that could help us to do that ? > > > I already have created a topic on Symfony forum > > :http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p... > > > 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
[symfony-users] Re: Performances issues
-> we only use routing.yml to load our routes -> we don't use session (our old frontend was not session-less and it was a real pain in the ass !) -> we do as few io as possible : only to write a few logs (2 lines in one single file for each request) -> our source code is not mounted via NFS -> we've benched our XML reader classes and didn't find any issues with them (8ms to read up to 300 XML nodes and create all associated beans : it seems quite fair) I dind'nt understand what you meant with "don't stat file with APC". Can you be more specific please ? Thansk ! Rémi On Nov 16, 1:57 pm, Thomas Rabaix wrote: > Some points you might check : > > - don't use event to load routes > - don't stat file with apc > - don't put object into session > - avoid io > - check that your source code is not mounted via a nfs (like) share > - use a xml parser based on sax ( > http://fr2.php.net/manual/en/book.xml.php) > - install xhprof on your production servers. > > On Tue, Nov 16, 2010 at 12:25 PM, Alexandre Salomé < > > > > alexandre.sal...@gmail.com> wrote: > > Create a pre-production environment, secured to disallow web access and > > enable the debug bar. > > > symfony has some time-watching features in debug bar, it could give you > > some measures. > > > Check the symfony environment and your configuration files : maybe your > > "prod" environment is not really ready for production. > > > Also heard about XHProf for profiling : > >http://mirror.facebook.net/facebook/xhprof/doc.html > > > Give it a try, and give us feedback ;) > > > Alex' > > > 2010/11/16 Remi > > > Hi, > > >> I'm working on a Symfony project for the past 11 months. The project > >> is basically to throw away the old FrontEnd of a well-known shopping > >> comparator, written in java and to replace it with a brand new > >> frontend written in PHP with a Service Oriented Architecture (SOA). > >> Our high-level architecture is to have a light-weighted frontend in > >> PHP (using Symfony 1.4) and a WebService Aggregator written in Java > >> (Jersey framework) to ensure all call to underlined webservices are > >> done in parallal. This aggregator is extremly performant : it handles > >> more than 200 Queries Per Second (QPS). > > >> Our main issue is more about the PHP frontend. Despite all our > >> efforts, we can't handle more than 15 QPS on each server. Just to give > >> you an idea, here are a few key informations about our achitecture : > > >> * 6 Servers with 4 physical cores (8 with HyperThreading enabled) > >> and 24GB of RAM > >> * Using Symfony 1.4.1 with PHP 5.2.10 > >> * No database access : all datas are fetched using WebServices > >> * Centos 5.4 Final 64 bits > >> * Apache 2.2.3 > >> * APC cache enabled > >> * using SimpleXml to read XML feeds (300 nodes tops) coming from > >> our WebServices > >> * using mod_php > >> * PHP memory limit is set to 128M in our production servers (we > >> noticed lots of performances issues with only 32M or even 64M) > > >> Our FrontEnd does not handle complex algorithm. Basically, it get its > >> data from some High Performances webservices (all internal), read the > >> request, render the page and log some usefull data (access logs using > >> Apache and some custom logs for our business). Everything is monitored > >> closely and the bottleneck seems to come from CPU usage which reach > >> 100% pretty often. > >> We tried a few things : > > >> * Using Apache FastCGI (quite complicated on Centos5.4 since we > >> have to re-compile it) : slight increase but is not worth all the > >> trouble it causes on our company architecture. Nevertheless, it seems > >> that we did some configuration mistakes and we need to bench it again. > >> * Caching a few modules : header, footer, ads, ... > >> * Replacing Apache by NGix : no change at all > > >> For the moment, our average server time exceed 1 second which is > >> really bad compared to our old Java-based website (300-400 ms) and we > >> didn't have rollouted all supported pages or even all our countries > >> (we expect to double the number of connection by activating all > >> remaining countries). > >> Do you have any idea on how we could increase our performances ? Do we > >> need to directly contact SensioLabs to negociate some contractor time > >> (maybe a Symfony Guru ?) ? > >> Do you know some tools that can help us to profile our application in > >> production environment ? We've already tried XDebug on developer > >> workstations but we don't have the same exact behavior in production. > >> What I'd like to test is to (manually) instrumentate our source code > >> to add some timers around some potentially costly algorithms. So you > >> know any tool that could help us to do that ? > > >> I already have created a topic on Symfony forum : > > >>http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p... > > >> Thanks. > > >> -- > >> If you want to report a vulnerability issue on symfony,
[symfony-users] Re: Performances issues
Hi, we already tried to add timers (using sfTimerManager) on some key algorithms (routing, culture detection, tree recursive searches, ...) and we didn't find anything off the chart. It seems that everything is slower than we expected but not too much, pointing us to an algorithm issue. I will try XHProf as soon as I will have a few hours behind me but I'm not sure I'll find much more things compared to XDebug :( Thanks ! Rémi On Nov 16, 12:25 pm, Alexandre Salomé wrote: > Create a pre-production environment, secured to disallow web access and > enable the debug bar. > > symfony has some time-watching features in debug bar, it could give you some > measures. > > Check the symfony environment and your configuration files : maybe your > "prod" environment is not really ready for production. > > Also heard about XHProf for profiling > :http://mirror.facebook.net/facebook/xhprof/doc.html > > Give it a try, and give us feedback ;) > > Alex' > > 2010/11/16 Remi > > > > > Hi, > > > I'm working on a Symfony project for the past 11 months. The project > > is basically to throw away the old FrontEnd of a well-known shopping > > comparator, written in java and to replace it with a brand new > > frontend written in PHP with a Service Oriented Architecture (SOA). > > Our high-level architecture is to have a light-weighted frontend in > > PHP (using Symfony 1.4) and a WebService Aggregator written in Java > > (Jersey framework) to ensure all call to underlined webservices are > > done in parallal. This aggregator is extremly performant : it handles > > more than 200 Queries Per Second (QPS). > > > Our main issue is more about the PHP frontend. Despite all our > > efforts, we can't handle more than 15 QPS on each server. Just to give > > you an idea, here are a few key informations about our achitecture : > > > * 6 Servers with 4 physical cores (8 with HyperThreading enabled) > > and 24GB of RAM > > * Using Symfony 1.4.1 with PHP 5.2.10 > > * No database access : all datas are fetched using WebServices > > * Centos 5.4 Final 64 bits > > * Apache 2.2.3 > > * APC cache enabled > > * using SimpleXml to read XML feeds (300 nodes tops) coming from > > our WebServices > > * using mod_php > > * PHP memory limit is set to 128M in our production servers (we > > noticed lots of performances issues with only 32M or even 64M) > > > Our FrontEnd does not handle complex algorithm. Basically, it get its > > data from some High Performances webservices (all internal), read the > > request, render the page and log some usefull data (access logs using > > Apache and some custom logs for our business). Everything is monitored > > closely and the bottleneck seems to come from CPU usage which reach > > 100% pretty often. > > We tried a few things : > > > * Using Apache FastCGI (quite complicated on Centos5.4 since we > > have to re-compile it) : slight increase but is not worth all the > > trouble it causes on our company architecture. Nevertheless, it seems > > that we did some configuration mistakes and we need to bench it again. > > * Caching a few modules : header, footer, ads, ... > > * Replacing Apache by NGix : no change at all > > > For the moment, our average server time exceed 1 second which is > > really bad compared to our old Java-based website (300-400 ms) and we > > didn't have rollouted all supported pages or even all our countries > > (we expect to double the number of connection by activating all > > remaining countries). > > Do you have any idea on how we could increase our performances ? Do we > > need to directly contact SensioLabs to negociate some contractor time > > (maybe a Symfony Guru ?) ? > > Do you know some tools that can help us to profile our application in > > production environment ? We've already tried XDebug on developer > > workstations but we don't have the same exact behavior in production. > > What I'd like to test is to (manually) instrumentate our source code > > to add some timers around some potentially costly algorithms. So you > > know any tool that could help us to do that ? > > > I already have created a topic on Symfony forum : > >http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p... > > > 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 > > -- > Alexandre Saloméhttp://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users"
[symfony-users] Re: Performances issues
Some other suggestions: - avoid .htaccess - move rewrite rules in the Apache configuration. - avoid the ORM - if you do access the database use plain SQL to manipulate the data. - make sure APC is configured correctly (so that it caches large PHP files, such as the ones generated by the routing). - try memcache for data frequently accessed - move to symfony2 - if the framework is only a shim layer over the actual data source you could use symfony2 gabriel On Nov 16, 11:36 am, Remi wrote: > Hi, > > I'm working on a Symfony project for the past 11 months. The project > is basically to throw away the old FrontEnd of a well-known shopping > comparator, written in java and to replace it with a brand new > frontend written in PHP with a Service Oriented Architecture (SOA). > Our high-level architecture is to have a light-weighted frontend in > PHP (using Symfony 1.4) and a WebService Aggregator written in Java > (Jersey framework) to ensure all call to underlined webservices are > done in parallal. This aggregator is extremly performant : it handles > more than 200 Queries Per Second (QPS). > > Our main issue is more about the PHP frontend. Despite all our > efforts, we can't handle more than 15 QPS on each server. Just to give > you an idea, here are a few key informations about our achitecture : > > * 6 Servers with 4 physical cores (8 with HyperThreading enabled) > and 24GB of RAM > * Using Symfony 1.4.1 with PHP 5.2.10 > * No database access : all datas are fetched using WebServices > * Centos 5.4 Final 64 bits > * Apache 2.2.3 > * APC cache enabled > * using SimpleXml to read XML feeds (300 nodes tops) coming from > our WebServices > * using mod_php > * PHP memory limit is set to 128M in our production servers (we > noticed lots of performances issues with only 32M or even 64M) > > Our FrontEnd does not handle complex algorithm. Basically, it get its > data from some High Performances webservices (all internal), read the > request, render the page and log some usefull data (access logs using > Apache and some custom logs for our business). Everything is monitored > closely and the bottleneck seems to come from CPU usage which reach > 100% pretty often. > We tried a few things : > > * Using Apache FastCGI (quite complicated on Centos5.4 since we > have to re-compile it) : slight increase but is not worth all the > trouble it causes on our company architecture. Nevertheless, it seems > that we did some configuration mistakes and we need to bench it again. > * Caching a few modules : header, footer, ads, ... > * Replacing Apache by NGix : no change at all > > For the moment, our average server time exceed 1 second which is > really bad compared to our old Java-based website (300-400 ms) and we > didn't have rollouted all supported pages or even all our countries > (we expect to double the number of connection by activating all > remaining countries). > Do you have any idea on how we could increase our performances ? Do we > need to directly contact SensioLabs to negociate some contractor time > (maybe a Symfony Guru ?) ? > Do you know some tools that can help us to profile our application in > production environment ? We've already tried XDebug on developer > workstations but we don't have the same exact behavior in production. > What I'd like to test is to (manually) instrumentate our source code > to add some timers around some potentially costly algorithms. So you > know any tool that could help us to do that ? > > I already have created a topic on Symfony forum > :http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p... > > 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
[symfony-users] Re: Migrate full site
On 15 Nov, 14:54, matiasdig wrote: > Warning: sfCore::require(/home/elbuen/symfony/lib/symfony/log/ > sfLogger.class.php) [sfcore.require]: failed to open stream: No such > file or directory in /www/elbuengustoverduras/symfony/lib/symfony/util/ > sfCore.class.php on line 163 The error message is just telling you what is the problem and where it is. Check your paths. cheers Massimiliano -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Performances issues
Some points you might check : - don't use event to load routes - don't stat file with apc - don't put object into session - avoid io - check that your source code is not mounted via a nfs (like) share - use a xml parser based on sax ( http://fr2.php.net/manual/en/book.xml.php) - install xhprof on your production servers. On Tue, Nov 16, 2010 at 12:25 PM, Alexandre Salomé < alexandre.sal...@gmail.com> wrote: > Create a pre-production environment, secured to disallow web access and > enable the debug bar. > > symfony has some time-watching features in debug bar, it could give you > some measures. > > Check the symfony environment and your configuration files : maybe your > "prod" environment is not really ready for production. > > Also heard about XHProf for profiling : > http://mirror.facebook.net/facebook/xhprof/doc.html > > Give it a try, and give us feedback ;) > > Alex' > > 2010/11/16 Remi > > Hi, >> >> I'm working on a Symfony project for the past 11 months. The project >> is basically to throw away the old FrontEnd of a well-known shopping >> comparator, written in java and to replace it with a brand new >> frontend written in PHP with a Service Oriented Architecture (SOA). >> Our high-level architecture is to have a light-weighted frontend in >> PHP (using Symfony 1.4) and a WebService Aggregator written in Java >> (Jersey framework) to ensure all call to underlined webservices are >> done in parallal. This aggregator is extremly performant : it handles >> more than 200 Queries Per Second (QPS). >> >> Our main issue is more about the PHP frontend. Despite all our >> efforts, we can't handle more than 15 QPS on each server. Just to give >> you an idea, here are a few key informations about our achitecture : >> >>* 6 Servers with 4 physical cores (8 with HyperThreading enabled) >> and 24GB of RAM >>* Using Symfony 1.4.1 with PHP 5.2.10 >>* No database access : all datas are fetched using WebServices >>* Centos 5.4 Final 64 bits >>* Apache 2.2.3 >>* APC cache enabled >>* using SimpleXml to read XML feeds (300 nodes tops) coming from >> our WebServices >>* using mod_php >>* PHP memory limit is set to 128M in our production servers (we >> noticed lots of performances issues with only 32M or even 64M) >> >> >> Our FrontEnd does not handle complex algorithm. Basically, it get its >> data from some High Performances webservices (all internal), read the >> request, render the page and log some usefull data (access logs using >> Apache and some custom logs for our business). Everything is monitored >> closely and the bottleneck seems to come from CPU usage which reach >> 100% pretty often. >> We tried a few things : >> >>* Using Apache FastCGI (quite complicated on Centos5.4 since we >> have to re-compile it) : slight increase but is not worth all the >> trouble it causes on our company architecture. Nevertheless, it seems >> that we did some configuration mistakes and we need to bench it again. >>* Caching a few modules : header, footer, ads, ... >>* Replacing Apache by NGix : no change at all >> >> >> For the moment, our average server time exceed 1 second which is >> really bad compared to our old Java-based website (300-400 ms) and we >> didn't have rollouted all supported pages or even all our countries >> (we expect to double the number of connection by activating all >> remaining countries). >> Do you have any idea on how we could increase our performances ? Do we >> need to directly contact SensioLabs to negociate some contractor time >> (maybe a Symfony Guru ?) ? >> Do you know some tools that can help us to profile our application in >> production environment ? We've already tried XDebug on developer >> workstations but we don't have the same exact behavior in production. >> What I'd like to test is to (manually) instrumentate our source code >> to add some timers around some potentially costly algorithms. So you >> know any tool that could help us to do that ? >> >> I already have created a topic on Symfony forum : >> >> http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p108430 >> >> 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 >> > > > > -- > Alexandre Salomé > http://alexandre-salome.fr > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@google
Re: [symfony-users] Problem with doctrine:build-schema
No Alex, I don't have tabs. These are white spaces only !!! On Tue, Nov 16, 2010 at 5:11 PM, Dominik Tuleweit wrote: > You have tabs for idention, take whitespaces instead: > > all: > doctrine: > class: sfDoctrineDatabase > param: > dsn: 'mysql:host=localhost;dbname=CHCISDB' > username: root > password: null > > > > Am 16.11.2010 um 12:37 schrieb Pratik Mazumder: > > Hi Alexander > > Changed the indentions but still doesn't work :( > > Pratik > > On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé < > alexandre.sal...@gmail.com> wrote: > >> It's about indentation : >> >> all: >>doctrine: >> class: sfDoctrineDatabase >> param: >>dsn: 'mysql:host=localhost;dbname=CHCISDB' >>username: root >>password: null >> >> >> 2010/11/16 Pratik >> >>> Hi >>> >>> I am new to symfony. I have a database created in mysql. While trying >>> to build the schema.yml by running php symfony doctrine:build-schema I >>> get the following error: >>> >>> >>doctrine generating yaml schema from database >>> >>> Missing class name. >>> >>> >>> The content of the databases.yml is: >>> >>> all: >>>doctrine: >>>class: sfDoctrineDatabase >>>param: >>> dsn: 'mysql:host=localhost;dbname=CHCISDB' >>> username: root >>> password: null >>> >>> Can anybody please help? >>> >>> Thanks >>> >>> Pratik >>> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >>> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, send email to >>> symfony-users+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en >>> >> >> >> >> -- >> Alexandre Salomé >> http://alexandre-salome.fr >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, 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
Re: [symfony-users] sfGuardUserProfile doesn't work? :-(
You'll also need to select "s.id" like the error message says: "The root class of the query (alias s) must have at least one field selected." – but you also might need to select "p.id", too. Does that help? Cheers, Daniel On 16.11.2010, at 09:59, man mixi wrote: > Hi, experts. > I set up a simple relationship using sfGuardUserProfile. > But it does not work properly. > > Remove 'p.name' from select method, In this case it works. > Why? > I do not understand the meaning of the error message. > > Please help me. > > --- > > ERROR MESSAGE >> 500 | Internal Server Error | Doctrine_Query_Exception >> The root class of the query (alias s) must have at least one field selected. > > > #action.php > >$this->saless = Doctrine_Query::create() > ->select('s.user_id as userid,p.name, sum(s.amount) as amount') > ->from('Sales s') > // ->where('s.created_at between ? and ?',array($start,$end)) > ->leftJoin('s.Profile p') > ->groupBy('userid') > ->execute(); > > #schema.yml > Sales: > tableName: sales > actAs:{ Timestampable: ~ } > columns: >user_id: > type: integer >amount: integer > relations: > User: > class: sfGuardUser > foreign: id > local: use_id > type: many > onDelete: cascade > foreignType: many > foreignAlias: Sales > Profile: > class: sfGuardUserProfile > foreign: user_id > local: user_id > type: many > onDelete: cascade > foreignType: many > foreignAlias: Sales > > sfGuardUserProfile: > tableName: sf_guard_user_profile > actAs:{ Timestampable: ~ } > columns: >id: integer >user_id: > type: integer > primary: true >name: varchar(50) > relations: > User: > class: sfGuardUser > foreign: id > local: user_id > type: one > onDelete: cascade > foreignType: one > foreignAlias: Profile > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, 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] Problem with doctrine:build-schema
Can be because of empty file. Building a non existing schema OK, add a simple definition to your schema before continuing tests --- Alexandre Salomé - http://alexandre-salome.fr Le 16 nov. 2010 12:49, "Pratik Mazumder" a écrit : schema.yml definition? But that's an empty file till now. I am trying to make the same with php symfony doctrine:build-schema On Tue, Nov 16, 2010 at 5:12 PM, Alexandre Salomé < alexandre.sal...@gmail.com> wrote: > > I also ... -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 with doctrine:build-schema
schema.yml definition? But that's an empty file till now. I am trying to make the same with php symfony doctrine:build-schema On Tue, Nov 16, 2010 at 5:12 PM, Alexandre Salomé < alexandre.sal...@gmail.com> wrote: > I also noticed that doctrine: is indented with 3 spaces. Fix it to two. > > Still the same error ? > > It can come from your schema.yml definition. > > Triple check your indentation, and copy your schema to us. > > 2010/11/16 Pratik Mazumder > >> Hi Alexander >> >> Changed the indentions but still doesn't work :( >> >> Pratik >> >> On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé < >> alexandre.sal...@gmail.com> wrote: >> >>> It's about indentation : >>> >>> all: >>>doctrine: >>> class: sfDoctrineDatabase >>> param: >>>dsn: 'mysql:host=localhost;dbname=CHCISDB' >>>username: root >>>password: null >>> >>> >>> 2010/11/16 Pratik >>> Hi I am new to symfony. I have a database created in mysql. While trying to build the schema.yml by running php symfony doctrine:build-schema I get the following error: >>doctrine generating yaml schema from database Missing class name. The content of the databases.yml is: all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null Can anybody please help? Thanks Pratik -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en >>> >>> >>> >>> -- >>> Alexandre Salomé >>> http://alexandre-salome.fr >>> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >>> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, 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 >> > > > > -- > Alexandre Salomé > http://alexandre-salome.fr > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, 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] Problem with doctrine:build-schema
I also noticed that doctrine: is indented with 3 spaces. Fix it to two. Still the same error ? It can come from your schema.yml definition. Triple check your indentation, and copy your schema to us. 2010/11/16 Pratik Mazumder > Hi Alexander > > Changed the indentions but still doesn't work :( > > Pratik > > On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé < > alexandre.sal...@gmail.com> wrote: > >> It's about indentation : >> >> all: >>doctrine: >> class: sfDoctrineDatabase >> param: >>dsn: 'mysql:host=localhost;dbname=CHCISDB' >>username: root >>password: null >> >> >> 2010/11/16 Pratik >> >>> Hi >>> >>> I am new to symfony. I have a database created in mysql. While trying >>> to build the schema.yml by running php symfony doctrine:build-schema I >>> get the following error: >>> >>> >>doctrine generating yaml schema from database >>> >>> Missing class name. >>> >>> >>> The content of the databases.yml is: >>> >>> all: >>>doctrine: >>>class: sfDoctrineDatabase >>>param: >>> dsn: 'mysql:host=localhost;dbname=CHCISDB' >>> username: root >>> password: null >>> >>> Can anybody please help? >>> >>> Thanks >>> >>> Pratik >>> >>> -- >>> If you want to report a vulnerability issue on symfony, please send it to >>> security at symfony-project.com >>> >>> You received this message because you are subscribed to the Google >>> Groups "symfony users" group. >>> To post to this group, send email to symfony-users@googlegroups.com >>> To unsubscribe from this group, send email to >>> symfony-users+unsubscr...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/symfony-users?hl=en >>> >> >> >> >> -- >> Alexandre Salomé >> http://alexandre-salome.fr >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, 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 > -- Alexandre Salomé http://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sfGuardUserProfile doesn't work? :-(
Can you post your schema? On Nov 16, 2010 5:48 AM, "man mixi" wrote: Hi, experts. I set up a simple relationship using sfGuardUserProfile. But it does not work properly. Remove 'p.name' from select method, In this case it works. Why? I do not understand the meaning of the error message. Please help me. --- ERROR MESSAGE >500 | Internal Server Error | Doctrine_Query_Exception >The root class of the query (alias s) must have at least one field selected. #action.php $this->saless = Doctrine_Query::create() ->select('s.user_id as userid,p.name, sum(s.amount) as amount') ->from('Sales s') // ->where('s.created_at between ? and ?',array($start,$end)) ->leftJoin('s.Profile p') ->groupBy('userid') ->execute(); #schema.yml Sales: tableName: sales actAs:{ Timestampable: ~ } columns: user_id: type: integer amount: integer relations: User: class: sfGuardUser foreign: id local: use_id type: many onDelete: cascade foreignType: many foreignAlias: Sales Profile: class: sfGuardUserProfile foreign: user_id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Sales sfGuardUserProfile: tableName: sf_guard_user_profile actAs:{ Timestampable: ~ } columns: id: integer user_id: type: integer primary: true name: varchar(50) relations: User: class: sfGuardUser foreign: id local: user_id type: one onDelete: cascade foreignType: one foreignAlias: Profile -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Problem with doctrine:build-schema
You have tabs for idention, take whitespaces instead: all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null Am 16.11.2010 um 12:37 schrieb Pratik Mazumder: Hi Alexander Changed the indentions but still doesn't work :( Pratik On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé > wrote: It's about indentation : all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null 2010/11/16 Pratik Hi I am new to symfony. I have a database created in mysql. While trying to build the schema.yml by running php symfony doctrine:build-schema I get the following error: >>doctrine generating yaml schema from database Missing class name. The content of the databases.yml is: all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null Can anybody please help? Thanks Pratik -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- Alexandre Salomé http://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
Re: [symfony-users] Problem with doctrine:build-schema
Hi Alexander Changed the indentions but still doesn't work :( Pratik On Tue, Nov 16, 2010 at 4:57 PM, Alexandre Salomé < alexandre.sal...@gmail.com> wrote: > It's about indentation : > > all: >doctrine: > class: sfDoctrineDatabase > param: >dsn: 'mysql:host=localhost;dbname=CHCISDB' >username: root >password: null > > > 2010/11/16 Pratik > >> Hi >> >> I am new to symfony. I have a database created in mysql. While trying >> to build the schema.yml by running php symfony doctrine:build-schema I >> get the following error: >> >> >>doctrine generating yaml schema from database >> >> Missing class name. >> >> >> The content of the databases.yml is: >> >> all: >>doctrine: >>class: sfDoctrineDatabase >>param: >> dsn: 'mysql:host=localhost;dbname=CHCISDB' >> username: root >> password: null >> >> Can anybody please help? >> >> Thanks >> >> Pratik >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > > > -- > Alexandre Salomé > http://alexandre-salome.fr > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, 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] Problem with doctrine:build-schema
It's about indentation : all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null 2010/11/16 Pratik > Hi > > I am new to symfony. I have a database created in mysql. While trying > to build the schema.yml by running php symfony doctrine:build-schema I > get the following error: > > >>doctrine generating yaml schema from database > > Missing class name. > > > The content of the databases.yml is: > > all: >doctrine: >class: sfDoctrineDatabase >param: > dsn: 'mysql:host=localhost;dbname=CHCISDB' > username: root > password: null > > Can anybody please help? > > Thanks > > Pratik > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Alexandre Salomé http://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Performances issues
Create a pre-production environment, secured to disallow web access and enable the debug bar. symfony has some time-watching features in debug bar, it could give you some measures. Check the symfony environment and your configuration files : maybe your "prod" environment is not really ready for production. Also heard about XHProf for profiling : http://mirror.facebook.net/facebook/xhprof/doc.html Give it a try, and give us feedback ;) Alex' 2010/11/16 Remi > Hi, > > I'm working on a Symfony project for the past 11 months. The project > is basically to throw away the old FrontEnd of a well-known shopping > comparator, written in java and to replace it with a brand new > frontend written in PHP with a Service Oriented Architecture (SOA). > Our high-level architecture is to have a light-weighted frontend in > PHP (using Symfony 1.4) and a WebService Aggregator written in Java > (Jersey framework) to ensure all call to underlined webservices are > done in parallal. This aggregator is extremly performant : it handles > more than 200 Queries Per Second (QPS). > > Our main issue is more about the PHP frontend. Despite all our > efforts, we can't handle more than 15 QPS on each server. Just to give > you an idea, here are a few key informations about our achitecture : > >* 6 Servers with 4 physical cores (8 with HyperThreading enabled) > and 24GB of RAM >* Using Symfony 1.4.1 with PHP 5.2.10 >* No database access : all datas are fetched using WebServices >* Centos 5.4 Final 64 bits >* Apache 2.2.3 >* APC cache enabled >* using SimpleXml to read XML feeds (300 nodes tops) coming from > our WebServices >* using mod_php >* PHP memory limit is set to 128M in our production servers (we > noticed lots of performances issues with only 32M or even 64M) > > > Our FrontEnd does not handle complex algorithm. Basically, it get its > data from some High Performances webservices (all internal), read the > request, render the page and log some usefull data (access logs using > Apache and some custom logs for our business). Everything is monitored > closely and the bottleneck seems to come from CPU usage which reach > 100% pretty often. > We tried a few things : > >* Using Apache FastCGI (quite complicated on Centos5.4 since we > have to re-compile it) : slight increase but is not worth all the > trouble it causes on our company architecture. Nevertheless, it seems > that we did some configuration mistakes and we need to bench it again. >* Caching a few modules : header, footer, ads, ... >* Replacing Apache by NGix : no change at all > > > For the moment, our average server time exceed 1 second which is > really bad compared to our old Java-based website (300-400 ms) and we > didn't have rollouted all supported pages or even all our countries > (we expect to double the number of connection by activating all > remaining countries). > Do you have any idea on how we could increase our performances ? Do we > need to directly contact SensioLabs to negociate some contractor time > (maybe a Symfony Guru ?) ? > Do you know some tools that can help us to profile our application in > production environment ? We've already tried XDebug on developer > workstations but we don't have the same exact behavior in production. > What I'd like to test is to (manually) instrumentate our source code > to add some timers around some potentially costly algorithms. So you > know any tool that could help us to do that ? > > I already have created a topic on Symfony forum : > http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p108430 > > 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 > -- Alexandre Salomé http://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 "CREATE TABLE" when generating SQL from a Doctrine model using Inheritance
Could you show us your schema ? Can be because of a misconfigured schema. 2010/11/15 Hany El-Kerdany > Dear All, > > I'm using inheritance in my Doctrine model (column_aggregation). > When I generate the SQL from Models (using symfony's doctrine:generate > --all), I find that there's a redundant CREATE TABLE statement (all for the > same table, since I'm using column_aggregation).. > This seems like a bug to me, and running the generated SQL on a MySQL > client like (Query Analyzer) generates an error when attempting to run the > second CREATE TABLE statement. > > Is there a workaround for this? Should I perhaps create the SQL myself? > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- Alexandre Salomé http://alexandre-salome.fr -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 On 1.4 Repository
it is the most stable On 16 Nov 2010 12:48 PM, "Darren L" wrote: Hello, I am about to make an application with Symfony 1.4, however I noticed when I updated the SVN it was showing 1.4.9. Does the SVN not use the most stable? Or is 1.4.9 stable? Thanks, Darren -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Httpd.conf alias should be moved to .htaccess
When I ran the getting started example in a shared environment I got a blank ugly page with no pictures or anything because I had no access to the httpd.conf. To get around this I put the following rule in the .htaccess of my web folder: RewriteRule ^sf/(.*)$ /panmed/data/web/sf/$1 [R,L] Regards, Dimo -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Question On 1.4 Repository
Hello, I am about to make an application with Symfony 1.4, however I noticed when I updated the SVN it was showing 1.4.9. Does the SVN not use the most stable? Or is 1.4.9 stable? Thanks, Darren -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Multiple "CREATE TABLE" when generating SQL from a Doctrine model using Inheritance
Dear All, I'm using inheritance in my Doctrine model (column_aggregation). When I generate the SQL from Models (using symfony's doctrine:generate --all), I find that there's a redundant CREATE TABLE statement (all for the same table, since I'm using column_aggregation).. This seems like a bug to me, and running the generated SQL on a MySQL client like (Query Analyzer) generates an error when attempting to run the second CREATE TABLE statement. Is there a workaround for this? Should I perhaps create the SQL myself? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sfGuardUserProfile doesn't work? :-(
Hi, experts. I set up a simple relationship using sfGuardUserProfile. But it does not work properly. Remove 'p.name' from select method, In this case it works. Why? I do not understand the meaning of the error message. Please help me. --- ERROR MESSAGE >500 | Internal Server Error | Doctrine_Query_Exception >The root class of the query (alias s) must have at least one field selected. #action.php $this->saless = Doctrine_Query::create() ->select('s.user_id as userid,p.name, sum(s.amount) as amount') ->from('Sales s') // ->where('s.created_at between ? and ?',array($start,$end)) ->leftJoin('s.Profile p') ->groupBy('userid') ->execute(); #schema.yml Sales: tableName: sales actAs:{ Timestampable: ~ } columns: user_id: type: integer amount: integer relations: User: class: sfGuardUser foreign: id local: use_id type: many onDelete: cascade foreignType: many foreignAlias: Sales Profile: class: sfGuardUserProfile foreign: user_id local: user_id type: many onDelete: cascade foreignType: many foreignAlias: Sales sfGuardUserProfile: tableName: sf_guard_user_profile actAs:{ Timestampable: ~ } columns: id: integer user_id: type: integer primary: true name: varchar(50) relations: User: class: sfGuardUser foreign: id local: user_id type: one onDelete: cascade foreignType: one foreignAlias: Profile -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Problem with doctrine:build-schema
Hi I am new to symfony. I have a database created in mysql. While trying to build the schema.yml by running php symfony doctrine:build-schema I get the following error: >>doctrine generating yaml schema from database Missing class name. The content of the databases.yml is: all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=localhost;dbname=CHCISDB' username: root password: null Can anybody please help? Thanks Pratik -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Performances issues
Hi, I'm working on a Symfony project for the past 11 months. The project is basically to throw away the old FrontEnd of a well-known shopping comparator, written in java and to replace it with a brand new frontend written in PHP with a Service Oriented Architecture (SOA). Our high-level architecture is to have a light-weighted frontend in PHP (using Symfony 1.4) and a WebService Aggregator written in Java (Jersey framework) to ensure all call to underlined webservices are done in parallal. This aggregator is extremly performant : it handles more than 200 Queries Per Second (QPS). Our main issue is more about the PHP frontend. Despite all our efforts, we can't handle more than 15 QPS on each server. Just to give you an idea, here are a few key informations about our achitecture : * 6 Servers with 4 physical cores (8 with HyperThreading enabled) and 24GB of RAM * Using Symfony 1.4.1 with PHP 5.2.10 * No database access : all datas are fetched using WebServices * Centos 5.4 Final 64 bits * Apache 2.2.3 * APC cache enabled * using SimpleXml to read XML feeds (300 nodes tops) coming from our WebServices * using mod_php * PHP memory limit is set to 128M in our production servers (we noticed lots of performances issues with only 32M or even 64M) Our FrontEnd does not handle complex algorithm. Basically, it get its data from some High Performances webservices (all internal), read the request, render the page and log some usefull data (access logs using Apache and some custom logs for our business). Everything is monitored closely and the bottleneck seems to come from CPU usage which reach 100% pretty often. We tried a few things : * Using Apache FastCGI (quite complicated on Centos5.4 since we have to re-compile it) : slight increase but is not worth all the trouble it causes on our company architecture. Nevertheless, it seems that we did some configuration mistakes and we need to bench it again. * Caching a few modules : header, footer, ads, ... * Replacing Apache by NGix : no change at all For the moment, our average server time exceed 1 second which is really bad compared to our old Java-based website (300-400 ms) and we didn't have rollouted all supported pages or even all our countries (we expect to double the number of connection by activating all remaining countries). Do you have any idea on how we could increase our performances ? Do we need to directly contact SensioLabs to negociate some contractor time (maybe a Symfony Guru ?) ? Do you know some tools that can help us to profile our application in production environment ? We've already tried XDebug on developer workstations but we don't have the same exact behavior in production. What I'd like to test is to (manually) instrumentate our source code to add some timers around some potentially costly algorithms. So you know any tool that could help us to do that ? I already have created a topic on Symfony forum : http://forum.symfony-project.org/viewtopic.php?f=3&t=30853&p=108430#p108430 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