Re: passing an array to another controller
Pass any extra data in the second parameter of the requestAction, then look in $this->params. $myarray = array('stuff'=>'goes in here', 'return'=>true ); $html = $this->requestAction('controller/action', $myarray); then in the requested action, look at $this->params['stuff'] --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Existing Projects
It's easy to use SQL VIEWs (nothing to do with Cake "views") to rename fields. For example, suppose a pre-existing table called students had an auto-incrementing primary key called student_id, and another column called student_name. (Note that MYSQL 4 does not support views, but MySQL 5+ does.) I would use a SQL VIEW to rename the fields by issuing the following query: CREATE VIEW cake_students AS SELECT student_id AS id, student_name AS name; Then you can bake, if you wish, or manually construct a model, a controller and various cake views (no connection with SQL VIEWs), specifying the cake_students pseudo-table. As far as I know, the whole Cake apparatus will treat the VIEW (pseudo- table) cake_students just the same as it would a real table. I don't know how to handle the creation of new records if the original primary key is not auto-incrementing, but I'm pretty confident there are ways to deal with that situation. Ralph --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: idea: trace things into a log window
On 1/28/07, gobblez <[EMAIL PROTECTED]> wrote: > > Thanks all for the advice and tips. I ended up using some of NOSLOW's > code, and getting it to work with Firebug instead of printing to the > page. Firebug sorts the arrays nicely, with the [+] tree level > thingys and such. Yay! Gobblez you are my hero!! FWIW - This even works with Firebug-lite on IE7 Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Transactions support
On 1/27/07, zipman <[EMAIL PROTECTED]> wrote: > > > Is there any workaround that I can do in any lower level, > > in order to get transactions? > If you it is transactions that you want then them IMHO there is no elegant short-cut really but if you explain what end result you are trying to achieve then perhaps we can explain how. After all MySQLer got by without transactions for years and the sky did not fall ;) Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Cake recipes book?
On 1/27/07, Mech7 <[EMAIL PROTECTED]> wrote: > > Does anybody know when this book will be released, as i like to order > it but don't know when to expect. +1 But I gather that the book covers version 1.2 so a proportionate wait can be expected I guess Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: baking error
On 1/27/07, lukemack <[EMAIL PROTECTED]> wrote: > Fatal error: Call to undefined function mysql_connect() in /var/www/ > cake/libs/model/dbo/dbo_mysql.php on line 102 Might sound like a silly question - but can you connect to MySQL using PHP? If not then you need to install whatever is the equivalent of php_mysql*.rpm on your system HTH Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: idea: trace things into a log window
Yeah, now that you mention it, I agree, it is a bit of work and less convenient with lots of clicking! I like your docking pane idea, it would fix my worry (and reason I went the Firebug route) of having styles clashing, particularly width of my layout. I was mostly just itchy to see if I could do it though, hehe. On Jan 28, 2:36 am, "NOSLOW" <[EMAIL PROTECTED]> wrote: > Nice work, gobblez! Very streamlined, efficient and commented nicely. > It was a breeze to install in my project. Thanks for sharing! > > Just had one tweak to make since I didn't have any components in my > project: > > if (isset($var->controller->components)) > $g = "\nfbout['Components'] = > ".$this->php2js($var->controller- > > >components).";";Do you know if there's a way to expand all the nodes in the > >Firebug > console? Otherwise. you have to do a bit of work to see what's going > on with all the variables. I still prefer Ovenlight because you can > "passively" see everything going on without any clicking (with the > exception of maybe some vertical scrolling). Navigating the Firebug > console requires much "active" clicking to see everything. The good > news is that you can just run both and have your choice. > > Also, by printing the variables to the HTML into "" boxes, you > have many presentation options with CSS and/or AJAX/DOM scripting/ > AJAX. You could add all kinds of effects to make them resizeable, > collapsible, moveable, hideable, etc. Since Ovenlight writes all > these div boxes inside an outter div box (simulating a debug pane), it > could be made to behave like a dockable pane. Printing also works > pretty well. > > I've already learned a few things from this example which I'll > refactor into Ovenlight. That's what I was hoping for! > > Thanks again, > NOSLOW --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Existing Projects
It certainly works! One of my client's database was built before I took over. It used to be spaghetti-code PHP that I have (mostly) converted to CakePHP. This database has as primary keys user_id, j_id, prodid, etc. A foreign key to user_id may be j_owner and to prodid is rfc_prodid. You have to specify the primary key's name and in the associations specify foreign key's name. It is more work but does work nicely. One caveat is how the magic functions work. Just remember how the conventions work and you'll do okay. To find the user_id use $this- >User->findByUserId(1) because the capital I means there is a _. To find by prodid use $this->Product->findByProdid(1). Notice no capital I prodid as there is no _. HTH, David Lloyd On Jan 26, 10:43 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 1/26/07, Erich C. Beyrent <[EMAIL PROTECTED]> wrote: > > > > > Well, for instance, tables that have a primary key of ID instead of id, > > or perhaps even UserID. It's the modeling of the database that concerns > > me - what I need to do to get the models to work.Others can confirm or deny > > this for me, but I'm pretty sure you can > override some of the default values that the Cake models use for > primary key. I know you can do it in Rails (I have done so with > legacy tables). > > -- > Chris Hartjes > > My motto for 2007: "Just build it, damnit!" > > rallyhat.com - digitial photo scavenger hunt > @TheBallpark -http://www.littlehart.net/attheballpark > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: acl.php
Have the same problem, when using solution from bakery (http:// bakery.cakephp.org/articles/view/176). Everything goes fine until I have to get something out from db. Anyone? Running on cake 1.1.12.4205 Thanks in advance --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Multiple templates ?
http://manual.cakephp.org/chapter/views Read the "Layouts" section. On Jan 27, 4:47 pm, "Mech7" <[EMAIL PROTECTED]> wrote: > Is there any tutorial how i could create templates for an application? > So i would have one directory with all the views and can switch them > for different styles ? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: idea: trace things into a log window
you really should make an article in the bakery for this http://bakery.cakephp.org/ Please it should be captured for people Nice work Sam D On 1/27/07, gobblez <[EMAIL PROTECTED]> wrote: > > Thanks all for the advice and tips. I ended up using some of NOSLOW's > code, and getting it to work with Firebug instead of printing to the > page. Firebug sorts the arrays nicely, with the [+] tree level > thingys and such. > > http://bin.cakephp.org/view/591087419 > > > > > -- == S. DeVore (the old fart) the advice is free, the lack of crankiness will cost you - its a fine line between a real question and an idiot --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: idea: trace things into a log window
Nice work, gobblez! Very streamlined, efficient and commented nicely. It was a breeze to install in my project. Thanks for sharing! Just had one tweak to make since I didn't have any components in my project: if (isset($var->controller->components)) $g = "\nfbout['Components'] = ".$this->php2js($var->controller- >components).";"; Do you know if there's a way to expand all the nodes in the Firebug console? Otherwise. you have to do a bit of work to see what's going on with all the variables. I still prefer Ovenlight because you can "passively" see everything going on without any clicking (with the exception of maybe some vertical scrolling). Navigating the Firebug console requires much "active" clicking to see everything. The good news is that you can just run both and have your choice. Also, by printing the variables to the HTML into "" boxes, you have many presentation options with CSS and/or AJAX/DOM scripting/ AJAX. You could add all kinds of effects to make them resizeable, collapsible, moveable, hideable, etc. Since Ovenlight writes all these div boxes inside an outter div box (simulating a debug pane), it could be made to behave like a dockable pane. Printing also works pretty well. I've already learned a few things from this example which I'll refactor into Ovenlight. That's what I was hoping for! Thanks again, NOSLOW --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: idea: trace things into a log window
Thanks all for the advice and tips. I ended up using some of NOSLOW's code, and getting it to work with Firebug instead of printing to the page. Firebug sorts the arrays nicely, with the [+] tree level thingys and such. http://bin.cakephp.org/view/591087419 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Cake recipes book?
Does anybody know when this book will be released, as i like to order it but don't know when to expect. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Multiple templates ?
Is there any tutorial how i could create templates for an application? So i would have one directory with all the views and can switch them for different styles ? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Setting variables with beforeFilter()
Excellent! Thank you, that worked perfectly. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Transactions support
Is there any workaround that I can do in any lower level, in order to get transactions? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
acl.php
hi, i'm trying to run acl.php from the command line on linux: php acl.php initdb but get the following error: Fatal error: Call to undefined function mysql_connect() in /var/www/ cake/libs/model/dbo/dbo_mysql.php on line 102 someone mentioned that php cli might not be configured with mysql support but doesnt know how to do this. can anyone tell me how to configure php cli on linux with mysql support? i tried adding defaul host, username and password in /etc/ php5/cli/php.ini but this didn;t make any difference. thanks, lukemack. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
baking error
Hi, I'm getting this error when selecting M, V, or C in bake.php (running from command line on linux - Ubuntu 6.10 with php 5.1.6 & Apache 2) Fatal error: Call to undefined function mysql_connect() in /var/www/ cake/libs/model/dbo/dbo_mysql.php on line 102 I haven't changed the database access details and can still connect to the database using the username/password in the cake database config file. line 102 is $this->connection = $connect($config['host'], $config['login'], $config['password']); in the connect() function in dbo_mysql. anyone got any idea what might be causing this? I can still run the cake app in a browser. thanks, lukemack. --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Ready to upload cakePHp files to my Hostgator account.
Thanks for your guys' help. Very helpful. I'm trying to make this as simple as possible, so for now, I think I'll go with Tarique's advice. As far as the mod_rewrite, Hostgator support told me that "I can create a mod_rewrite in .htaccess". Didn't know I could. Very new to Apache configuration. In a way, cakePHP presents an opportunity for me to have to learn more about Apache, so I ordered a book on mod_rewrite in the meantime. Then when I have learned CakePHP well and completed the actual Web App, I wil then take another look at how much more secure I could make it by redoing the folder structure and playing with the cakePHP constants per DJ Spark's advice. Steve --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: HTML "anchor" tag issue
I can see two different things going on here: (1) the anchor is being generated, and you don't want it, and (2) you want to change the color that is associated with the CSS class "warning_msg". For item one, it could be a third party vendor or error layout view file that are adding the anchor; are you using any vendors like Markdown, Textile, etc? For the second item, I wanted to see the live code output so that I could look at your CSS file and see how to give that class a color, or override what is getting set right now. > I have even tried to force the color as follows: > > echo ' There are no hierarchies on this > network! '; > > But without sucess... :-( CSS should be used in this case to set the color and styling of the error message. If you end up posting any of your app online let me know and I will look at the CSS/HTML output to see if I can help. Also try searching in your view files for any error formatting HTML (like http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Pagination in 1.2 with method parameters
OK I found the problem - I believe it's a bug in PaginatorHelper but I do have a workaround. In the 2007.01.24 nightly on line 249 of PaginatorHelper is the following code in the __pagingLink method: $url = am(array('page' => $paging['page'] + ($which == 'Prev' ? $step * -1 : $step)), $url); That calculates the next or previous page number and stores it in $url['page'], unless the $url array already has a 'page' key. I'm calling next & previous by passing in $this->params['pass'] as the array, which after page 1 will in fact contain a 'page' key, and will thus overwrite the correctly calculated value in that line of code. I'm not sure what the right fix is for this bug, but the problem lies in that single line of code. Note: I'm calling this a bug assuming that the correct way to get action parameters & pagination to play nicely together is to pass in $this->params['pass'] as the value of $options['url'] - if there's a better way then I guess calling this a bug is a bit strong. My workaround is just to simply unset the 'page' key before calling any $paginator methods in the view: unset($this->params['pass']['page']); The calls to $paginator->next() and $paginator->prev() work fine after unsetting the 'page' key. I'm not sure how to file a bug report but I'll look into that next - just wanted to post my workaround for anyone else pulling their hair out on this issue. :) On Jan 26, 3:56 pm, "Zach Cox" <[EMAIL PROTECTED]> wrote: > I'm assuming you meant $this->params['paging'] > > Here it is from page 1: > > 2007-01-26 15:54:46 Error: Array > ( > [Thing] => Array > ( > [page] => 1 > [current] => 3 > [count] => 514 > [prevPage] => > [nextPage] => 1 > [pageCount] => 172 > [defaults] => Array > ( > [limit] => 3 > [step] => 1 > [order] => Array > ( > [Thing.created] => desc > ) > > [conditions] => Array > ( > ) > > ) > > [options] => Array > ( > [limit] => 3 > [order] => Array > ( > [Thing.created] => desc > ) > > ) > > ) > > ) > > And here it is from page 2: > > 2007-01-26 15:54:49 Error: Array > ( > [Thing] => Array > ( > [page] => 2 > [current] => 3 > [count] => 514 > [prevPage] => 1 > [nextPage] => 1 > [pageCount] => 172 > [defaults] => Array > ( > [limit] => 3 > [step] => 1 > [order] => Array > ( > [Thing.created] => desc > ) > > [conditions] => Array > ( > ) > > ) > > [options] => Array > ( > [limit] => 3 > [order] => Array > ( > [Thing.created] => desc > ) > > [page] => 2 > ) > > ) > > ) > > On 1/26/07, nate <[EMAIL PROTECTED]> wrote: > > > > > Yeah, you could just... um, wait, nevermind. Sorry, no ideas. > > > Do an array dump of $paginator->paging on page 2, and see what that > > gives you. > > > On Jan 26, 2:49 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > OK here's a simple example showing that $paginator->next() and > > > $paginator->prev() are generating incorrect page numbers: > > > > things table > > > CREATE TABLE `things` ( > > > `id` int(10) unsigned NOT NULL auto_increment, > > > `name` varchar(30) default '', > > > `attribute1` int(11) default '0', > > > `created` datetime default '-00-00 00:00:00', > > > `modified` datetime default '-00-00 00:00:00', > > > PRIMARY KEY (`id`) > > > ) ENGINE=MyISAM DEFAULT CHARSET=utf8 > > > > app/models/things.php > > > > > > class Thing extends AppModel > > > { > > > var $name = 'Thing'; > > > > }?> > > > > app/controllers/things_controller.php > > > > > > class ThingsController extends AppController > > > { > > > var $name = 'Things'; > > > var $scaffold; > > > var $paginate = array('limit' => 3, 'order' => > > > array('Thing.created' > > > => 'desc')); > > > > function index($attribute1) > > > { > > > $this->set('things', $this->paginate('Thing', > > > array('Thing.attribute1' => $attribute1))); > > > } > > > > //just generates some random things to populate the things table > > > function generate($count
Re: HTML "anchor" tag issue
Hi, Unfortunately I haven't a URL to show you. This is web app i'm developing is to use "in-house" only... But I can gladly paste the code you asked for. :-) The VIEW code is as follows: There are no hierarchies on this network! '; } else { foreach($results as $result) { echo ''.$result[0]['acronym'].'('.$result[0] ['type'].')'; echo ' '; foreach($result as $node) { foreach($node['kpi_names'] as $kpi_name) { echo ''.$kpi_name.''; } echo ''; foreach($node['kpi_values'] as $kpi) { switch($kpi['level']) { case "critical": echo ''. $kpi['value'] . ''; break; case "risky": echo ''. $kpi['value'] . ''; break; case "normal": echo ''. $kpi['value'] . ''; break; default: echo ''. $kpi['value'] . ''; } } echo ''; } echo ' '; } } ?> And the generated output is this: There no hierarchies on this network! Mind that this when only happens when you don't have results (ie you're on the first action of the if...) I have even tried to force the color as follows: echo ' There are no hierarchies on this network! '; But without sucess... :-( Also two notes: i) I know the code might not be perfect...but I'm still developing the Business and Presentation Logic and things are changing on a daily basis...besides I believe in the motto: "Permature optimization is the root of all evil"... ;-) ii) As for the brackett style, I'm aware that many coders dislike this style, but I have a strong C/C++ background and couldn't get ridden of the vice... :-) Many thanks for your help!! Cheers, On Jan 26, 10:57 pm, "Lance Willett" <[EMAIL PROTECTED]> wrote: > On 1/26/07, mindcharger <[EMAIL PROTECTED]> wrote: > > > > > > > Hello, > > > I'm having a problem with the HTML "anchor" tag (). > > > It seems that everytime I 'echo' something to the screen I get a > > "nasty" ... tag pair enclosing whatever I'm doing. I'm using > > Cake's CSS with a thing or two added, and the problem is that the > > pair shadows other style classes I use. > > > The clear out what I say, here's the code I have on the VIEW: > > > if (! isset($results)) > > { > > echo ' There no hierarchies on > > this > > network! '; > > } > > else > > ... > > > And this is the generated HTML: > > > > > There no hierarchies on this network! > > > > > This shouldn't be a big deal, but I'm actually displaying a "warning > > message" and I'd like it to be in red, but with this sumperimposing of > > tag, all I get is "CAKE's green" which is not your typical > > "warning" color... > > > Can someone explain why this happen or if there's something I'm doing > > wrong? > > > Thanks in advance!Do you have a URL where we could look at the HTML output? > > I'm curious > to see it... > Also, what view file is that warning message in? Can you paste the > contents of the file here... > > -- > Lance Willett > simpledream web studiohttp://simpledream.net --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Ready to upload cakePHp files to my Hostgator account.
Let's suppose your host do have a setup like this, when you do an ftp: / < your root, you cannot go to parent folder /public_html < the docroot folder no you create a 'cakeapps' folder and a 'cake' folder / /public_html /cakeapps /cake now, you copy your whole app folder to /cakeapps and the original 'cake' folder to the /cake the *contents* of the webroot folder go inside /public_html / /public_html (index.php , /js, /css , etc) /cakeapps (/app) /cake (/cake , /docs , /vendors) now the 'complicated' part: open '/public_html/index.php' and edit the following paths to something like this: define('ROOT', '/cakeapps'); define('APP_DIR', 'jcl_clients'); define('CAKE_CORE_INCLUDE_PATH', '/cake'); And that's it. Users will NOT have direct access to any of your application archives, nor cake files, therefore it's harder to exploit some security problem (with cake, apache/IIS or OS) I hope so :) spark On 1/26/07, beetlecube <[EMAIL PROTECTED]> wrote: > > HI, > I have a question about folder organization of a CakePHp > installation. > > I'm about to upload my cakephp files to my Hostgator "baby croc" > Shared server space. > > In the CAkePHP manual, the suggested folder structure is: > > ../path_to_cake_install > /app > /controllers > /models > /webroot <-- Should be DocumentRoot > .htaccess > index.php > > Should I send a Support Email to Hostgator that I need to have the > httpd.conf changed for rmy account, so that my webroot is > "Mydomain.com/app/webroot" ? > > I really have no particular way that I prefer the folder organization > to be. > > I just want it to work, basically, and preferably with the mod_rewrite > enabled, so that I don't have to stick that "index.php" in the middle > of everything.But if I do have to use the "index.php" inside the > URL, no big deal even. > > ( if anyone has a method by which I need to rely on H.G. support as > little as possible, please let me know. ) > > Thanks, Steve > > > > > -- [web] http://synapsisdi.com.br [livesets] http://djspark.com.br/mp3 --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: CakeTimer/Ajax uploader
Following on from the first post. I got that error when viewing the application at www.mydomain.com/ When I view the application at www.mydomain.com/uploads/index/ i get a different error: Error: progressTracker Data has a wrong format! So maybe it is the format of the data the script is receiving; but hey I'm just guessing and even then I am not sure how to remedy the problem! Has anyone successfully implemented this script? Thanks, ski.nalicio.us --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
Re: Setting variables with beforeFilter()
You can create some variable (var $myValue = null;) and set it in beforeFilter() method ($this->myVar = true;). Or: You can just use $this->set('myVar', true); and then inside of controller's action check content of $this->viewVars['myVar']; --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
CakeTimer/Ajax uploader
Morning all, I have downloaded and installed this excellent demo of an Ajax upload script from: http://www.thinkingphp.org/2006/04/27/an-ajax-file-upload-progressbar/ I have searched this group for the error I am getting as I know a few of you have used this script before now but cant find any reference to it. Upon upload I get the following error message: Error: progressTracker timeout: max is 15 seconds This is a script specific error manually placed in the cake-timer.php component. Has anyone that has used this script encountered this error before? And if so do you know what the cause is. I have checked the obvious like file permissions and paths (and path variations); no files are being uploaded at all and I have quoted out the section that immmediately removes the file upon upload! Any hints would be much appreciated. :o) Thanks, ski.nalicio.us --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---