Re: saving hasAndBelongsToMany without form?
To put it more simply: Can someone provide a code snippet with a call to Post-save() whose data is properly structured to save both the Post and one or more Tags with it? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Controllers Linked to model names?
Here's my problem... Is there a way to not have the name of controllers explicitly linked to models? For instance I have a model, called Post, Now for whatever reasons, I need to have the following controllers that have access to the Post model: * post_controller.php * article_controller.php * some_weird_controller.php So, you might at the outset say, why not put article in posts? Yes I know that I could have more methods in post, and I do. However I want article to be outside of posts. Now I also know that by using var $name = Post in my some_weird_controller.php, I can override that behavior, but then I still am forced to put my views in a directory called views/post. What's i'm missing I think, is divorcing completely controller names from model names, and the freedom to use any and multiple models in controllers of any random name. Any help would be greatly appreciated. X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.88.14 with SMTP id l14mr26644cwb; Sat, 20 May 2006 05:21:47 -0700 (PDT) X-Google-Token: sBXuiQwAAADn_D_6yGJxq1rzAXnWiPZv Received: from 68.202.158.37 by j33g2000cwa.googlegroups.com with HTTP; Sat, 20 May 2006 12:21:47 + (UTC) From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Controllers Linked to model names? Date: Sat, 20 May 2006 12:21:47 - Message-ID: [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Here's my problem... Is there a way to not have the name of controllers explicitly linked to models? For instance I have a model, called Post, Now for whatever reasons, I need to have the following controllers that have access to the Post model: * post_controller.php * article_controller.php * some_weird_controller.php So, you might at the outset say, why not put article in posts? Yes I know that I could have more methods in post, and I do. However I want article to be outside of posts. Now I also know that by using var $name = Post in my some_weird_controller.php, I can override that behavior, but then I still am forced to put my views in a directory called views/post. What's i'm missing I think, is divorcing completely controller names from model names, and the freedom to use any and multiple models in controllers of any random name. Any help would be greatly appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Controllers Linked to model names?
Also, shouldn't the name of view directories be the same as controller names, instead of model names? X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.88.14 with SMTP id l14mr26657cwb; Sat, 20 May 2006 05:24:41 -0700 (PDT) X-Google-Token: -nhX_gwYokuHyNxyx7OrRRiOPijn Received: from 68.202.158.37 by j73g2000cwa.googlegroups.com with HTTP; Sat, 20 May 2006 12:24:41 + (UTC) From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: Controllers Linked to model names? Date: Sat, 20 May 2006 12:24:41 - Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Also, shouldn't the name of view directories be the same as controller names, instead of model names? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: pretty URL problem
We had this same sort of problem just a moment ago, and we solved it by adding the questionmark (?) after the index.php like so: http://localhost/index.php?/hellworld/index/ Maybe that might help, along with others advice. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Multi-Step Form
Hi John Sounds like you are well ahead of me :-) I keep expecting to hit some limitation with the PRG pattern each time I do something new (like adding the Cancel functionality), but it continues to surprise me with its flexibility. Regards, Langdon John Zimmerman [gmail] wrote: I am using post-redirect-get pattern. My old solutions does generally the same thing. I am trying to integrate PEAR QuickForm as well. So far it is turning out ok, needs quite a bit of work though. In my solutions every step is basically a quickform (customizable through templates, which I will make a more elegant solutionl ater). When data is submited it is validated at each step. The next button submits the data for that step. After validation I store the data into a session array and redirect via get to the next step (determined by the controller). Beyond what QuickForm does already I am not explicitly storing cancel data. I have however taken care of the resubmit problem by setting a variable at the commit stage that says to clear the session data next time the wizard is loaded. I will see where this takes me the next couple of days. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Can't Fetch data while move codes from 0.10.8 to 1.0
More info? Did you set debug to 2 to show your queries? Is desc working? X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.88.14 with SMTP id l14mr27981cwb; Sat, 20 May 2006 08:41:55 -0700 (PDT) X-Google-Token: rQGUvwwRg7iht8TYF8Lu2B9OJ1uk Received: from 206.206.83.36 by i40g2000cwc.googlegroups.com with HTTP; Sat, 20 May 2006 15:41:55 + (UTC) From: bigdog [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: Can't Fetch data while move codes from 0.10.8 to 1.0 Date: Sat, 20 May 2006 08:41:55 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain More info? Did you set debug to 2 to show your queries? Is desc working? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: automation module
http://groups.google.com/group/cake-php/browse_thread/thread/ff3ad3c9e1e40aab/?hl=en# --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Controllers Linked to model names?
The name of view directories are the same as the controller names, e.g. if your controller is called posts_controller.php, the views directory is views/posts. You can use in a controller as many models as you want with var $uses = array('Model1', 'Model2', 'Model3'); -- Daniel Hofstetter http://cakebaker.wordpress.com X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr82622cwa; Sat, 20 May 2006 06:42:17 -0700 (PDT) X-Google-Token: mmtSeAwAAAC1GSQa43L6nikbHPzUAz88 Received: from 212.41.71.188 by j33g2000cwa.googlegroups.com with HTTP; Sat, 20 May 2006 13:42:17 + (UTC) From: Daniel Hofstetter [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: Controllers Linked to model names? Date: Sat, 20 May 2006 06:42:17 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060326 Firefox/1.5.0.3 (Debian-1.5.dfsg+1.5.0.3-2),gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain The name of view directories are the same as the controller names, e.g. if your controller is called posts_controller.php, the views directory is views/posts. You can use in a controller as many models as you want with var $uses = array('Model1', 'Model2', 'Model3'); -- Daniel Hofstetter http://cakebaker.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: saving hasAndBelongsToMany without form?
To put it more simply: Can someone provide a code snippet with a call to Post-save() whose data is properly structured to save both the Post and one or more Tags with it? for each tag you need: $this-params['data']['Tag']['Tag'][n] = $tag_id; then when you call: $this-Post-save($this-params['data']); cake will do the rest. hth jb -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
automation module
Hi I need to implement a module in my Cake application that runs at regular intervals (say, every half hour) to do house keeping in the application like sending out email reminders to users. I expect that cron is the right way to trigger this module, but am wondering if anyone has any suggestions as to where is the best place for the code to be located? Should I simply build another controller to take care of the tasks? Or something entirely different... I would welcome suggestion that anyone might have. Regards, Langdon X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.54.63.19 with SMTP id l19mr147876wra; Sat, 20 May 2006 08:01:03 -0700 (PDT) Return-Path: [EMAIL PROTECTED] Received: from morpheus.kandos.infowrangler.com (bus-210-211-81-180.nsw.veridas.net [210.211.81.180]) by mx.googlegroups.com with ESMTP id v23si401126cwb.2006.05.20.08.01.02; Sat, 20 May 2006 08:01:03 -0700 (PDT) Received-SPF: neutral (googlegroups.com: 210.211.81.180 is neither permitted nor denied by best guess record for domain of [EMAIL PROTECTED]) Received: from [192.168.8.100] (unknown [192.168.8.100]) by morpheus.kandos.infowrangler.com (Postfix) with ESMTP id B5C28D8001 for cake-php@googlegroups.com; Sun, 21 May 2006 00:09:24 +1000 (EST) Message-ID: [EMAIL PROTECTED] Disposition-Notification-To: Langdon Stevenson [EMAIL PROTECTED] Date: Sun, 21 May 2006 00:10:40 +1000 From: Langdon Stevenson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: Linden Row Pty Ltd User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Mime-Version: 1.0 Content-Type: text/plain To: cake-php@googlegroups.com Subject: automation module Hi I need to implement a module in my Cake application that runs at regular intervals (say, every half hour) to do house keeping in the application like sending out email reminders to users. I expect that cron is the right way to trigger this module, but am wondering if anyone has any suggestions as to where is the best place for the code to be located? Should I simply build another controller to take care of the tasks? Or something entirely different... I would welcome suggestion that anyone might have. Regards, Langdon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Can't Fetch data while move codes from 0.10.8 to 1.0
I am moving my project from cake 0.10.8 to version 1.0. I found that my code runs well in old version, but in 1.0, the query can't fetch data in the database. I did check the database configuration and the sql statment in Other database client (MySQL Broswer) runs well too. When runs in 1.0, the debug message display that the query catch no errors, but affected rows is 0. I don't why. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: saving hasAndBelongsToMany without form?
Aha! I think I actually had it right before, but Cake appears to care about the order of the top-level array. So if it goes ('Post', 'Tag') it works but if it goes ('Tag', 'Post) it doesn't. It would be neat if a future version of Cake could take this a step further and create associated records on the fly. So if instead of supplying an ID you supplied an array of fields (like you do for a normal save operation), it would create the relevant tag record. Right now saving with existing tags is easy, but I still need to create new ones manually. X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr86705cwa; Sat, 20 May 2006 09:59:02 -0700 (PDT) X-Google-Token: esSaVAwAAAD6v3WBKeD10FWVKfBPzicH Received: from 24.61.43.8 by i40g2000cwc.googlegroups.com with HTTP; Sat, 20 May 2006 16:59:02 + (UTC) From: Dave [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: saving hasAndBelongsToMany without form? Date: Sat, 20 May 2006 09:59:02 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/2005 Firefox/1.5,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Aha! I think I actually had it right before, but Cake appears to care about the order of the top-level array. So if it goes ('Post', 'Tag') it works but if it goes ('Tag', 'Post) it doesn't. It would be neat if a future version of Cake could take this a step further and create associated records on the fly. So if instead of supplying an ID you supplied an array of fields (like you do for a normal save operation), it would create the relevant tag record. Right now saving with existing tags is easy, but I still need to create new ones manually. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: automation module
take a look at this http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/ X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr87014cwa; Sat, 20 May 2006 10:16:35 -0700 (PDT) X-Google-Token: 9T6t_AwAAACzgC0zwmMQFXcOHkvh-0W3 Received: from 62.57.39.3 by g10g2000cwb.googlegroups.com with HTTP; Sat, 20 May 2006 17:16:35 + (UTC) From: RosSoft [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: automation module Date: Sat, 20 May 2006 10:16:35 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain take a look at this http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Ajax Sortable Tutorial?
My getGroupOrder() javascript function serializes my sortable list and returns the values as a string separated by 's for tokenization in my contoller class updateitemorder . updateitemorder is able to access the string with the following statement: $args=$this-params['data']['Item']['hiddeninput']; //$args now contains the data that was in 'hiddeninput' from the form hi reggie, first, sorry for the delayed reply! you've done pretty much what I've done :) I have a JS function that writes out the content of my lists to a var then submits the form, yours is a touch more elegant as it doesn't require the writeSortOrders function to submit the form. looks like we're singing from the same hymsheet at least :) jb -- jon bennett t: +44 (0) 1225 341 039 w: http://www.jben.net/ iChat (AIM): jbendotnet Skype: jon-bennett --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Multi-Step Form
Hi John What you are proposing sounds great. My solution is not so flexible, and is contained entirely in the host controller. Are you going to use the Post-Redirect-Get approach? I have found this to work really well to eliminate back button and refresh issues that come along with forms. Other things to think about as you work (you may have already covered these of course :-) : - Browser cache expirery via response headers (to prevent forms being re-submitted) - Storing referrer data in Cancel situations so that you can return to the page the Cancel was called from if the user decides not to cancel - Using the Modified field or time stamp in a record to identify stale data John Zimmerman [gmail] wrote: I haven't gotten too far on my Cake port of my 'wizard code' yet but here is what my plan is. Maybe after we work out our own solutions we can compare and contrast and see if we can't come up with something that can be re-used easily and flexibly. Here goes... I created a new class called 'WizardController' that extends AppController. I put my 'wizard_controller.php' file in the vendors directory because that seemed the easiest to do at this point. So when I want to create a new 'Wizard' I create a new controller in the app/controllers directory that has a call to vendor('wizard_controller') at the top of the file. I then extend the wizard controller class. I am putting all of the supporting code for the wizard in the WizardController class. Things I am including support for are the following... * Define steps upon class creation * Navigation * Step Pre-Requisite checking * Managing each steps data in a session * Support for committing to database at the end of each step or at the end of the wizard. * Conditional choosing of the next step (or possibly delegate this to the landing step) * Probably some other items I can't think of right now. Comments, ideas, criticism? On 5/19/06, *Langdon Stevenson* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi John The code is a work in progress just now, but I only have to add one more page (that actually handles some data, not just navigation) and it should be right as an example. Will try to get it done tonight and post tomorrow. Turns out that this solution also runs faster than my previous mess of a controller, even with the redirect on each post. Regards, Langdon Jon Bennett wrote: If anyone would like to know more, just let me know and I can post some code. yes please :) thanks, jon -- Linden Row Pty Ltd NSW : +61 2 8215 0570 Victoria : +61 3 9013 9423 Fax : +61 2 8215 0571 Mobile : +61 416 118 037 http://www.lindenrow.com.au -- Linden Row Pty Ltd NSW : +61 2 8215 0570 Victoria : +61 3 9013 9423 Fax : +61 2 8215 0571 Mobile : +61 416 118 037 http://www.lindenrow.com.au X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.54.63.18 with SMTP id l18mr113270wra; Fri, 19 May 2006 18:12:33 -0700 (PDT) Return-Path: [EMAIL PROTECTED] Received: from morpheus.kandos.infowrangler.com (bus-210-211-81-180.nsw.veridas.net [210.211.81.180]) by mx.googlegroups.com with ESMTP id v11si115119cwb.2006.05.19.18.12.32; Fri, 19 May 2006 18:12:33 -0700 (PDT) Received-SPF: neutral (googlegroups.com: 210.211.81.180 is neither permitted nor denied by best guess record for domain of [EMAIL PROTECTED]) Received: from [192.168.8.100] (unknown [192.168.8.100]) by morpheus.kandos.infowrangler.com (Postfix) with ESMTP id 8AEEED8001 for cake-php@googlegroups.com; Sat, 20 May 2006 11:12:29 +1000 (EST) Message-ID: [EMAIL PROTECTED] Disposition-Notification-To: Langdon Stevenson [EMAIL PROTECTED] Date: Sat, 20 May 2006 11:12:26 +1000 From: Langdon Stevenson [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Organization: Linden Row Pty Ltd User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Mime-Version: 1.0 Content-Type: text/plain To: cake-php@googlegroups.com Subject: Re: Multi-Step Form References: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] Hi John What you are proposing sounds great. My solution is not so flexible, and is contained entirely in the host controller. Are you going to use the Post-Redirect-Get approach? I have found this to work really well to eliminate back button and refresh issues that come along with forms. Other things to think about as you work (you may have already covered these of course :-) : - Browser cache expirery via response headers (to prevent forms being re-submitted) - Storing referrer data in Cancel situations so that you can return to
Re: When (Document Root != /app/webroot) Cake works anyway?
Don't know if you've figured this out yet as the post is a couple of weeks old, but I thought I'd post anyways as it could be helpful to others. This is how I have cake running on Plesk 7.5 (I'm assuming you know how to run unix commands and can SSH into your server as a superuser, all lines starting with % are the start of a command line don't include the % sign, I'm not responsible for you funking your server up yada yada); upload your cake app to your domain's current root directory usually /httpdocs/ so that you have /httpdocs/app, /httpdocs/cake, /httpdocs/vendors etc. without a containing 'cake' directory. SSH into your server and cd into your domain's conf directory... % cd /pathtomy/domain.com/conf there may or may not be a file called vhost.conf, either way running the following command will create or edit it... % vi vhost.conf (vi is a text editor and should be installed, there's others but that's what I use, side note: if you mess up a vhost.conf file your server may not restart, DON'T PANIC! remove the vhost.conf file or fix it and your server will be back up)... Press 'a' so you can edit the file (the file is locked til then) and past the following (making the appropriate edits i.e. change domain.com to your domain, lines starting with # are comments) # start vhost.conf DocumentRoot /home/httpd/vhosts/domain.com/httpdocs/app/webroot/ Directory /home/httpd/vhosts/domain.com/httpdocs/app/webroot/ php_admin_value safe_mode 0 php_admin_value open_basedir /home/httpd/vhosts/domain.com/httpdocs:/tmp:/usr/share/pear # options Options Indexes ExecCGI FollowSymLinks MultiViews AddHandler cgi-script .cgi # .htaccess so cake's urls work properly AllowOverride all Order allow,deny Allow from all /Directory # end vhost.conf Press 'esc' to jump out of editing mode, then hold down 'shift' and press 'z' twice (typing 'ZZ') to save the file. Almost done but the next step must be done to apply the changes to your domain. We're back on the command line now, type (changing 'domain.com' again)... % /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.com Hit enter and the changes are applied to your domain, it should work now as is but I usually restart the server just to be sure. That's it! you now have cake running from your domain.com with the cake installed behind public viewable folders, with the exception of your front end which is sticking out for all to see :P Happy Baking! calzone wrote: ok, thanks for the tip. I'm wondering though, the linux setup is managed by plesk, which means mucking with httpd.conf can be problematic since plesk will manage (read:overwrite) it as needed. Yes, there are includes available, as well as site-specific includes, but I'm worried I might not be able to get the whole document root thing working and keep plesk happy at the same time. Then, even if I do get it working happy, there's the whole include path issue. open_basedir is definitely no picnic under plesk. I know this is way beyond the scope of people here, but on the off-chance anyone has experience with both plesk and cake and getting them to play nice together, I'd love to hear from you. X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr88168cwa; Sat, 20 May 2006 11:33:13 -0700 (PDT) X-Google-Token: qmxnpgwAAADAdJcO0YoKLF9h4mxK1PAA Received: from 24.127.45.8 by j73g2000cwa.googlegroups.com with HTTP; Sat, 20 May 2006 18:33:13 + (UTC) From: Vixiom [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: When (Document Root != /app/webroot) Cake works anyway? Date: Sat, 20 May 2006 11:33:13 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Don't know if you've figured this out yet as the post is a couple of weeks old, but I thought I'd post anyways as it could be helpful to others. This is how I have cake running on Plesk 7.5 (I'm assuming you know how to run unix commands and can SSH into your server as a superuser, all lines starting with % are the start of a command line don't include the % sign, I'm not responsible for you funking your server up yada yada); upload your cake app to your domain's current root directory usually /httpdocs/ so that you have /httpdocs/app, /httpdocs/cake, /httpdocs/vendors etc. without a containing 'cake' directory. SSH into your server and cd into your domain's conf directory... % cd /pathtomy/domain.com/conf there may or may not be a file called vhost.conf, either way running the following command will create or edit it... % vi vhost.conf (vi is a text editor and should be installed, there's others but that's what I use, side note: if you mess up a vhost.conf file your server may not
Re: unset($this-params['data']) Not Working???
A work around would be to create a function in your app controller calledsetSystemMessage($message);this function would set a session variable with the message. Then create another function called ...getSystemMessage()This function will return the contents of the session variable and then unset it. If the session variable is not set it will return 0. So in your controller you would setSystemMessage('Success!') then redirect to the same page.Also in your controller before rendering the view you would do the following... $systemMessage = $this-getSystemMessage();if ($systemMessage !=0) {$this-set('systemMessage', $systemMessage);}In your view to that page you would have an if statement like the following... if ( isset($systemMessage)) { echo $systemMessage;}Style the system message by putting it within div class=system_message or something similar. You can create the same kind of functions for setErrorMessage and getErrorMessage and do the same thing in the controller/view. Then style it with div class=error_messageThis will work just fine as I am doing something similar with another application using another framework. Using the session variable should clear any of the problems you were having. On 5/20/06, josh southern [EMAIL PROTECTED] wrote: The problem with redirect() is that the variable I use to display thesuccess message doesn't carry through. The problem with flash() is thatif a user looks away for a few seconds (let's say the phone rings, or someone walks into the room), they miss the success message and itcreates confusion as to whether the form worked. Hence my solution ofdisplaying a message on top of a new, blank form. They're already used to looking there because of the validation error messages, and if theydistracted for a few seconds, they don't miss the success message.This worked fine before, and now with 1.0, it doesn't. Can't someonetell me why, and if there is a way for me to code a work-around?
Cake PHP in PHP 5
Is Cake PHP available in version PHP5.0? or it is currently only in PHP4.X ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Can't Fetch data while move codes from 0.10.8 to 1.0
Yes, I did set debug to 2. And will display a table about the query status in the bottom of the page. The Query is ok and had no error but affect_row is 0. In the old version cake can fetch data and affect_row is 24 in the same table and database. What did cake core change about the database interface? X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr92528cwa; Sat, 20 May 2006 17:23:46 -0700 (PDT) X-Google-Token: oUshSQwAAAC1ySQQIfaS02VAtdqIkE8K Received: from 218.14.36.156 by 38g2000cwa.googlegroups.com with HTTP; Sun, 21 May 2006 00:23:46 + (UTC) From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Re: Can't Fetch data while move codes from 0.10.8 to 1.0 Date: Sat, 20 May 2006 17:23:46 -0700 Message-ID: [EMAIL PROTECTED] In-Reply-To: [EMAIL PROTECTED] References: [EMAIL PROTECTED] [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Yes, I did set debug to 2. And will display a table about the query status in the bottom of the page. The Query is ok and had no error but affect_row is 0. In the old version cake can fetch data and affect_row is 24 in the same table and database. What did cake core change about the database interface? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: Cake PHP in PHP 5
CakePHP is designed to work in both 4 and 5 On 5/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is Cake PHP available in version PHP5.0? or it is currently only in PHP4.X ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Re: automation module
Thank you both for your replies. Next time I will search before asking. Regards, Langdon RosSoft wrote: take a look at this http://rossoft.wordpress.com/2006/03/27/poor-mans-cron-component/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Outputting Images
Hi, Quick question: What is the best way to make something like a PHP sparklines or graphing library jive with CakePHP? Should it have a view controller? Or be a helper? Something else? X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr93759cwa; Sat, 20 May 2006 19:05:03 -0700 (PDT) X-Google-Token: Q-qongwAAADg7nf6g5qoBqWWWNwSJmzr Received: from 71.1.171.195 by g10g2000cwb.googlegroups.com with HTTP; Sun, 21 May 2006 02:05:03 + (UTC) From: tom [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Outputting Images Date: Sun, 21 May 2006 02:05:03 - Message-ID: [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Hi, Quick question: What is the best way to make something like a PHP sparklines or graphing library jive with CakePHP? Should it have a view controller? Or be a helper? Something else? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---
Is there a way to specify what fields should be returned in a recursive find?
Let say I have an artist who has many albums, and the albums have many songs. I want to be able to get all the the artist song titles. Find allowes me to specify what fields should be returned, but it seems to work only for the artists table fields no for the album and songs fields. Thanks in advance, Sebastian X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.11.53.63 with SMTP id b63mr94138cwa; Sat, 20 May 2006 19:42:01 -0700 (PDT) X-Google-Token: LIENAgwAAADU0_1pxKaUeisCrJJSjjk1 Received: from 69.232.72.50 by g10g2000cwb.googlegroups.com with HTTP; Sun, 21 May 2006 02:42:01 + (UTC) From: Sebastian Macias [EMAIL PROTECTED] To: Cake PHP cake-php@googlegroups.com Subject: Is there a way to specify what fields should be returned in a recursive find? Date: Sun, 21 May 2006 02:42:01 - Message-ID: [EMAIL PROTECTED] User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3,gzip(gfe),gzip(gfe) Mime-Version: 1.0 Content-Type: text/plain Let say I have an artist who has many albums, and the albums have many songs. I want to be able to get all the the artist song titles. Find allowes me to specify what fields should be returned, but it seems to work only for the artists table fields no for the album and songs fields. Thanks in advance, Sebastian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP 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 -~--~~~~--~~--~--~---