Transaction in cakephp is just for one table?
Hi, I am confused by cakephp transaction. Assume I have two tables like User, Product. When I start the transation, the code looks like, $this-User-begin() ... $this-User-commit() The question is, if any code between the above two lines failed to update/insert row in table Product, does it rollback? Does $this-User- begin() mean we just start the transation on table User? I'd appreciate your help very much. Thanks, Bo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Transaction in cakephp is just for one table?
Hi, There is also a function rollback($model). make check with your all queries if any of them get fails then rollback() it and begin transaction again. you can also modify rollback() function accordingly if it needs always. Thanks, Anuj Chauhan. On Wed, Sep 10, 2008 at 11:42 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am confused by cakephp transaction. Assume I have two tables like User, Product. When I start the transation, the code looks like, $this-User-begin() ... $this-User-commit() The question is, if any code between the above two lines failed to update/insert row in table Product, does it rollback? Does $this-User- begin() mean we just start the transation on table User? I'd appreciate your help very much. Thanks, Bo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Model find() and a BETWEEN clause
It is a bit different from your example but here is how I use between: $startDateCond = array('Event.start_date' = 'BETWEEN ' . UDAYSTART . ' AND ' . (UDAYSTART + MONTH + MONTH)); The resulting SQL is something like: (`Event`.`start_date` BETWEEN '1218405600' AND '1226181600') which works fine. Cake version is 1.2.0.5427alpha Claudia On Sep 10, 4:32 am, Daniel [EMAIL PROTECTED] wrote: Hello everyone, I'm trying to perform a find operation on my 'event' model in order to retrieve events that fall within a specific date range. I've read the manual on the process to do complex find conditions but thus far I've been unable to get it to generate working SQL code that will accomplish my goal. The following is my find statement (here's to hoping the formatting sticks somewhat) : $events = $this-Event-find('all', array('recursive' = 1, 'conditions' = array( 'User.id' = $currUser['id'], 'or' = array( 'Event.startTime BETWEEN ? AND ?' = array($bottomSearchBound,$topSearchBound), 'Event.endTime BETWEEN ? AND ?' = array($bottomSearchBound,$topSearchBound) ) ) )); The sql it generates (snipped version) is as follows: WHERE `User`.`id` = 7 AND ((`Event`.`startTime BETWEEN ? AND ?` IN ('2008-08-01', '2008-10-01') ) OR (`Event`.`endTime BETWEEN ? AND ?` IN ('2008-08-01', '2008-10-01') )) And the error it generates is: Warning (512): SQL Error: 1054: Unknown column 'Event.startTime BETWEEN ? AND ?' in 'where clause' Obviously the ? token replacement isn't being completed successfully. Any help would be _greatly_ appreciated! - Daniel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Change Auth component will solve hash without salt?
Why do you need to set Security::setHash('sha1') in beforeFilter() function ? CakePHP use sha1 as default encryption. Meanwhile, you can use this In login form : $this-Auth-password($this-data['User']['password']) -- automatically using sha1 with salt. But if you want CakePHP use no .salt. at all, edit : app/config/core.php Just comment the following line : //Configure::write('Security.salt', '78bc27f1b49f17f5c3392e728f789bad78dbeb77'); Okto.Silaban.Net On Wed, Sep 10, 2008 at 12:31 AM, Yodi Aditya [EMAIL PROTECTED] wrote: I have some users table with 2 value , email and password (hash with sha1). Then i using auth component to make login form. To make sure, that auth will using sha1 when hashing password, i'm using : Security::setHash('sha1'); in beforeFilter(). Problem happen when Auth hashing password from password input form. Auth hashing password from input form with sha1 + security.salt. (not pure sha1). It's make different value between password input form and value in password table's with same words, example, clean password is test. hashing output test from Auth is different with sha1 hashing in password table. Make clean value on security.salt will be one bad solution. Cause cakePHP using security.salt not only on Auth, but encrypt cookies too. Then, i try edit cake/libs/controller/components/auth.php. . /** * Hash a password with the application's salt value (as defined with Configure::write('Security.salt'); * * @param string $password Password to hash * @return string Hashed password * @access public */ function password($password) { return Security::hash($password, null, true); --- i change this with false } /** . Problem solved. But still doubt about it. There are another way to make Auth hashing without security.salt ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Transaction in cakephp is just for one table?
Thanks for your reply. Not quit understand what you said. Possible I need something like, CakePHP-begin() //Do some update/modification if (succeed) CakePHP-commit() else CakePHP-rollback() I need the CakePHP-rollback to undo all change regardless of any model I changed. rollback($model) just rollback the change made on this model, am I right? Anuj Chauhan wrote: Hi, There is also a function rollback($model). make check with your all queries if any of them get fails then rollback() it and begin transaction again. you can also modify rollback() function accordingly if it needs always. Thanks, Anuj Chauhan. On Wed, Sep 10, 2008 at 11:42 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am confused by cakephp transaction. Assume I have two tables like User, Product. When I start the transation, the code looks like, $this-User-begin() ... $this-User-commit() The question is, if any code between the above two lines failed to update/insert row in table Product, does it rollback? Does $this-User- begin() mean we just start the transation on table User? I'd appreciate your help very much. Thanks, Bo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with HABTM find
I have the same problem too.. Then how to use this in pagination? Okto.Silaban.Net On Tue, Sep 9, 2008 at 6:48 PM, rob30 [EMAIL PROTECTED] wrote: $this-Conference-bindModel(array( 'hasOne' = array( 'ConferencesSphere', 'FilterSphere' = array( 'className' = 'Sphere', 'foreignKey' = false, 'conditions' = array('FilterSphere.id = ConferencesSphere.sphere_id') ; $this-Conference-bindModel(array( 'hasOne' = array( 'ConferencesInstitution', 'FilterInstitution' = array( 'className' = 'Institution', 'foreignKey' = false, 'conditions' = array('FilterInstitution.id = ConferencesInstitution.institution_id') ; after such temp bind we can find conferences filtered by value of spheres and institutions fields eg $this-Conference-find('all', array('conditions' = array('FilterSphere.name' = 'AJAX', 'FilterInstitution.name' = 'something'), 'recursive' = 0, 'fields' = array('DISTINCT Conference.id', 'Conference.*', 'FilterSphere.name'))); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Transaction in cakephp is just for one table?
yes exactly. On Wed, Sep 10, 2008 at 1:10 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for your reply. Not quit understand what you said. Possible I need something like, CakePHP-begin() //Do some update/modification if (succeed) CakePHP-commit() else CakePHP-rollback() I need the CakePHP-rollback to undo all change regardless of any model I changed. rollback($model) just rollback the change made on this model, am I right? Anuj Chauhan wrote: Hi, There is also a function rollback($model). make check with your all queries if any of them get fails then rollback() it and begin transaction again. you can also modify rollback() function accordingly if it needs always. Thanks, Anuj Chauhan. On Wed, Sep 10, 2008 at 11:42 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am confused by cakephp transaction. Assume I have two tables like User, Product. When I start the transation, the code looks like, $this-User-begin() ... $this-User-commit() The question is, if any code between the above two lines failed to update/insert row in table Product, does it rollback? Does $this-User- begin() mean we just start the transation on table User? I'd appreciate your help very much. Thanks, Bo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake and oracle (Call to undefined method DboOracle::fetchResult())
you should use the SVN version (the brnaches one) or the nightly HTH, -- Marcin Domanski http://kabturek.info On Tue, Sep 9, 2008 at 9:42 PM, Anthony Smith [EMAIL PROTECTED] wrote: I was following along a cake tutorial and I get this message: Fatal error: Call to undefined method DboOracle::fetchResult() in /usr/ local/apache2-development/htdocs/cake/cake/libs/model/datasources/ dbo_source.php on line 345 A google search produced this: https://trac.cakephp.org/ticket/5038 I am using cake_1.2.0.7296-rc2 Should I be using another version? I know that cake supports oracle, but are there other people that use oracle and cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Bakery Plan
I would like a Death-by-chocolate cake. Brownies are also strongly appreciated! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Donkeybob Gesendet: Dienstag, 9. September 2008 19:25 An: CakePHP Betreff: Re: Bakery Plan can we still talk about chocolate cakes? On Sep 9, 12:19 pm, mark_story [EMAIL PROTECTED] wrote: On Sep 9, 12:28 am, Navin [EMAIL PROTECTED] wrote: Hi, My Name is Navin from a business family doing bakery business,, I am looking for expansion of my business. Any experirnced inthis business Advice... I think you came to the wrong place unfortunately. This is a mailing list about CakePHP a programming framework for building websites and webapplications in PHP. It really has little to do with actual baking outside of jokes and references to people as bakers. Sorry -Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Caching help
Hi Kenchu, I'm almost sure this is a hack, but it's been working fine for me so far. If you want your variables to persist in the cached views, set them like this: $this-data['variableName'] = 'variableValue'; You can have a look at the created cached files in the tmp directory to see what Cake is doing. At the very top, there's a list of variables which are persistent for that cache. On Sep 9, 2:27 pm, Kenchu [EMAIL PROTECTED] wrote: http://book.cakephp.org/view/347/Marking-N...ontent-in-Views In the link above they've got a cached page, but still within the cake:nocache tags they access a variable called $newProducts. How is that possible? I've been trying to use the $this-set([...]) function in the action, beforeFilter and in the __construct, but none of them worked. Neither the action im caching or beforeFilter would run. Why putting it in the construct didnt work I dont know. So how do you send data to a nocache tag within a cached page? I also wonder if it's possible to keep acachefor a whole day without it being updated, even though new posts and updates occur in the database. According to: http://book.cakephp.org/view/348/Clearing-the-Cache thecacheis cleared for this. I don't want it to be. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Bakery Plan
i love cheesecake! http://www.instructables.com/id/Cheesecake/ Check out other cake instructables (most of them - very easy to make ;) : http://www.instructables.com/tag/type:id/category:food/keyword:cake/ Of course some people have the best cake ;) http://debuggable.com/posts/workshop-day-2:48c51df7-4fd4-4906-8b1f-6ed64834cda3 -- Marcin Domanski http://kabturek.info On Wed, Sep 10, 2008 at 10:30 AM, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would like a Death-by-chocolate cake. Brownies are also strongly appreciated! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Donkeybob Gesendet: Dienstag, 9. September 2008 19:25 An: CakePHP Betreff: Re: Bakery Plan can we still talk about chocolate cakes? On Sep 9, 12:19 pm, mark_story [EMAIL PROTECTED] wrote: On Sep 9, 12:28 am, Navin [EMAIL PROTECTED] wrote: Hi, My Name is Navin from a business family doing bakery business,, I am looking for expansion of my business. Any experirnced inthis business Advice... I think you came to the wrong place unfortunately. This is a mailing list about CakePHP a programming framework for building websites and webapplications in PHP. It really has little to do with actual baking outside of jokes and references to people as bakers. Sorry -Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP 1.2: Layout and views design issue
Hi there, I would like to ask 2 questions, both regarding the layout and views. a) After installing cake 1.2 and accessing my localhost domain, I get to see the cake info page and everything works fine. If i access a url that is lacking the underlying controller or view, I get to see cake's error message about the corresponding view file missing etc. When I create my own template under /app/views/layout/default.ctp, it all works fine but whenever I hit invalid urls (as above) nothing happens (i.e. i still get to see my default template but without the error messages). I read somewhere that by overriding the default.ctp layout file, you are effectively changing every page that cake would render, so perhaps I'm missing some variables in my layout? (e.g $content_for_layout, $title_for_layout etc?) b) I have been given all the templates for an application by a web designer. Let's say that the default layout consists of a header, a menu, the 'main body' and a footer. What is the correct approach for breaking this down in cake ? I assume that my default layout should contain the common elements that are always present (i.e header, menu, footer), and all other views will be rendered within the 'main body' section of the layout. However if this is the case, it would mean that the actual layout, in the header section should also contain code like: if(session) print hello $user else show login link. This somehow feels wrong. Should i have code like that in my layout ? What is the best practice for using a default template and some views? thanks a lot, jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Organization of view in subdirectory
Hi I have this question. I have my web application with many and many subdirectory in the views directory. Is it possible to organizate these subdirectory together in a minor number of directory? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Organization of view in subdirectory
Hi MArco, Is it possible to organizate these subdirectory together in a minor number of directory? You can use $this-viewPath to set a custom directory from the one the controller you are using would expect. http://api.cakephp.org/class_controller.html#2e7373d4aaed7b64c974072e7f2a52f9 hth jon -- jon bennett w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP 1.2: Layout and views design issue
I'll answer b) /app/views/layouts/default.ctp: html head title?php echo $title_for_layout; ?/title /head body div id='header' header markup goes here /div div id='menu' menu markup goes here /div div class='content' ?php echo $content_for_layout; ? /div div id='footer' markup for footer /div /body /html if(session) print hello $user else show login link. That's correct :-) Why do you not think this should go in the layout? You could paste the code into an element (note, i'm using your pseudocode here, check out the manual on the Auth component for some real code): /app/views/element/session_links.ctp: if(session) print hello $user else show login link. and in your layout: ?php echo $this-render(session_links); ? On Sep 10, 10:19 am, jkritikos [EMAIL PROTECTED] wrote: Hi there, I would like to ask 2 questions, both regarding the layout and views. a) After installing cake 1.2 and accessing my localhost domain, I get to see the cake info page and everything works fine. If i access a url that is lacking the underlying controller or view, I get to see cake's error message about the corresponding view file missing etc. When I create my own template under /app/views/layout/default.ctp, it all works fine but whenever I hit invalid urls (as above) nothing happens (i.e. i still get to see my default template but without the error messages). I read somewhere that by overriding the default.ctp layout file, you are effectively changing every page that cake would render, so perhaps I'm missing some variables in my layout? (e.g $content_for_layout, $title_for_layout etc?) b) I have been given all the templates for an application by a web designer. Let's say that the default layout consists of a header, a menu, the 'main body' and a footer. What is the correct approach for breaking this down in cake ? I assume that my default layout should contain the common elements that are always present (i.e header, menu, footer), and all other views will be rendered within the 'main body' section of the layout. However if this is the case, it would mean that the actual layout, in the header section should also contain code like: if(session) print hello $user else show login link. This somehow feels wrong. Should i have code like that in my layout ? What is the best practice for using a default template and some views? thanks a lot, jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need help on Install
First off read this: http://en.wikipedia.org/wiki/Example.com Example.com is a test domain that you cannot use ;-) On Sep 10, 4:09 am, Jerry Ross [EMAIL PROTECTED] wrote: Ooopps! It was a false positive. What I actually accidentally got up and running washttp://myexample.com http://www.example.com and http://www.example.com/cake_1.1.19.6305/ are still not working. However, on the positive side, http://localhost/cake_1.1.19.6305/ is working and I have a CAKE RAPID DEVELOPMENT screen telling me It found my database config file and that cake is able to connect to my database. But can someone tell me what I am supposed to see whenhttp://www.example.comstarts to work? All I get is this: You have reached this web page by typing example.com, example.net, or example.org into your web browser. These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3. I am supposing that was NOT what I was suposed to get. Any suggestions? Pittore - Original Message - From: Jerry Ross [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 7:57 PM Subject: Re: Need help on Install Thanks for all your help...I now have example.com up and running and it looks good. Now onto programming. Pittore - Original Message - From: Donkeybob [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 6:48 AM Subject: Re: Need help on Install one word . . . .xampp. for xp, it is the beez kneez . . . set up is easy and everything is done for you. apache, mysql, php . . . .then edit the httpd.conf to add a virtual host. i run many development sites from this configuration On Sep 8, 8:09 pm, Pittore [EMAIL PROTECTED] wrote: I have apache2 up and running on my Windows XP Pro laptop I have established the following directory structure: Apache2 htdocs cake When I typehttp://www.example.com/cakeorhttp://www.example.com/ I get Page not found some kind soul sent me these suggestions: 1. Create a simple static VirtualHost under Apache based on the simplehost example configuration file C:\www\Apache22\conf\extra\vhosts\_static\simplehost.com.conf a. Resave file as mydomain.com.conf, in the same folder, to duplicate it. b. Update all occurrences of 'simplehost.com' to 'mydomain.com' within. c. Create folder C:\www\Apache22\conf\extra\vhosts\_static\mydomain.com \ d. Create folder C:\www\vhosts\_static\mydomain.com\ to be used as the container for this VirtualHost. e. Create log folder C:\Apache22\logs\mydomain.com\ 2. Unpack cakephp as folder C:\www\vhosts\_static\mydomain.com\cake\ 3. Modify this VirtualHost's configuration [mydomain.com.conf] and change DocumentRoot from... DocumentRoot C:/www/vhosts/_static/mydomain.com To... DocumentRoot C:/www/vhosts/_static/mydomain.com/cake/app/webroot 4. Restart Apache. However, I am stuck on step 1a and b...I don't know where to find the file: 'simplehost.com' any suggestions? Help...I have been trying to configure cake now for 4 days am getting frustrated. -- Pittore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: biggner of cake php
On Sep 9, 11:26 pm, Kenchu [EMAIL PROTECTED] wrote: Id recommend buying a book. I fully agree with Kenchu. I went through the online tutorials and while they gave a good overview of how CakePHP worked I didn't really learn much. I'm now working through Beginning CakePHP From Novice to Professional 2008 I already know and understand tons more. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Trying to use Auth + Acl...
Hi, I'm trying to use Auth Component and Acl Component and Acl Behavior like that: 1) App_controller: public $components('Auth','Acl'); public beforeFilter() { $this-Auth-userModel = 'User'; $this-Auth-fields = array('username' = 'pseudo', 'password' = 'password'); $this-Auth-loginAction = 'users/login'; $this-Auth-loginRedirect = 'profil/mes-infos'; $this-Auth-logoutRedirect = '/'; $this-Auth-authorize = 'actions'; $this-Auth-loginError = __('Identifiant ou mot de passe incorrect.', true); $this-Auth-authError = __('Vous n\'avez pas accès à cette page. Veuillez vous identifier.', true); $this-Auth-autoRedirect = true; } 2) App_model: public $actsAs = array ( 'Acl' = array('type' = 'controlled'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { return null; } 3) User model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) } public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['User']['group_id']) { return null; } else { return array('Group' = array('id' = $data['User'] ['group_id'])); } } 4) Group model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['Group']['id']) { return null; } else { return array('Group' = array('id' = $data['Group']['id'])); } } 5) ExpertsController: public function beforeFilter() { parent::beforeFilter(); $this-Auth-allowedActions = array('index'); } public function index() {} So when I request http://www.mywebsite/experts;, I can't access to index() view, there is a infinite loop??! And if I request a protected action (e.g. http://www.mywebsite/ experts/add, I'm never redirected to login page, there is a infinite loop too??! Do I something wrong in this basic usage of Auth + Acl? Thank's by advance for any suggestions! BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: find() and deeper associations
Just to clarify, the solution works for any association, we just use hasOne to trick cake into building a JOIN query, but as you see in the example we are using models from hasMany and HABTM. On Sep 9, 1:21 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Sorry, I didn't mention that I use cakephp 1.1! I've read the post on teknoids blog. The disadvantage is, that this solution only works for hasOne associations and not for hasMany. But: I used the idea mentioned there and tried to create a LEFT JOIN in the sql-query. I found out, that this is possible with the 'finderQuery' value. My new associations in PostModel: var $hasMany = array( 'Comment' = array( 'className' = 'Comment', 'conditions' = '', 'foreignKey' = 'post_id', 'finderQuery' = ' SELECT * FROM comments LEFT JOIN users ON (users.id = comments.user_id) WHERE comments.post_id IN ({$__cakeID__$})' ) ); return: array( 'Post' = array(...), 'Comment' = array( 'User' = array(...) ) ) This works for me in 1.1 (don't know, if this is also possible in 1.2) Thanks for your help! derlippe On 9 Sep., 17:24, Bernhard J. M. Grün [EMAIL PROTECTED] wrote: Hi, This should be solvable with with Containable behavior. Or - if you want to do this with just one query - use the infos you can find in teknoids blog:http://teknoid.wordpress.com/2008/07/17/forcing-an-sql-join-in-cakephp/ Those infos are also present in the manual for 1.2. 2008/9/9 [EMAIL PROTECTED] [EMAIL PROTECTED] Hello newsgroup! I have defined the following associations in my models: PostModel: Post _hasMany_ Comments var $hasMany = array( 'Comment' = array( 'className' = 'Comment', 'conditions' = '', 'foreignKey' = 'post_id', ) ); CommentModel: Comment _belongsTo_ User var $belongsTo = array( 'User' = array( 'className' = 'User', 'conditions' = '', 'foreignKey' = 'user_id' ) ); When I use the query $this-Post-find(), cakephp only uses the associations in the PostModel (this is ok). This works for simple requests like $this-Post-find() and it returns the data array: array( 'Post' = array(...), 'Comment' = array(...) ) But is it also possible to include the second association Comment _belongsTo_ User into the query $this-Post-find()? How do I have to define this or other associations in my Post-Model to get a data array like this: array( 'Post' = array(...), 'Comment' = array( 'User' = array(...) ) ) I have tried many possibilities in the Post model... still the same results! The version I used now is a foreach(), which finds all Users for the returned Comments of $this-Post-find(). ...this makes my CakeApp a little bit slow! Any ideas for a faster association? Many thanks for your answers! derlippe --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
PolymorphicBehavior Questions
It doesn't seem to want to let me post comments in the bakery, so..posting this here instead. --- QUESTIONS: Anyway, two questions. One, is this supposed to work in scaffolding? I have Users, which are broken into Employers and Workers. When I view a user, it doesn't pull up any of the related Employer or Worker data...I think I followed this tutorial exactly. Second part, I assume the behavior is supposed to go in app/models? Do I need to import it or anything? I can't even tell if its being included or not, since it doesn't give an error if the model doesn't exist..? RAMBLINGS: I find this (Notes) to be sort of a cryptic example. A better example might be People which could be divided into Students and Teachers for example. Secondly, in this case, I find that Student belongsTo Person makes slightly more sense than hasOne or hasMany, not that this is terribly important.. CODE: // user.php class User extends AppModel { var $name = 'User'; var $actsAs = array('Polymorphic'); var $displayField = 'username'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'Group' = array('className' = 'Group', 'foreignKey' = 'group_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); // *snip* // worker.php class Worker extends AppModel { var $name = 'Worker'; var $displayField = 'last_name'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'foreign_id', 'conditions' = array('User.class' = 'Worker'), 'dependent' = true ) ); // *snip* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Html Helper
I am using cake 1.2 .When i use echo $html-input('FanType/ fantype_name') in my form.it give me the following error Method HtmlHelper::input does not exist [CORE\cake\libs\view \helper.php, line 148].can we use html helper in cake 1.2 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Html Helper
On Sep 10, 2008, at 1:35 AM, nayan wrote: I am using cake 1.2 .When i use echo $html-input('FanType/ fantype_name') in my form.it give me the following error Method HtmlHelper::input does not exist [CORE\cake\libs\view \helper.php, line 148].can we use html helper in cake 1.2 ? Yes, but you use the FormHelper in 1.2 for forms. :) -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Html Helper
yes . . .just as john said . . .its $form-input. On Sep 10, 9:22 am, John David Anderson [EMAIL PROTECTED] wrote: On Sep 10, 2008, at 1:35 AM, nayan wrote: I am using cake 1.2 .When i use echo $html-input('FanType/ fantype_name') in my form.it give me the following error Method HtmlHelper::input does not exist [CORE\cake\libs\view \helper.php, line 148].can we use html helper in cake 1.2 ? Yes, but you use the FormHelper in 1.2 for forms. :) -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Still working on CAKE install uner xampp
1. xampp is up and running so I have apache and myql running services 2. I still struggling to make any sense of CAKE's arcane installation directions I jave gone back to the CAKE manual: 3.2.2 Permissions: /app/tmp directory for a number of different operations. Model descriptions, cached views, and session information are just a few examples.As such, make sure the /app/tmp directory in your cake installation is writable by the web server user. I looked at permissions on xampp and all subdirectories and see it is read only. Assuming this is source of my installation issues, I attempted to uncheck the read only and apply. Nothing changes. Ditto for CAKE directory and its subdirectories. Going to advanced properties doesn't help. I get warnings about some sort of Wizard that will be jeopardized if I allow sharing and went ahead anyway. Apparently these files are attached to a domain and XP will not allow me to change the security and remove the read only status. Any suggestions? Pittore - Original Message - From: RichardAtHome [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Wednesday, September 10, 2008 3:14 AM Subject: Re: Need help on Install First off read this: http://en.wikipedia.org/wiki/Example.com Example.com is a test domain that you cannot use ;-) On Sep 10, 4:09 am, Jerry Ross [EMAIL PROTECTED] wrote: Ooopps! It was a false positive. What I actually accidentally got up and running washttp://myexample.com http://www.example.com and http://www.example.com/cake_1.1.19.6305/ are still not working. However, on the positive side, http://localhost/cake_1.1.19.6305/ is working and I have a CAKE RAPID DEVELOPMENT screen telling me It found my database config file and that cake is able to connect to my database. But can someone tell me what I am supposed to see whenhttp://www.example.comstarts to work? All I get is this: You have reached this web page by typing example.com, example.net, or example.org into your web browser. These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3. I am supposing that was NOT what I was suposed to get. Any suggestions? Pittore - Original Message - From: Jerry Ross [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 7:57 PM Subject: Re: Need help on Install Thanks for all your help...I now have example.com up and running and it looks good. Now onto programming. Pittore - Original Message - From: Donkeybob [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 6:48 AM Subject: Re: Need help on Install one word . . . .xampp. for xp, it is the beez kneez . . . set up is easy and everything is done for you. apache, mysql, php . . . .then edit the httpd.conf to add a virtual host. i run many development sites from this configuration On Sep 8, 8:09 pm, Pittore [EMAIL PROTECTED] wrote: I have apache2 up and running on my Windows XP Pro laptop I have established the following directory structure: Apache2 htdocs cake When I typehttp://www.example.com/cakeorhttp://www.example.com/ I get Page not found some kind soul sent me these suggestions: 1. Create a simple static VirtualHost under Apache based on the simplehost example configuration file C:\www\Apache22\conf\extra\vhosts\_static\simplehost.com.conf a. Resave file as mydomain.com.conf, in the same folder, to duplicate it. b. Update all occurrences of 'simplehost.com' to 'mydomain.com' within. c. Create folder C:\www\Apache22\conf\extra\vhosts\_static\mydomain.com \ d. Create folder C:\www\vhosts\_static\mydomain.com\ to be used as the container for this VirtualHost. e. Create log folder C:\Apache22\logs\mydomain.com\ 2. Unpack cakephp as folder C:\www\vhosts\_static\mydomain.com\cake\ 3. Modify this VirtualHost's configuration [mydomain.com.conf] and change DocumentRoot from... DocumentRoot C:/www/vhosts/_static/mydomain.com To... DocumentRoot C:/www/vhosts/_static/mydomain.com/cake/app/webroot 4. Restart Apache. However, I am stuck on step 1a and b...I don't know where to find the file: 'simplehost.com' any suggestions? Help...I have been trying to configure cake now for 4 days am getting frustrated. -- Pittore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Bakery Plan
Yum... I've been drooling over the looks of this one for a while, haven't taken the time to actually make it yet :D http://smittenkitchen.com/2008/08/chocolate-peanut-butter-cake/ On Sep 10, 3:12 am, Marcin Domanski [EMAIL PROTECTED] wrote: i love cheesecake!http://www.instructables.com/id/Cheesecake/ Check out other cake instructables (most of them - very easy to make ;) :http://www.instructables.com/tag/type:id/category:food/keyword:cake/ Of course some people have the best cake ;)http://debuggable.com/posts/workshop-day-2:48c51df7-4fd4-4906-8b1f-6e... -- Marcin Domanskihttp://kabturek.info On Wed, Sep 10, 2008 at 10:30 AM, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would like a Death-by-chocolate cake. Brownies are also strongly appreciated! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Donkeybob Gesendet: Dienstag, 9. September 2008 19:25 An: CakePHP Betreff: Re: Bakery Plan can we still talk about chocolate cakes? On Sep 9, 12:19 pm, mark_story [EMAIL PROTECTED] wrote: On Sep 9, 12:28 am, Navin [EMAIL PROTECTED] wrote: Hi, My Name is Navin from a business family doing bakery business,, I am looking for expansion of my business. Any experirnced inthis business Advice... I think you came to the wrong place unfortunately. This is a mailing list about CakePHP a programming framework for building websites and webapplications in PHP. It really has little to do with actual baking outside of jokes and references to people as bakers. Sorry -Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need help on Install
Also, replying to RichardAtHome, CAKE's installation instructions tell us to: 3.3.1 Development a.. Just place your cake install inside your web server's document root. For example, assuming your web server's document root is /var/www/html, a development setup would look like this on the filesystem: a.. /var/www/html Also, what is this? It is totally meaningless to me. My web server is apache and has nothing that looks like this on XP. a.. /cake_1_2 a.. /app b.. /cake c.. /docs d.. /index.php e.. /vendors To see your CakePHP application, point your web browser to http://www.example.com/cake_1_2/ If we cannot use http://www.example.com why are they telling us to use it? Pittore - Original Message - From: RichardAtHome [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Wednesday, September 10, 2008 3:14 AM Subject: Re: Need help on Install First off read this: http://en.wikipedia.org/wiki/Example.com Example.com is a test domain that you cannot use ;-) On Sep 10, 4:09 am, Jerry Ross [EMAIL PROTECTED] wrote: Ooopps! It was a false positive. What I actually accidentally got up and running washttp://myexample.com http://www.example.com and http://www.example.com/cake_1.1.19.6305/ are still not working. However, on the positive side, http://localhost/cake_1.1.19.6305/ is working and I have a CAKE RAPID DEVELOPMENT screen telling me It found my database config file and that cake is able to connect to my database. But can someone tell me what I am supposed to see whenhttp://www.example.comstarts to work? All I get is this: You have reached this web page by typing example.com, example.net, or example.org into your web browser. These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3. I am supposing that was NOT what I was suposed to get. Any suggestions? Pittore - Original Message - From: Jerry Ross [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 7:57 PM Subject: Re: Need help on Install Thanks for all your help...I now have example.com up and running and it looks good. Now onto programming. Pittore - Original Message - From: Donkeybob [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 6:48 AM Subject: Re: Need help on Install one word . . . .xampp. for xp, it is the beez kneez . . . set up is easy and everything is done for you. apache, mysql, php . . . .then edit the httpd.conf to add a virtual host. i run many development sites from this configuration On Sep 8, 8:09 pm, Pittore [EMAIL PROTECTED] wrote: I have apache2 up and running on my Windows XP Pro laptop I have established the following directory structure: Apache2 htdocs cake When I typehttp://www.example.com/cakeorhttp://www.example.com/ I get Page not found some kind soul sent me these suggestions: 1. Create a simple static VirtualHost under Apache based on the simplehost example configuration file C:\www\Apache22\conf\extra\vhosts\_static\simplehost.com.conf a. Resave file as mydomain.com.conf, in the same folder, to duplicate it. b. Update all occurrences of 'simplehost.com' to 'mydomain.com' within. c. Create folder C:\www\Apache22\conf\extra\vhosts\_static\mydomain.com \ d. Create folder C:\www\vhosts\_static\mydomain.com\ to be used as the container for this VirtualHost. e. Create log folder C:\Apache22\logs\mydomain.com\ 2. Unpack cakephp as folder C:\www\vhosts\_static\mydomain.com\cake\ 3. Modify this VirtualHost's configuration [mydomain.com.conf] and change DocumentRoot from... DocumentRoot C:/www/vhosts/_static/mydomain.com To... DocumentRoot C:/www/vhosts/_static/mydomain.com/cake/app/webroot 4. Restart Apache. However, I am stuck on step 1a and b...I don't know where to find the file: 'simplehost.com' any suggestions? Help...I have been trying to configure cake now for 4 days am getting frustrated. -- Pittore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Html Helper
Also, forget about using 'FanType/fantype_name'. Although it's still supported, now the correct way to use it is 'FanType.fantype_name'. Regards, Luiz Poleto 2008/9/10 nayan [EMAIL PROTECTED] I am using cake 1.2 .When i use echo $html-input('FanType/ fantype_name') in my form.it give me the following error Method HtmlHelper::input does not exist [CORE\cake\libs\view \helper.php, line 148].can we use html helper in cake 1.2 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Problem with MySQL query
Hello everybody. I'm begginer with CakePHP. The MySQL query is genereting in a wrong way: Query: SELECT `Option`.`id`, `Option`.`menu_id`, `Option`.`parent_id`, `Option`.`page_id`, `Option`.`order`, `Option`.`extension_name`, `Option`.`extension_args`, `Option`.`menu` FROM `fk3_options` AS `Option` WHERE `Option`.`pageid` = 41 LIMIT 1 The problem is in the 'WHERE clause'. The record 'pageid' doesn't exist, instead of it should be 'page_id'. Warning (512): SQL Error: 1054: Unknown column 'Option.pageid' in 'where clause' [ROOT/system/cake/libs/model/datasources/ dbo_source.php, line 440] There is no problem on localhost, but it is on the external server :(. Please help me if you can. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How do I catch autoComplete input control contents being cleared?
Hi there, first time posting to this list I think, but I have read many great answers on this list while working with CakePHP, so thanks are due to all those who help others out here. I expect this is something really easy, but I can't find the answer... When using the $ajax-autoComplete input, is there an event I can catch for when the user clears the input and therefore no drop down is displayed or deletes a few characters so that a once selected record isn't any longer? At the moment, when the user selects an auto-complete record I update a div with extra details of that record through the afterUpdateElement event, but I haven't been able to find the trigger for then clearing that div. Thanks in advance for any help. Ian IMiJ Software http://www.imijsoft.com http://www.ianmjones.net (blog) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = ‘Items’; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = ‘Item’; } ? 7) i visitedhttp://localhost/todo/itemsto see a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
AW: Still working on CAKE install uner xampp
Hi, I think you are faring quite well at the moment. If you want to see your website under a real domain name you have to set up a DNS server, or get your page registered with one. However so long as you are just developing with it, don't bother with it. It will work as soon as your files are transferred to their final destination at your provider. Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Jerry Ross Gesendet: Mittwoch, 10. September 2008 15:58 An: cake-php@googlegroups.com Betreff: Still working on CAKE install uner xampp 1. xampp is up and running so I have apache and myql running services 2. I still struggling to make any sense of CAKE's arcane installation directions I jave gone back to the CAKE manual: 3.2.2 Permissions: /app/tmp directory for a number of different operations. Model descriptions, cached views, and session information are just a few examples.As such, make sure the /app/tmp directory in your cake installation is writable by the web server user. I looked at permissions on xampp and all subdirectories and see it is read only. Assuming this is source of my installation issues, I attempted to uncheck the read only and apply. Nothing changes. Ditto for CAKE directory and its subdirectories. Going to advanced properties doesn't help. I get warnings about some sort of Wizard that will be jeopardized if I allow sharing and went ahead anyway. Apparently these files are attached to a domain and XP will not allow me to change the security and remove the read only status. Any suggestions? Pittore - Original Message - From: RichardAtHome [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Wednesday, September 10, 2008 3:14 AM Subject: Re: Need help on Install First off read this: http://en.wikipedia.org/wiki/Example.com Example.com is a test domain that you cannot use ;-) On Sep 10, 4:09 am, Jerry Ross [EMAIL PROTECTED] wrote: Ooopps! It was a false positive. What I actually accidentally got up and running washttp://myexample.com http://www.example.com and http://www.example.com/cake_1.1.19.6305/ are still not working. However, on the positive side, http://localhost/cake_1.1.19.6305/ is working and I have a CAKE RAPID DEVELOPMENT screen telling me It found my database config file and that cake is able to connect to my database. But can someone tell me what I am supposed to see whenhttp://www.example.comstarts to work? All I get is this: You have reached this web page by typing example.com, example.net, or example.org into your web browser. These domain names are reserved for use in documentation and are not available for registration. See RFC 2606, Section 3. I am supposing that was NOT what I was suposed to get. Any suggestions? Pittore - Original Message - From: Jerry Ross [EMAIL PROTECTED] To: cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 7:57 PM Subject: Re: Need help on Install Thanks for all your help...I now have example.com up and running and it looks good. Now onto programming. Pittore - Original Message - From: Donkeybob [EMAIL PROTECTED] To: CakePHP cake-php@googlegroups.com Sent: Tuesday, September 09, 2008 6:48 AM Subject: Re: Need help on Install one word . . . .xampp. for xp, it is the beez kneez . . . set up is easy and everything is done for you. apache, mysql, php . . . .then edit the httpd.conf to add a virtual host. i run many development sites from this configuration On Sep 8, 8:09 pm, Pittore [EMAIL PROTECTED] wrote: I have apache2 up and running on my Windows XP Pro laptop I have established the following directory structure: Apache2 htdocs cake When I typehttp://www.example.com/cakeorhttp://www.example.com/ I get Page not found some kind soul sent me these suggestions: 1. Create a simple static VirtualHost under Apache based on the simplehost example configuration file C:\www\Apache22\conf\extra\vhosts\_static\simplehost.com.conf a. Resave file as mydomain.com.conf, in the same folder, to duplicate it. b. Update all occurrences of 'simplehost.com' to 'mydomain.com' within. c. Create folder C:\www\Apache22\conf\extra\vhosts\_static\mydomain.com \ d. Create folder C:\www\vhosts\_static\mydomain.com\ to be used as the container for this VirtualHost. e. Create log folder C:\Apache22\logs\mydomain.com\ 2. Unpack cakephp as folder C:\www\vhosts\_static\mydomain.com\cake\ 3. Modify this VirtualHost's configuration [mydomain.com.conf] and change DocumentRoot from... DocumentRoot C:/www/vhosts/_static/mydomain.com To... DocumentRoot C:/www/vhosts/_static/mydomain.com/cake/app/webroot 4. Restart Apache. However, I am stuck on step 1a and b...I don't know where to find the file: 'simplehost.com' any suggestions? Help...I have been trying to configure cake now for 4 days am
Re: Missing Database Table
Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemsto see a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How do I catch autoComplete input control contents being cleared?
Hey Ian, I'm guessing that it's more of a Javascript thing you're looking for. I'm assuming that the JS that is produced to trigger the AJAX call for the afterUpdateElement does not check for empty but it could if you have a look at it. Cheers, Gus 2008/9/10 Ian M. Jones [EMAIL PROTECTED]: Hi there, first time posting to this list I think, but I have read many great answers on this list while working with CakePHP, so thanks are due to all those who help others out here. I expect this is something really easy, but I can't find the answer... When using the $ajax-autoComplete input, is there an event I can catch for when the user clears the input and therefore no drop down is displayed or deletes a few characters so that a once selected record isn't any longer? At the moment, when the user selects an auto-complete record I update a div with extra details of that record through the afterUpdateElement event, but I haven't been able to find the trigger for then clearing that div. Thanks in advance for any help. Ian IMiJ Software http://www.imijsoft.com http://www.ianmjones.net (blog) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with MySQL query
Post your query code :-) On Sep 10, 3:17 pm, krzysztofor [EMAIL PROTECTED] wrote: Hello everybody. I'm begginer with CakePHP. The MySQL query is genereting in a wrong way: Query: SELECT `Option`.`id`, `Option`.`menu_id`, `Option`.`parent_id`, `Option`.`page_id`, `Option`.`order`, `Option`.`extension_name`, `Option`.`extension_args`, `Option`.`menu` FROM `fk3_options` AS `Option` WHERE `Option`.`pageid` = 41 LIMIT 1 The problem is in the 'WHERE clause'. The record 'pageid' doesn't exist, instead of it should be 'page_id'. Warning (512): SQL Error: 1054: Unknown column 'Option.pageid' in 'where clause' [ROOT/system/cake/libs/model/datasources/ dbo_source.php, line 440] There is no problem on localhost, but it is on the external server :(. Please help me if you can. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Trying to use Auth + Acl...
Ok, nobody answers... So, one error I've made is to call AuthComponent before AclComponent in $components array ! And another error is to not authorize an action called by a requestAction()... Hope this help! On 10 sep, 14:13, avairet [EMAIL PROTECTED] wrote: Hi, I'm trying to use Auth Component and Acl Component and Acl Behavior like that: 1) App_controller: public $components('Auth','Acl'); public beforeFilter() { $this-Auth-userModel = 'User'; $this-Auth-fields = array('username' = 'pseudo', 'password' = 'password'); $this-Auth-loginAction = 'users/login'; $this-Auth-loginRedirect = 'profil/mes-infos'; $this-Auth-logoutRedirect = '/'; $this-Auth-authorize = 'actions'; $this-Auth-loginError = __('Identifiant ou mot de passe incorrect.', true); $this-Auth-authError = __('Vous n\'avez pas accès à cette page. Veuillez vous identifier.', true); $this-Auth-autoRedirect = true; } 2) App_model: public $actsAs = array ( 'Acl' = array('type' = 'controlled'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { return null; } 3) User model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) } public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['User']['group_id']) { return null; } else { return array('Group' = array('id' = $data['User'] ['group_id'])); } } 4) Group model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['Group']['id']) { return null; } else { return array('Group' = array('id' = $data['Group']['id'])); } } 5) ExpertsController: public function beforeFilter() { parent::beforeFilter(); $this-Auth-allowedActions = array('index'); } public function index() {} So when I request http://www.mywebsite/experts;, I can't access to index() view, there is a infinite loop??! And if I request a protected action (e.g. http://www.mywebsite/ experts/add, I'm never redirected to login page, there is a infinite loop too??! Do I something wrong in this basic usage of Auth + Acl? Thank's by advance for any suggestions! BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Default Date Format
Thats all very well, but i want to set it in $form-input On Sep 9, 7:03 pm, Yodi Aditya [EMAIL PROTECTED] wrote: use date function. in controller. for example, date('Y-m-d H:i:s') On 9/8/08, shabba [EMAIL PROTECTED] wrote: How do you set the default formatting for date. Its set to m-d-y as default, this is great, but when you need user interaction and the standard is d-m-Y. Its really not practical to add formatting to each $form-input, is there a better way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Default Date Format
This example may help: http://book.cakephp.org/view/189/Automagic-Form-Elements echo $form-input('birth_dt', array( 'label' = 'Date of birth' , 'dateFormat' = 'DMY' , 'minYear' = date('Y') - 70 , 'maxYear' = date('Y') - 18 )); On Sep 10, 5:10 pm, shabba [EMAIL PROTECTED] wrote: Thats all very well, but i want to set it in $form-input On Sep 9, 7:03 pm, Yodi Aditya [EMAIL PROTECTED] wrote: use date function. in controller. for example, date('Y-m-d H:i:s') On 9/8/08, shabba [EMAIL PROTECTED] wrote: How do you set the default formatting for date. Its set to m-d-y as default, this is great, but when you need user interaction and the standard is d-m-Y. Its really not practical to add formatting to each $form-input, is there a better way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Bakery Plan
I think my point has been proven :) But I too love cheescake, and ice cream cake which is the emperor if all cakes! -Mark On Sep 10, 10:01 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yum... I've been drooling over the looks of this one for a while, haven't taken the time to actually make it yet :Dhttp://smittenkitchen.com/2008/08/chocolate-peanut-butter-cake/ On Sep 10, 3:12 am, Marcin Domanski [EMAIL PROTECTED] wrote: i love cheesecake!http://www.instructables.com/id/Cheesecake/ Check out other cake instructables (most of them - very easy to make ;) :http://www.instructables.com/tag/type:id/category:food/keyword:cake/ Of course some people have the best cake ;)http://debuggable.com/posts/workshop-day-2:48c51df7-4fd4-4906-8b1f-6e... -- Marcin Domanskihttp://kabturek.info On Wed, Sep 10, 2008 at 10:30 AM, Liebermann, Anja Carolin [EMAIL PROTECTED] wrote: I would like a Death-by-chocolate cake. Brownies are also strongly appreciated! Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von Donkeybob Gesendet: Dienstag, 9. September 2008 19:25 An: CakePHP Betreff: Re: Bakery Plan can we still talk about chocolate cakes? On Sep 9, 12:19 pm, mark_story [EMAIL PROTECTED] wrote: On Sep 9, 12:28 am, Navin [EMAIL PROTECTED] wrote: Hi, My Name is Navin from a business family doing bakery business,, I am looking for expansion of my business. Any experirnced inthis business Advice... I think you came to the wrong place unfortunately. This is a mailing list about CakePHP a programming framework for building websites and webapplications in PHP. It really has little to do with actual baking outside of jokes and references to people as bakers. Sorry -Mark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: PolymorphicBehavior Questions
Scaffolding will not use any behaviors. It uses table schema's to generate the forms. You would need to bake and edit the files manually. Behaviors go in app/model/behaviors And you need to be using 1.2 for behaviors to work at all. -Mark On Sep 10, 3:23 am, Mark [EMAIL PROTECTED] wrote: It doesn't seem to want to let me post comments in the bakery, so..posting this here instead. --- QUESTIONS: Anyway, two questions. One, is this supposed to work in scaffolding? I have Users, which are broken into Employers and Workers. When I view a user, it doesn't pull up any of the related Employer or Worker data...I think I followed this tutorial exactly. Second part, I assume the behavior is supposed to go in app/models? Do I need to import it or anything? I can't even tell if its being included or not, since it doesn't give an error if the model doesn't exist..? RAMBLINGS: I find this (Notes) to be sort of a cryptic example. A better example might be People which could be divided into Students and Teachers for example. Secondly, in this case, I find that Student belongsTo Person makes slightly more sense than hasOne or hasMany, not that this is terribly important.. CODE: // user.php class User extends AppModel { var $name = 'User'; var $actsAs = array('Polymorphic'); var $displayField = 'username'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'Group' = array('className' = 'Group', 'foreignKey' = 'group_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); // *snip* // worker.php class Worker extends AppModel { var $name = 'Worker'; var $displayField = 'last_name'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'foreign_id', 'conditions' = array('User.class' = 'Worker'), 'dependent' = true ) ); // *snip* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Getting all (*) fields with Containable?
Hi, I want to contain() certain Models and get all their fields, rather than explicitly mention every field. For example, the example in the cookbook: 1. $this-Post-contain('Comment.author'); I want to do something like $this-Post-contain('Comment.*') so that I can be picky in some models and indiscriminate in others... Anyway to do this? Thanks all... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Getting all (*) fields with Containable?
$this-Post-contain('Comment') the_woodsman wrote: Hi, I want to contain() certain Models and get all their fields, rather than explicitly mention every field. For example, the example in the cookbook: 1. $this-Post-contain('Comment.author'); I want to do something like $this-Post-contain('Comment.*') so that I can be picky in some models and indiscriminate in others... -- -MI *Ninja Developer* @ CRICAVA Technologies http://www.cricava.com *Blog*: http://www.marianoiglesias.com.ar *Twitter*: http://twitter.com/mgiglesias *LinkedIn*: http://www.linkedin.com/pub/2/483/B94 *Facebook*: http://facebook.com/people/Mariano_Iglesias/646886921 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstosee a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: bakery not taking comments?
I have the same problem. For example I want to know How I can import from memory images with TCPDF, for example an image generated by JPGRAPH ,in FPDF is possible. I try to leave a question but it's impossible. qwanta ha escrito: Not sure if this is the best place to report this, but I couldn't find any contact info for the bakery. Basically, it seems like comments cannot be left for articles at the bakery. There is some problem with the title validation as it reports a blank field even when there is text in there. I was trying to leave a comment/question for Kalileo's Creating PDF files with CakePHP and TCPDF article. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Validation for saveAll not returning messages
Hello, I'm trying to use saveAll to save multiple records of a model in one form. Everything works fine as far as saving and validation goes except for one little problem. If the data entered does not validate, the validationErrors array that is returned does not contain the fields or the error messages for the fields that did not validate. Here is an example setup (same as http://teknoid.wordpress.com/2008/08/04/practical-use-of-saveall-part-2-notes-and-tips/): view echo $form-create(); echo $form-input('0.name'); echo $form-input('0.username'); echo $form-input('0.email'); echo $form-input('0.company_id', array('type'='hidden', 'value'=1)); echo $form-input('1.name'); echo $form-input('1.username'); echo $form-input('1.email'); echo $form-input('1.company_id', array('type'='hidden', 'value'=1)); echo $form-end('Add'); controller function add() { if(!empty($this-data)) { $this-Account-saveAll($this-data['Account'], array('validate'='first')); } } If I try to submit the form without entering a username for either (or entering one that is not alphanumeric), the form does not validate, but it does not show any errors. When I print out $this-Account- validationErrors I get the following array: Array ( [0] = Array ( ) [1] = Array ( ) ) So it knows that entry 0 and 1 did not validate, but it doesn't return the error messages or fields. Has anyone encountered this problem, or perhaps know a fix. I created a work around for now, but it would be nice if saveAll would display the errors. If I do this method it works fine: foreach($this-data['Account'] as $k = $v) { $this-Account-set($v); if(!$this-Account-validates()) { $errors[$k] = $this-Account-validationErrors; } } if(empty($errors)) { // All records have validated, it is safe to save $this-Account-saveAll($this-data['Account']); } else { $this-Account-validationErrors = $errors; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: PolymorphicBehavior Questions
Oops, that's what I meant to say (apps/models/behaviors). And yes, I'm using 1.2. Thanks again Mark (IRC?), for the tip :) Mark On Sep 10, 9:44 am, mark_story [EMAIL PROTECTED] wrote: Scaffolding will not use any behaviors. It uses table schema's to generate the forms. You would need to bake and edit the files manually. Behaviors go in app/model/behaviors And you need to be using 1.2 for behaviors to work at all. -Mark On Sep 10, 3:23 am, Mark [EMAIL PROTECTED] wrote: It doesn't seem to want to let me post comments in the bakery, so..posting this here instead. --- QUESTIONS: Anyway, two questions. One, is this supposed to work in scaffolding? I have Users, which are broken into Employers and Workers. When I view a user, it doesn't pull up any of the related Employer or Worker data...I think I followed this tutorial exactly. Second part, I assume the behavior is supposed to go in app/models? Do I need to import it or anything? I can't even tell if its being included or not, since it doesn't give an error if the model doesn't exist..? RAMBLINGS: I find this (Notes) to be sort of a cryptic example. A better example might be People which could be divided into Students and Teachers for example. Secondly, in this case, I find that Student belongsTo Person makes slightly more sense than hasOne or hasMany, not that this is terribly important.. CODE: // user.php class User extends AppModel { var $name = 'User'; var $actsAs = array('Polymorphic'); var $displayField = 'username'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'Group' = array('className' = 'Group', 'foreignKey' = 'group_id', 'conditions' = '', 'fields' = '', 'order' = '' ) ); // *snip* // worker.php class Worker extends AppModel { var $name = 'Worker'; var $displayField = 'last_name'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $hasMany = array( 'User' = array( 'className' = 'User', 'foreignKey' = 'foreign_id', 'conditions' = array('User.class' = 'Worker'), 'dependent' = true ) ); // *snip* --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
In the app/config/core.php do you have the debug set to 0 or 1 if it is set to zero set it to 1,2, or 3 as this will keep refreshing your cache. From what I have learned in the short time I been learning Cake the cache doesn't refresh as much will in production mode (debug set to 0) to help speed up the app. On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
Why is that a problem? It works exactly as it should... If you do not wish to cache your models, you can disable it in core.php (you shouldn't disable cache in production). On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.php this line uncomment this Configure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstosee a nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Still working on CAKE install uner xampp
When any site tells you to go to www.example.com www.example.net www.example.org or example.com and so on they are telling to go to what ever your domain is if the server is live on the net your to what ever your IP address is for the server if on a network or Localhost if its on the computer your using to create the website. example.com is a domain set for you can put a site address in examples without link to real life sites. When you typed www.example.com and displayed a message you should of seen the link: See RFC 2606, Section 3. click on that link and read it or just just go straight to the page from here - http://www.rfc-editor.org/rfc/rfc2606.txt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Missing Database Table
In the app/config/core.php do you have the debug set to 0 or 1 if it is set to zero set it to 1,2, or 3 as this will keep refreshing your cache. From what I have learned in the short time I been learning Cake the cache doesn't refresh as much will in production mode (debug set to 0) to help speed up the app. Actually i haven't paid attention to what my debug level was. I will check that. Anyway, a change in the database in production is not likely to happen all the time. Regards, Luiz Poleto 2008/9/10 teknoid [EMAIL PROTECTED] Why is that a problem? It works exactly as it should... If you do not wish to cache your models, you can disable it in core.php (you shouldn't disable cache in production). On Sep 10, 2:20 pm, Luiz Poleto [EMAIL PROTECTED] wrote: I've been having a few problems with Cake 1.2.0.7296 RC2 internal cache. If i change something in the database, those changes are not reflected in Cake, what causes a lot of error.Actually nothing to worry too much, since deleting the cache files is solving it. But i'm concerned about how far this problem goes. By the way, does anyone here having problem with that? Best regards, Luiz Poleto 2008/9/10 forrestgump [EMAIL PROTECTED] Luiz Poleto Yea i checked my tables and all they were all perfect i tried the delete the cache solution by bonitarunner, tht did the trickman cake is wierd Thanks a lot guys.saved me a lot of time. On Sep 10, 8:07 pm, Luiz Poleto [EMAIL PROTECTED] wrote: Gump, Is this message correct? Error: Database table itemss for model Items was not found. Look at table name the message show: itemss. If that is the message Cake has shown, then something is not properly configured, like the model class, for example. Regards, Luiz Poleto 2008/9/10 bonitarunner [EMAIL PROTECTED] Gump...Exact same thing happened to me! Very frustrating. I am absolute beginner (following same todo example) but here is what I did to get it to work. 1) Made another database called apress (not cake), then made items table in phpAdmin, put same fields as in example. Finally, changed database.php settings to match to apress database. 2) turned off caching app\config\core.phpthis line uncomment thisConfigure::write('Cache.disable', true); Not sure you need to do this but I did anyway 3) stopped wamp and restarted 4) refreshed todo/items in browser and works perfectly now. No code changes. I also downloaded authors code from book site (exactly the same as mine earlier with your same error). He uses PHP shorthand so make sure your item.php and items_controller.php have ?php instead of ? alone unless you configured server correctly. Rough startbut it works now. I hope it helps you. On Sep 9, 3:39 am, forrestgump [EMAIL PROTECTED] wrote: Hey guys, I'm new to cakephp and can't wait to get it fired up.i was creating a test app...and i followed the following steps: 1) created a database cake 2) placed my cake folder into my www folder and renamed it to todo 3) created a table items in database cake 4) configured my database.php respectively. 5) created an items_controller.php in \www\todo\app\controllers with the following code: ?php class ItemsController extends AppController { var $name = 'Items'; var $scaffold; } ? 6) create an item.php in C:\wamp\www\todo\app\models with the following code: ? class Item extends AppModel { var $name = 'Item'; } ? 7) i visitedhttp://localhost/todo/itemstoseea nice message in red saying: Missing Database Table also i had highlighted with a red background an error saying: Error: Database table itemss for model Items was not found. I have configured and set cakephp properly when i visit localhost/todo i receive confirmation that cakephp is able to connect to database , tmp folder is writable and i have all the css rendered. can someone please help me with this Forrestgump --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Trying to use Auth + Acl...
By looking at your code, I can see that you are defining all of your models to be controlled. Is that a different way to control your objects, being the models to be the ACOs insted of the pairs 'controllers-actions'? Also, I see that you pretend to have groups inside groups, but you are returning a parent that is supossed to be another group, and you are returning the same group... Is that correct? return array('Group' = array('id' = $data['Group']['id'])); On Sep 10, 10:35 am, avairet [EMAIL PROTECTED] wrote: Ok, nobody answers... So, one error I've made is to call AuthComponent before AclComponent in $components array ! And another error is to not authorize an action called by a requestAction()... Hope this help! On 10 sep, 14:13, avairet [EMAIL PROTECTED] wrote: Hi, I'm trying to use Auth Component and Acl Component and Acl Behavior like that: 1) App_controller: public $components('Auth','Acl'); public beforeFilter() { $this-Auth-userModel = 'User'; $this-Auth-fields = array('username' = 'pseudo', 'password' = 'password'); $this-Auth-loginAction = 'users/login'; $this-Auth-loginRedirect = 'profil/mes-infos'; $this-Auth-logoutRedirect = '/'; $this-Auth-authorize = 'actions'; $this-Auth-loginError = __('Identifiant ou mot de passe incorrect.', true); $this-Auth-authError = __('Vous n\'avez pas accès à cette page. Veuillez vous identifier.', true); $this-Auth-autoRedirect = true; } 2) App_model: public $actsAs = array ( 'Acl' = array('type' = 'controlled'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { return null; } 3) User model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) } public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['User']['group_id']) { return null; } else { return array('Group' = array('id' = $data['User'] ['group_id'])); } } 4) Group model: public $actsAs = array ( 'Acl' = array('type'='requester'), 'Containable' = array(true,'notices' = true) ); public function parentNode() { if (!$this-id empty($this-data)) { return null; } $data = $this-data; if (empty($this-data)) { $data = $this-read(); } if (!$data['Group']['id']) { return null; } else { return array('Group' = array('id' = $data['Group']['id'])); } } 5) ExpertsController: public function beforeFilter() { parent::beforeFilter(); $this-Auth-allowedActions = array('index'); } public function index() {} So when I request http://www.mywebsite/experts;, I can't access to index() view, there is a infinite loop??! And if I request a protected action (e.g. http://www.mywebsite/ experts/add, I'm never redirected to login page, there is a infinite loop too??! Do I something wrong in this basic usage of Auth + Acl? Thank's by advance for any suggestions! BR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Caching ACL in Session
Hi! I'm just trying to cache the results of acl's check in the session. I have written a new component, inheriting from DbAcl: class CachedAclComponent extends DbAcl { function check($aro, $aco, $action = *) { return parent::check($aro, $aco, $action); $key = 'CachedAcl.'.$aro.'.'.$aco.'.'.$action; if ($this-Session-check($key)) { return $this-Session-read($key); } else { $result = parent::check($aro, $aco, $action); $this-Session-write($key, $result); return $result; } } } and set in conf/core.php: Configure::write('Acl.classname', 'Cached_Acl'); Acl now uses my check-methode. But there is one thing, that doesn't work: The session! I can't find any way to write to the session in this class. I've tried many things, but nothing worked for me! :-( Bye Marcus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Caching ACL in Session
If i were you i would think how can i use sessions in components ? hmmm let me think... auth component stores info in session - maybe ill look at its source and find out ? not long after i would find mysqlf on one of the greatest resources : The API http://api.cakephp.org/1.2/class_auth_component.html#078aa537197139b444bc51826cfad95e http://api.cakephp.org/1.2/auth_8php-source.html#l00055 HTH, -- Marcin Domanski http://kabturek.info On Wed, Sep 10, 2008 at 10:44 PM, Marcus J. Ertl [EMAIL PROTECTED] wrote: Hi! I'm just trying to cache the results of acl's check in the session. I have written a new component, inheriting from DbAcl: class CachedAclComponent extends DbAcl { function check($aro, $aco, $action = *) { return parent::check($aro, $aco, $action); $key = 'CachedAcl.'.$aro.'.'.$aco.'.'.$action; if ($this-Session-check($key)) { return $this-Session-read($key); } else { $result = parent::check($aro, $aco, $action); $this-Session-write($key, $result); return $result; } } } and set in conf/core.php: Configure::write('Acl.classname', 'Cached_Acl'); Acl now uses my check-methode. But there is one thing, that doesn't work: The session! I can't find any way to write to the session in this class. I've tried many things, but nothing worked for me! :-( Bye Marcus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: XML return type in HABTM queries
Ok ... don't do what I did - if you're passing data to an XML view, MAKE SURE it's in the form of an associative array. He'res the break down of my problem. In my controller, I did $result = $this-Post-Tag-Find. That of course gave me a $result that looked something like: Array ( ['Tag'] [0] = Array ( ... [Post] [0] = Array( ... ) but I only needed the tag stuff in my view so I did $this-set('tag', $result['Tag']). The problem was the data passed to the view wasn't in a associative array any longer, so the XMLHelper couldn't determine what type of XML element it should create. With a little digging thru XMLHelper, XML, and Set I found that, since the find() recursion was set high enough, Set:map() ended thinking the PostTag Tag attribute was the XML element type. In my mind this should have been an error. I certainly caused the issue, but I think map() should understand it's not dealing with an associative array throw an warning/error vs. simply recursing down until it finds a distant associative array. FYI: If you tighten up the recursion so map() never finds an associative array, your XML element will simply be created as stdClass / On Sep 10, 10:30 am, GTM [EMAIL PROTECTED] wrote: Has anyone run across a situation with XML HABTM query results where the XML differs from the std results? I have a Post, Tags scenerio. I'm using a RequestHandler setup so /post/index.xml returns: post id=1 / post id=2 / ... That's good. But when I do a $this-Post-Tags-Find I get: tag id=1 post_tag id=1 / post_tag id=2 / /tag tag id=2 ... I didn't expect the join table to show up. I would expected: tag id=1 post id=1 / post id=2 / ... Seems like the regular array results don't include the join table. Am i mistaken or perhaps missing something here? -GTM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Yorkshire cakers
Anyone in the dewsbury, England, West Yorkshire area who has used cake? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Help with installation cakephp on xamp package
Hi, all. I have been reading a book by APRESS, called 'Beginning CakePHP from novice to Professional' in it, it says that if you have installed cake, and get the starting up screen without the fonts and colours on the page working then, there is an error. Cake will work but the scaffolding and other things might get errors.. I have tried EVERTHING, I have uncommented the 'LoadModule rewrite_module modules/mod_rewrite.so', I have shared (in Vista) the app folder, I have included the following Directory /caketest Options Indexes FollowSymLinks AllowOverride ALL /Directory in the httpd.conf folder... And restarted the server, and it does not seems to fix the problem, I have been going on with CAke and all seems fine, but sometimes I get errors, then I doubt myself, I don't know if it is my configuration or my coding...I would just like to know that everything works the way it is suppose to.. hope is all make sense, and someone can help.. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help with installation cakephp on xamp package
could you post some of the errors you're getting? that could help us, help you. On Sep 10, 7:02 pm, gabriel [EMAIL PROTECTED] wrote: Hi, all. I have been reading a book by APRESS, called 'Beginning CakePHP from novice to Professional' in it, it says that if you have installed cake, and get the starting up screen without the fonts and colours on the page working then, there is an error. Cake will work but the scaffolding and other things might get errors.. I have tried EVERTHING, I have uncommented the 'LoadModule rewrite_module modules/mod_rewrite.so', I have shared (in Vista) the app folder, I have included the following Directory /caketest Options Indexes FollowSymLinks AllowOverride ALL /Directory in the httpd.conf folder... And restarted the server, and it does not seems to fix the problem, I have been going on with CAke and all seems fine, but sometimes I get errors, then I doubt myself, I don't know if it is my configuration or my coding...I would just like to know that everything works the way it is suppose to.. hope is all make sense, and someone can help.. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help with installation cakephp on xamp package
If your not getting any fonts and colors i.e. the CSS and image files are not getting read then you may have forgotten to place the .htaccess file in the /caketest directory. That file and the index.php need to be in the root directory. If this is not the error you will need to further explain your error messages as Donkeybob indicated. --- Brett Wilton http://wiltonsofware.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Need help on Install
If we cannot use http://www.example.com why are they telling us to use it? Take a glance at this link Jerry, http://en.wikipedia.org/wiki/Example.com example.com is reserved for documentation use for this exact purpose i.e. www.itsjustanexample.com --- Brett Wilton http://wiltonsoftware.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Transaction in cakephp is just for one table?
well, is there any way to rollback the whole change on every table? I don't want to call commit/rollback on every model. On Sep 10, 12:54 am, Anuj Chauhan [EMAIL PROTECTED] wrote: yes exactly. On Wed, Sep 10, 2008 at 1:10 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Thanks for your reply. Not quit understand what you said. Possible I need something like, CakePHP-begin() //Do some update/modification if (succeed) CakePHP-commit() else CakePHP-rollback() I need the CakePHP-rollback to undo all change regardless of any model I changed. rollback($model) just rollback the change made on this model, am I right? Anuj Chauhan wrote: Hi, There is also a function rollback($model). make check with your all queries if any of them get fails then rollback() it and begin transaction again. you can also modify rollback() function accordingly if it needs always. Thanks, Anuj Chauhan. On Wed, Sep 10, 2008 at 11:42 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I am confused by cakephp transaction. Assume I have two tables like User, Product. When I start the transation, the code looks like, $this-User-begin() ... $this-User-commit() The question is, if any code between the above two lines failed to update/insert row in table Product, does it rollback? Does $this-User- begin() mean we just start the transation on table User? I'd appreciate your help very much. Thanks, Bo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---