[symfony-users] Re: we are going to convert a site from Propel to Doctrine. What are the pain points?
On Apr 28, 2009, at 2:27 PM, Tom Boutell wrote: > > One more note about writing IN clauses that everybody seems to miss... > if $myids is an empty list, MySQL will produce a syntax error. "Empty > equals evil and scary and different" is an annoying property that both > MySQL and PHP tend to display in many situations. Simply skipping the > IN clause completely would always match everything, when of course you > should match nothing. A simple and correct workaround is to replace > the entire IN clause with FALSE when the list is empty. That's because it is a syntax error according to the SQL-92 standard. As easy as it is to pick on MySQL, it isn't their fault. This is what we're stuck with in all dbms that follow SQL-92, for better or worse. > 8.4 > > Function > > Specify a quantified comparison. > > Format > > ::= > > [ NOT ] IN > > ::= > > | > > ::= >{ }... Notice how an MUST start with a and a cannot be empty. IN (false) isn't technically the proper behavior for what you're looking for. Consider the case: SELECT true WHERE false IN (false). (Yeah it's a pathological case but something a framework would need to worry about.) You should be using IN (null) since that shouldn't match any rows with a standards-compliant DBMS. I know PostgreSQL and mysql 5 both behave correctly. -- Jacob Coby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Propel Problem.....plz help
Try using doSelectRS() if on Propel 1.2 or doSelectStmt() if on Propel 1.3 instead of doSelect() ... They will each need to be handled differently after that as well as there is no automatic hydration into objects but it means you get all the data you need and your clearSelectColumns() and addSelectColumn() methods will actually work ;) On Tue, Apr 28, 2009 at 6:39 PM, Eno wrote: > > On Mon, 27 Apr 2009, Pooja wrote: > > > Hi All i have tired to convert below Sql query in symfonyIt is > > reporting Error > > First rule of asking for help: give the exact error message. > > > > -- > > > > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: we are going to convert a site from Propel to Doctrine. What are the pain points?
Others have covered the main points. Some additional thoughts: 1. While it's true that Doctrine has Table classes rather than Peer classes, you can continue to follow the convention of putting static methods in the Table classes if you feel like it, and this will save you some time. You can also write non-static methods, which is handy because you can create a query conveniently with $this->createQuery(). If you take that approach, the calling code should use Doctrine::getTable('modelClassName')->getAllWiggles() to call those methods, rather than modelClassNameTable::getAllWiggles(). 2. In most ways writing queries with Doctrine cascading methods and/or DQL is vastly less annoying than working with the Criteria class. However you can nest Criteria objects deeply if you need to, as combinations of ORs and ANDs. Doctrine has addWhere(), but doesn't allow you to make a complex tree that translates to parentheses in the final SQL. On the other hand, Doctrine doesn't HAVE to do that, because you can just write DQL: Doctrine_Query::create()->from('modelClassName m')->where('m.x < ? AND (m.y < ? OR m.name = ?), array(50, 100, "Bob")); Still, if you are building up query criteria by calling several methods that you reuse in a variety of queries, and simply ANDing or ORing all of the clauses together without nesting is not sufficient for you, then you have to build DQL strings by concatenation. In practice I find this is very rarely necessary. Another annoyance is that while Doctrine does have addWhereIn() for easily building an IN query (such as checking whether the ID is one of a list of IDs), it does not have a convenient way to build an IN clause deep inside a complex DQL query that requires parentheses like the one above. So you occasionally do have to write something like: 'm.x < ? AND (m.y < ? OR m.id IN (' . implode(", ", $myIds) . '))'; Which leaves something to be desired. Propel criteria are good at that one, at least once you get comfortable understanding (and typing) a nested tree of them. However Doctrine's superior support for joining tables in complex ways often eliminates the need for IN clauses. One more note about writing IN clauses that everybody seems to miss... if $myids is an empty list, MySQL will produce a syntax error. "Empty equals evil and scary and different" is an annoying property that both MySQL and PHP tend to display in many situations. Simply skipping the IN clause completely would always match everything, when of course you should match nothing. A simple and correct workaround is to replace the entire IN clause with FALSE when the list is empty. Come to think of it, Doctrine itself contains this bug in its implementation of _processWhereIn(). It correctly detects the situation where MySQL would generate an error, but then incorrectly returns nothing rather than FALSE, which is not correct. [Runs off to report that] -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] file extension problems
symfony 1.1 svn version I have to generate dynamic css to support theming. So I added a sitecss action and a site.css route. Everything works fine when used directly. However, when the browser requests the resource, symfony requires that the file be named sitecssSuccess.css.php. Except in IE, where it uses the original sitecssSuccess.php. I've tried removing the .css extension (same problem). I've tried using the suffix routing parameter (no effect). To get around the problem and to keep moving forward I've added a sitecssSuccess.css.php that just includes the sitecssSuccess.php file. Is this a bug or am I missing something? -- Jacob Coby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Functional tests: Trouble with user groups (sfDoctrineGuardPlugin)
Hi, I am writing functional tests where I change the usergroups. I got the following piece of code: --- somewhere in an action.php --- private function someFunction() { $user = $this->getUser(); $user->addGroupByName('BasicUser'); $user->removeFromGroupByName('DemoAccount'); } --- --- functional test --- $browser->createActivatedUser()-> info('Change email')-> get('/preferences')-> isStatusCode()-> isRequestParameter('module', 'preferences')-> isRequestParameter('action', 'index')-> setField('changemail[email]', 'new...@bar.com')-> setField('changemail[password]', 'mynewpasswd')-> click('Save new email')-> isStatusCode(200)-> ... // get 404 here ; -- The reason for 404 is the following: in my update method, there is the following line -- $this->forward404Unless($this->getUser()->hasGroup('BasicUser')); -- The user should be in group 'BasicUser' - when I do everything manually, it works. I logged the current groups just before the forward404unless: $this->logMessage("HASGROUP: " . (implode(",", $this->getUser()- >getGroupNames()), sfLogger::getPriorityName(1)); And it says I am 'DemoAccount'. What happens here? Does it not refresh the groups? Why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] propel-insert-sql
Hi all, I m using symfony1.0 ans oracle9i as database server, i can retreive schema.yml of the existant tables with : symfony propel-build-schema, but i cant execute generated sql. The propel-insert-sql command returns : DROP TABLE "table" CASCADE CONSTRAINTS] [PHP Error] oci_execute(): ORA-00955: name is already used by an existing object [line 188 of C:\wamp\bin\php\php5.2.6\PEAR\symfony\vendor\creole\drivers\oracle \OCI8Connection.php] [propel-sql-exec] Failed to execute: ALTER TABLE ... Any idea? Thanks, A+ Ghizlane, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Propel Problem.....plz help
On Mon, 27 Apr 2009, Pooja wrote: > Hi All i have tired to convert below Sql query in symfonyIt is > reporting Error First rule of asking for help: give the exact error message. -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Symfony Cookie Issues
On Mon, 27 Apr 2009, bpfar...@gmail.com wrote: > So again, the problem is that a user will log in, is able to see his > information, and then if he logs out, and another user logs in, she is > correctly authenticated with moodle but the session attribute that's > stored in symfony is the wrong ID. Now, if we clear cookies, any user > can log in correctly. Sounds like you have two sessions but only one is cleared when a user logs out? Another way to do this is to have the symfony code look for the moodle cookie and setup a new session upon login automatically. You will also need the logout process in moodle call into symfony to end that user's session in symfony too. We are doing something like this for a legacy site that does the login process while the main site is using symfony. -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Seem like 1.2.6 breaks embedForm in Admin Generator
That's a known regression introduced by the security patch. We work actively to provide a fix for that problem, but that's not a simple task. For now, you can revert to 1.2.5 and check that you have unset the fields you want to remove in the admin form from the form class itself, which prevents the security issue. Thanks for your patience, Fabien -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 virtualize wrote: > hi > > in my ContactForm.class.php -> configure() I have something like this: > > if (!$this->isNew()) > { > // attach contact vitas > foreach ($this->getObject()->getContactVitas() as $vita) > { > $vita_form = new ContactVitaForm($vita); > $this->embedForm('vita_'.$vita->getId(), $vita_form); > } > $this->embedForm('vita', new ContactVitaForm()); > } > > in generate.yml I declare some basics fields and a patial > where I handle the embedded form: > form: > display: > "Basic data": [ title, email, skype, telephone, image ] > "Curriculum vitae": [ _fieldset_contact_vita ] > > In the partial _fieldset_contact_vita I retrieve the embedded form > by $form->getEmbeddedForms(), which returns nothing now that > I upgraded to 1.2.6. Of course it worked well in 1.2.5 > It seems that the embedded forms get unset by the new security fix. > > Is there a way to prevent their removal without touching the core. > Or could my way of embedding forms handled some other way? > > regards, chris > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Seem like 1.2.6 breaks embedForm in Admin Generator
hi in my ContactForm.class.php -> configure() I have something like this: if (!$this->isNew()) { // attach contact vitas foreach ($this->getObject()->getContactVitas() as $vita) { $vita_form = new ContactVitaForm($vita); $this->embedForm('vita_'.$vita->getId(), $vita_form); } $this->embedForm('vita', new ContactVitaForm()); } in generate.yml I declare some basics fields and a patial where I handle the embedded form: form: display: "Basic data": [ title, email, skype, telephone, image ] "Curriculum vitae": [ _fieldset_contact_vita ] In the partial _fieldset_contact_vita I retrieve the embedded form by $form->getEmbeddedForms(), which returns nothing now that I upgraded to 1.2.6. Of course it worked well in 1.2.5 It seems that the embedded forms get unset by the new security fix. Is there a way to prevent their removal without touching the core. Or could my way of embedding forms handled some other way? regards, chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Use template in actions
Hi u can use $this->getPartial('parial_name', array of arguments); On Tue, Apr 28, 2009 at 3:58 PM, HAUSa < jeroen_heeft_behoefte_aan_r...@hotmail.com> wrote: > > I want to send a HTML e-mail. For that, I think it's best to create a > partial template. But the e-mail is being sent from the action, so my > question is: how do I load my template into the action and send it? > > Example: > $template = sprintf([get_partial_template], $var1, $var2); > mail($receiver, 'E-mail', $template) > > > -- Regards, Dheeraj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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 migrations and behaviors
Hi everybody ! Does anybody know how to include a behavior in a model using migrations? I'm actually using the schema.yml file to do that, and I didn't find the info on the doctrine documentation site. Thank's in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: propel dublicate table
Show us your schema.yml, the error is there. On Tue, Apr 28, 2009 at 12:53, Waseem wrote: > > Dear All, > > i am facing following problem. please help. > > > D:\Apache2\htdocs\ats>symfony propel:build-model >>> schema converting "D:/Apache2/htdocs/a...ig/generated-schema.yml" to XML >>> schema putting D:/Apache2/htdocs/ats/c.../generated-generated-schema.xml >>> schema converting "D:/Apache2/htdocs/ats/config/schema.yml" to XML >>> schema putting D:/Apache2/htdocs/ats/config/generated-schema.xml >>> propel Running "om" phing task > Execution of target "om-template" failed for the following reason: D: > \php5\PEAR\ > pear\symfony\plugins\sfPropelPlugin\lib\vendor\propel-generator\build- > propel.xml > :479:1: Duplicate table found: propel. > [phingcall] D:\php5\PEAR\pear\symfony\plugins\sfPropelPlugin\lib\vendor > \propel-g > enerator\build-propel.xml:479:1: Duplicate table found: propel. > Execution of target "om" failed for the following reason: D:\php5\PEAR > \pear\symf > ony\plugins\sfPropelPlugin\lib\vendor\propel-generator\build- > propel.xml:465:22: > Execution of the target buildfile failed. Aborting. > [phing] D:\php5\PEAR\pear\symfony\plugins\sfPropelPlugin\lib\vendor > \propel-g > enerator\build-propel.xml:465:22: Execution of the target buildfile > failed. Abor > ting. > > > Some problems occurred when executing the task: > > build-propel.xml:479:1: Duplicate table found: propel. > > build-propel.xml:465:22: Execution of the target buildfile failed. > Aborting. > > If the exception message is not clear enough, read the output of > the task fo > r more information > > >>> file- D:/Apache2/htdocs/ats/config/generated-schema.xml >>> file- D:/Apache2/htdocs/ats/config/generated-schema-transformed.xml >>> file- D:/Apache2/htdocs/ats/config/generated-generated-schema.xml >>> file- D:/Apache2/htdocs/ats/config/ge...enerated-schema-transformed.xml > > D:\Apache2\htdocs\ats> > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Any suggestions for setting the displaying order particularly
We have a webstie which need to display members list, I want to set different displaying order in different countries. For example, if visitor is from Canada, then Canadian users will be displayed first, if from China, then Chinese users will be displayed first. Are there any simple solution to meet this requirement? Or I have to write complicate sript to meet this requirements? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: we are going to convert a site from Propel to Doctrine. What are the pain points?
Doctrine is different from Propel in several things - some big (like the schema.yml file format, for example) and some small (like subtle changes in the way Doctrine form fields work when compared to Propel). If your project is big, you have a lot of work coming your way. If you have encapsulated everything perfectly in the MVC model, you'll mostly have to worry about rewriting your Model codes and your Form codes (assuming you're using the 1.2 branch, where forms are isolated in their own classes). This by itself should be a lot of work, depending on the size of your project. However, I'd say your biggest pain would be to go through your Controller layer (your actions) and check if there are any Propel- specific calls there. In the best case scenario, you won't have any direct database queries in your Controller, but you'll still have to update method calls to "Peer" classes since Doctrine uses a different syntax for its "Table" classes. Worst case scenario, you'll have direct database queries in your Controllers, and then you'll have not only to "translate" the calls to the Doctrine syntax but also probably to refactor some code in order to put everything on its proper MVC layer. IMO checking the actions is the worst part, since projects usually have several modules and countless actions - checking and updating one- by-one is really, really boring and error-prone. Good luck! Best Regards, Thiago Campezzi On Apr 25, 3:44 pm, Lawrence Krubner wrote: > We are going to convert a site from using Propel to using Doctrine. > Have others done this? Can you suggest what the pain points are? > > I haven't looked, but I assume the Doctrine interface is different and > therefore we need to crawl through our code changing a lot of method > calls. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Propel Problem.....plz help
Hi, Maybe you should tell us what the error returned by symfony actually is. On 28 avr, 12:22, Pooja wrote: > Hi Frank > This SQL query is going fine in MYSQL this is giving me results but in > symfony i m having problem...plz help > Regards Pooja > > On Apr 27, 5:54 pm, Frank He wrote: > > > I sugest you first use $c->toString() to print out the query and see where > > is the error. > > > On Mon, Apr 27, 2009 at 8:11 AM, Pooja wrote: > > > > Hi All i have tired to convert below Sql query in symfonyIt is > > > reporting Error > > > Sql Query is.. > > > select d.dest_name,e.emp_name,c.date from destination_table d, > > > emp_table e, cab_req_table c where e.emp_id=c.emp_id AND > > > c.dest_id=d.id; > > > > In SYmfony: > > > $c=new criteria(); > > > $c->addJoin(CabReqTablePeer::DEST_ID,DestinationTablePeer::ID); > > > $c->addJoin(CabReqTablePeer::EMP_ID,EmpTablePeer::EMP_ID); > > > $c->addSelectColumn(EmpTablePeer::EMP_NAME); > > > $c->addSelectColumn(DestinationTablePeer::DEST_NAME); > > > $c->addSelectColumn(CabReqTablePeer::DATE); > > > $rs=CabReqTablePeer::doSelect($c); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] clone DbFinder instance not working. Any thoughts?
Firstly. Hi, i'm new to this group. Hopefully I can offer something back to the community in due course. But currently I'm having an issue with the DbFinder plugin. I am building a complex query using DbFinder and would like to clone it once i've built my query. e.g: $count_finder = clone $finder; I want to create a cloned instance so I can run $count_finder->count() on one instance and $finder->find() (with an offset and limit set) on the second instance. I'm paginating a large resultset so therefore don't want to just run find() and then count the number of items in the array. I love DbFinder and would like prefer to find a solution because I've had this problem a few times before. Cheers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: we are going to convert a site from Propel to Doctrine. What are the pain points?
I agree, DbFinder plugin is brilliant! If you upgrade to propel 1.3 there is little difference in performance between Doctrine and Propel. For me the code insight from Propel is very valuable too. On 27 Apr, 14:42, Crowley wrote: > Try the sfDbFinder plugin. It has adatpter both for propel and > doctrine. And the syntax is similar to Doctrine. > > On Apr 27, 11:00 am, HiDDeN wrote: > > > Why are you changing to Doctrine? It is a bit tricky when doing some > > things. For example, if you want to write a custom SQL, or if you want > > to write a Full-Text search, or just work with the backend (because > > the Doctrine pager is slow...) > > > On Apr 25, 9:16 pm, Alexandru-Emil Lupu wrote: > > > > I never used Doctrine...but i think the pain will be the Criteria (s) > > > changes. If you have "Criterias" outside the model (i mean in action...) > > > then it will be a pain in the a** > > > alecs > > > > On Sat, Apr 25, 2009 at 9:44 PM, Lawrence Krubner > > > wrote: > > > > > We are going to convert a site from using Propel to using Doctrine. > > > > Have others done this? Can you suggest what the pain points are? > > > > > I haven't looked, but I assume the Doctrine interface is different and > > > > therefore we need to crawl through our code changing a lot of method > > > > calls. > > > > -- > > > I am on twitter:http://twitter.com/alecslupu > > > I am on linkedIn:http://www.linkedin.com/in/alecslupu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Create Constructor method in action.class.php
1. Are you calling the parent class constructor from your constructor (parent::__construct())? I'm not sure if that will do the trick for your purposes, but it might. 2. How about writing a preExecute() method instead? This method is invoked before any action in the class is invoked. -- Tom Boutell P'unk Avenue 215 755 1330 punkave.com window.punkave.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Propel Problem.....plz help
Sorry man, I can not see anything wrong if the query is runing fine in mysql db. But if you really can not figure out the error, you may not have to use join, just retrieve all the CatReq objects, and then use getDes() and getEmp() on each object. Good luck On Tue, Apr 28, 2009 at 6:22 AM, Pooja wrote: > > Hi Frank > This SQL query is going fine in MYSQL this is giving me results but in > symfony i m having problem...plz help > Regards Pooja > > On Apr 27, 5:54 pm, Frank He wrote: > > I sugest you first use $c->toString() to print out the query and see > where > > is the error. > > > > On Mon, Apr 27, 2009 at 8:11 AM, Pooja wrote: > > > > > Hi All i have tired to convert below Sql query in symfonyIt is > > > reporting Error > > > Sql Query is.. > > > select d.dest_name,e.emp_name,c.date from destination_table d, > > > emp_table e, cab_req_table c where e.emp_id=c.emp_id AND > > > c.dest_id=d.id; > > > > > In SYmfony: > > > $c=new criteria(); > > > $c->addJoin(CabReqTablePeer::DEST_ID,DestinationTablePeer::ID); > > > $c->addJoin(CabReqTablePeer::EMP_ID,EmpTablePeer::EMP_ID); > > > $c->addSelectColumn(EmpTablePeer::EMP_NAME); > > > $c->addSelectColumn(DestinationTablePeer::DEST_NAME); > > > $c->addSelectColumn(CabReqTablePeer::DATE); > > > $rs=CabReqTablePeer::doSelect($c); > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] sfGuard + LDAP
Hi! I am trying to implement an authentication in my Symfony project over a domain controller. I found a library called 'adLDAP' and I can authenticate on the domain controller using a php script, but I can not integrate it into my project with sfGuardPlugin. I set the settings.yml file: all: .actions: login_module: sfGuardAuth login_action: signin secure_module: sfGuardAuth secure_action: secure .settings: enabled_modules: [default, sfGuardAuth] the app.yml file: all: sf_guard_plugin: check_password_callable: [myLDAP, checkLDAPPassword] I change the myUser class to extends from sfGuardSecurityUser, and I created the myLDAP class in the lib directory of my app with the checkLDAPPassword method. But when I put my identification credentials, I get an error "table or view does not exist '. It can not found the tables because I don't create it because I don't want to store this information in the database. How can i make the password validation using my own method? Thank you very much. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---
[symfony-users] propel dublicate table
Dear All, i am facing following problem. please help. D:\Apache2\htdocs\ats>symfony propel:build-model >> schemaconverting "D:/Apache2/htdocs/a...ig/generated-schema.yml" to XML >> schemaputting D:/Apache2/htdocs/ats/c.../generated-generated-schema.xml >> schemaconverting "D:/Apache2/htdocs/ats/config/schema.yml" to XML >> schemaputting D:/Apache2/htdocs/ats/config/generated-schema.xml >> propelRunning "om" phing task Execution of target "om-template" failed for the following reason: D: \php5\PEAR\ pear\symfony\plugins\sfPropelPlugin\lib\vendor\propel-generator\build- propel.xml :479:1: Duplicate table found: propel. [phingcall] D:\php5\PEAR\pear\symfony\plugins\sfPropelPlugin\lib\vendor \propel-g enerator\build-propel.xml:479:1: Duplicate table found: propel. Execution of target "om" failed for the following reason: D:\php5\PEAR \pear\symf ony\plugins\sfPropelPlugin\lib\vendor\propel-generator\build- propel.xml:465:22: Execution of the target buildfile failed. Aborting. [phing] D:\php5\PEAR\pear\symfony\plugins\sfPropelPlugin\lib\vendor \propel-g enerator\build-propel.xml:465:22: Execution of the target buildfile failed. Abor ting. Some problems occurred when executing the task: build-propel.xml:479:1: Duplicate table found: propel. build-propel.xml:465:22: Execution of the target buildfile failed. Aborting. If the exception message is not clear enough, read the output of the task fo r more information >> file- D:/Apache2/htdocs/ats/config/generated-schema.xml >> file- D:/Apache2/htdocs/ats/config/generated-schema-transformed.xml >> file- D:/Apache2/htdocs/ats/config/generated-generated-schema.xml >> file- D:/Apache2/htdocs/ats/config/ge...enerated-schema-transformed.xml D:\Apache2\htdocs\ats> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: hiding a field in admin generator by a credential?
Hi, I am not sure if it works in generator.yml in symfony 1.2... Try to list required credentials in an array: fields: myfield: { credentials: [editMyField] } Or manage credentials directly in the form. Pavel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Use template in actions
I want to send a HTML e-mail. For that, I think it's best to create a partial template. But the e-mail is being sent from the action, so my question is: how do I load my template into the action and send it? Example: $template = sprintf([get_partial_template], $var1, $var2); mail($receiver, 'E-mail', $template) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: Propel Problem.....plz help
Hi Frank This SQL query is going fine in MYSQL this is giving me results but in symfony i m having problem...plz help Regards Pooja On Apr 27, 5:54 pm, Frank He wrote: > I sugest you first use $c->toString() to print out the query and see where > is the error. > > On Mon, Apr 27, 2009 at 8:11 AM, Pooja wrote: > > > Hi All i have tired to convert below Sql query in symfonyIt is > > reporting Error > > Sql Query is.. > > select d.dest_name,e.emp_name,c.date from destination_table d, > > emp_table e, cab_req_table c where e.emp_id=c.emp_id AND > > c.dest_id=d.id; > > > In SYmfony: > > $c=new criteria(); > > $c->addJoin(CabReqTablePeer::DEST_ID,DestinationTablePeer::ID); > > $c->addJoin(CabReqTablePeer::EMP_ID,EmpTablePeer::EMP_ID); > > $c->addSelectColumn(EmpTablePeer::EMP_NAME); > > $c->addSelectColumn(DestinationTablePeer::DEST_NAME); > > $c->addSelectColumn(CabReqTablePeer::DATE); > > $rs=CabReqTablePeer::doSelect($c); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Default value sfWidgetFormTime
Is it possible to only set a default value for the minutes input of sfWidgetFormTime? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] I18N Difficulties
Hi folks! Guys, Im having some problems with i18n. I was trying to usesfExtraWidgetsPlugin and make the language selectable, but usually it always selected english, instead of portuguese (my main language) or italian/spanish. Can anyone point me a way to deal with it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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] Can I send an array as a parameter?
I'm trying to define some routes to call a specific action that takes an array as a parameter. For example: "Name": url:/Reports/Name param: { module: Reports, action: run, reportName: Reports/ ServiceName,reportFilename: test.csv, reportParams:{region:UK} } This triggers the following message: Warning: urldecode() expects parameter 1 to be string, array given in C:\websites\website1\lib\symfony\routing\sfRoute.class.php on line 712 This goes away when I remove the reportParams:{region:UK} part. Is it not possible to specify an array as an argument in the routing file? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: How to know if memcache is caching
you can telnet to the host and port and perform stats there There's a good article here: http://lzone.de/articles/memcached.htm Cheers, Alvaro On Apr 28, 2009, at 4:27 PM, gimler wrote: > > there is a memcache.php in the pecl package that display a nice stat. > > greetings > Gimler > > On Apr 27, 10:36 pm, meppum wrote: >> don't forget to also clear your eAccelerator cache (if you use it). >> >> On Apr 27, 4:31 pm, Jacob Coby wrote: >> >>> A couple more options: >> >>> Start memcached in debug mode and watch the output as keys are set >>> and >>> retrieved. >> >>> Connect to memcached using telnet (telnet localhost 11211) and type >>> 'stats' to get some stats about the # of keys, memory used, etc. Do >>> that a couple of times and see if the numbers change. >> >>> Also, did you clear your config cache when you enabled memcache on >>> production? >> >>> On Apr 27, 2009, at 4:20 PM, meppum wrote: >> a few things to check: >> settings.yml - make sure cache: on is set under the .prod factories.yml - make sure view_cache is uncommented and set correctly (class: sfMemcacheCache, etc) cache.yml - make sure the cache.yml file exists for the module you are trying to cache. >> On Apr 27, 12:35 pm, HiDDeN wrote: > How would I know if memcache is caching? >> > I have configured mycachethrough memcache (using the > sfMemcacheCache > class in factories.yml), and in my development server it's > noticeable > that it's caching (because it's fast), but in my production > server is > not as fast, it seems to be processing the action each time it's > called. >> > So... how could I know it? I know the getExtendedStats gives this > information, but as Symfony doescachetransparently from the > user, I > don't know how can I get the memcache identifier that Symfony is > using... >> > Anyone knows? >> >>> -- >>> Jacob Coby > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, 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: How to know if memcache is caching
there is a memcache.php in the pecl package that display a nice stat. greetings Gimler On Apr 27, 10:36 pm, meppum wrote: > don't forget to also clear your eAccelerator cache (if you use it). > > On Apr 27, 4:31 pm, Jacob Coby wrote: > > > A couple more options: > > > Start memcached in debug mode and watch the output as keys are set and > > retrieved. > > > Connect to memcached using telnet (telnet localhost 11211) and type > > 'stats' to get some stats about the # of keys, memory used, etc. Do > > that a couple of times and see if the numbers change. > > > Also, did you clear your config cache when you enabled memcache on > > production? > > > On Apr 27, 2009, at 4:20 PM, meppum wrote: > > > > a few things to check: > > > > settings.yml - make sure cache: on is set under the .prod > > > factories.yml - make sure view_cache is uncommented and set correctly > > > (class: sfMemcacheCache, etc) > > > cache.yml - make sure the cache.yml file exists for the module you are > > > trying to cache. > > > > On Apr 27, 12:35 pm, HiDDeN wrote: > > >> How would I know if memcache is caching? > > > >> I have configured mycachethrough memcache (using the sfMemcacheCache > > >> class in factories.yml), and in my development server it's noticeable > > >> that it's caching (because it's fast), but in my production server is > > >> not as fast, it seems to be processing the action each time it's > > >> called. > > > >> So... how could I know it? I know the getExtendedStats gives this > > >> information, but as Symfony doescachetransparently from the user, I > > >> don't know how can I get the memcache identifier that Symfony is > > >> using... > > > >> Anyone knows? > > > -- > > Jacob Coby --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~--~~~~--~~--~--~---