ACL/Auth Speed Issues

2009-01-10 Thread AussieFreelancer
Hi, does anyone have a working example of where acl and auth components are being used for a membership base of 10,000+ and there are no speed issues? I really need to find an effective permissions solution, which i thought acl and auth was, but i have serious speed issues whenever im accessing

Re: ACL/Auth Speed Issues

2009-01-10 Thread Arthur Pemberton
On Sat, Jan 10, 2009 at 2:36 AM, AussieFreelancer patr...@aussiefreelancer.com.au wrote: Hi, does anyone have a working example of where acl and auth components are being used for a membership base of 10,000+ and there are no speed issues? I really need to find an effective permissions

Re: ACL/Auth Speed Issues

2009-01-10 Thread AussieFreelancer
Hi there, yes i have put in indexes, im pretty sure i have done it right, but it doesn't seem to have made any difference, certainly not any significant difference... Is it definitely possible to have a working auth system for 10,000+ members? On Jan 10, 6:13 pm, Arthur Pemberton

Re: Paginator sort field and direction indicator?

2009-01-10 Thread ianh
On Jan 10, 12:15 am, DanielMedia danielmedi...@gmail.com wrote: I'm working on a project where a I have to display financial data. For instance, a table for stock trades might have 30 columns of data. So the client says, Wow, that sorting feature works great, (Thanks Cake) but can we put a

Why i get this warning

2009-01-10 Thread mona
I m getting this warning when i m adding a record Cannot modify header information - headers already sent by (output started at /home/maheep/domains/phraseout.com/public_html/cakephp/ styleguide/controllers/entries_controller.php:50) [CORE/cake/libs/ controller/controller.php, line 615] I remove

Simple String Manipulations?

2009-01-10 Thread ingenious paradox
I'm very new to cake and I was hoping someone could demonstrate the code necessary to take a form field input value and convert it to uppercase. I know this is simple with the ucwords() function, but for some reason I just can't get it to work properly. I read that you have to perform your own

Re: Moving from Drupal to CakePHP and Need suggestions.

2009-01-10 Thread Rogelio Nodal
Thanks a lot for your time. Your confirmations should get me going. --Original Message-- From: Miles J Sender: cake-php@googlegroups.com To: CakePHP ReplyTo: cake-php@googlegroups.com Subject: Re: Moving from Drupal to CakePHP and Need suggestions. Sent: Jan 9, 2009 7:25 PM Yes you would

Re: Saving Multiple Models in one save

2009-01-10 Thread Vincent Zhong
Hi since the saveAll method of cake only support upto one level, how can we save the data from one form into 4 models?? thanks. On Dec 25 2008, 5:22 am, Steven Wright rhythmicde...@gmail.com wrote: Thank you thank you. That was exactly what I was looking for. -Original Message- From:

Re: Moving from Drupal to CakePHP and Need suggestions.

2009-01-10 Thread CakeAddict
Thank you for your time! Your answers should get me going. On Jan 9, 7:25 pm, Miles J mileswjohn...@gmail.com wrote: Yes you would need separate controllers for each page. Yes you would use requestAction() in the view of a controller to get the view of another controller. To have links on

TreeBehaviour reorder performance issue

2009-01-10 Thread Peter A. Shevtsov
Hello, I have a tree with about 400+ records and when I try to call reorder method it executes about 10 SQL queries and takes several minutes to finish. Is there any way to optimize it? Thanks! -- Пётр Шевцов --~--~-~--~~~---~--~~ You received this message

Re: really simple authentication

2009-01-10 Thread fain182
i noticed that http authentication doesn't have logout... and my customer want it.. there is another simple authentication that works with cookies? thank you all pietro --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: TreeBehaviour reorder performance issue

2009-01-10 Thread Adam Royle
I've had a tree with that many records and had no issues re-ordering it (maybe 1-2 seconds max). I seem to remember needing to set $this-MyModel-recursive = -1; before calling the reorder methods. Maybe that is your problem - you might be selecting more than you need to? Maybe you should show

Re: Simple String Manipulations?

2009-01-10 Thread Adam Royle
Try this in your model... class Whatever extends AppModel { function beforeSave() { $data = $this-data[$this-alias]; if (!empty($data['title'])) { $data['title'] = ucwords($data['title']); } return parent::beforeSave(); } } Your could then

Re: Simple String Manipulations?

2009-01-10 Thread Bernardo Vieira
Best place to handle this is in your model's beforeSave() callback: http://book.cakephp.org/view/683/beforeSave ingenious paradox wrote: I'm very new to cake and I was hoping someone could demonstrate the code necessary to take a form field input value and convert it to uppercase. I know this

Re: Problem with $this-Auth-allow(array('display'));

2009-01-10 Thread volka
I'm sure it has changed since Cake 1.2 final release. But anyway, I tried $this-Auth-allow('display'); also, as stated before.. Any other suggestions on this? On 9 Jan., 23:02, Miles J mileswjohn...@gmail.com wrote: You dont use arrays as the arguments. $this-Auth-allow('page1', 'page2',

Re: Problem with $this-Auth-allow(array('display'));

2009-01-10 Thread Sergei
Place that rule in beforeFilter of PagesController! S. On Jan 10, 9:26 pm, volka volker.b...@googlemail.com wrote: I'm sure it has changed since Cake 1.2 final release. But anyway, I tried $this-Auth-allow('display'); also, as stated before.. Any other suggestions on this? On 9 Jan.,

Re: Passing email elements to Email component

2009-01-10 Thread Brenda
Yes. In views-elements-email-text-default.ctp I have ?php if (!empty($msgTitle)) { echo $msgTitle; } ? ?php if (!empty($subTitle)) { echo $subTitle; } ? ?php echo $messageText; ? There's also an html version. There's also a layout file in

Re: Problem with $this-Auth-allow(array('display'));

2009-01-10 Thread volka
That didn't work either :-( I think I will go through the tutorial (http://book.cakephp.org/view/ 641/Simple-Acl-controlled-Application) again, and verify if I missed sth.. Thanks to all so far.. On 10 Jan., 14:31, Sergei yatse...@gmail.com wrote: Place that rule in beforeFilter of

Re: TreeBehaviour reorder performance issue

2009-01-10 Thread Peter A. Shevtsov
Unfortunately, setting $this-MyModel-recursive = -1; doesn't help :( My code is the following: function _sort($id = null) { $this-CompanyCategory-recursive = -1; $this-CompanyCategory-reorder(array ( 'id' = $id, 'field' = 'name' )); $miscs =

Problem with text encoding

2009-01-10 Thread Marco
Hello, I have a strange and serious problem with two project in CakePHP 1.2. I don't know why some pages render with hidden characters in UTF8 but visible in ISO-8859. Usually they are rendered in the beginning of the page, before doctype. I'm using wamp in Windows XP and deploying in Linux,

Logout not working Syntax Error with Cake 1.2

2009-01-10 Thread Lamonte
Fatal error: Call to undefined method stdClass::logout() in C:\wamp\www \Subscriptions\app\controllers\users_controller.php on line 17 is the error I get yet my controller is setup like follows: ?php class UsersController extends Controller { public $name = Users; public

Cake ACL check

2009-01-10 Thread Steppio
Hi there again everybody! Has anybody ever tried to use the command 'Cake schema run create DbAcl' on a web server? im having trouble locating the correct method for reseting / initializing ACL, i've tried 'cake schema run create DbAcl -app www.helpwriteabook.co.uk//test//app//' but needless to

Re: Passing email elements to Email component

2009-01-10 Thread brian
OK, try this: debugger::log($messageText); $this-set('messageText',$messageText); ... just to make sure what you're setting is what you think it is. Other than that, I can't say what the issue might be. I'll defer to someone more knowledgeable, I think. On Sat, Jan 10, 2009 at 9:07 AM, Brenda

sanity check: Paginator, query string

2009-01-10 Thread brian
I have an element for displaying Paginator's links which I can drop into a pagination view, both above and below a set of paged data. So far, it works just fine. But, I've had to do some fiddling to deal with a query string and I'm really uncertain whether what I've done is the best way. Of

Re: Problem with text encoding

2009-01-10 Thread brian
It seems that you're running into the infamous UTF-8 byte-order mark issue. I do all my work on Linux and am unfamiliar with Notepad++ so I can't say for sure, nor give you the solution directly. I know that certain versions of Homesite (well, the version one of my clients used) causes this.

Re: upgrading from 1.1.15.5144

2009-01-10 Thread Samuel DeVore
http://book.cakephp.org/view/411/Migrating-from-CakePHP-1-1-to-1-2 some of the sub chapters here should help you get started, also search google I think there are some other resources out there as well. The biggest will moving from html helper to form helper, you will also need to completely

Re: Warning 512 error, I make the tmp dir writable and I get more errors

2009-01-10 Thread justclint
Hello, Ive just moved our cake app over to the production server and Im getting this error also. Ive tried setting the permissions just via the web directory but not working. Im guessing the solution above will work but Im not sure how to apply the chmod recursively. Do I do this in .htaccess?

Re: sanity check: Paginator, query string

2009-01-10 Thread Miles J
Why arent your query strings named parameters? And then you put this in your view: $paginator-options(array('url' = $this-passedArgs)); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Logout not working Syntax Error with Cake 1.2

2009-01-10 Thread Miles J
Not sure if this is the problem but try this, capitalize Auth. var $components = array('Auth'); And remove public, its not needed or supported. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post

Re: ACL/Auth Speed Issues

2009-01-10 Thread Marcus J. Ertl
AussieFreelancer schrieb: Hi there, yes i have put in indexes, im pretty sure i have done it right, but it doesn't seem to have made any difference, certainly not any significant difference... Is it definitely possible to have a working auth system for 10,000+ members? Indices were not

Re: sanity check: Paginator, query string

2009-01-10 Thread brian
The params--including limit--come in the first time through a form (GET). The results are paginated, so in the view, I have a set of links, as usual, plus links which would pass a new limit param. Because I'm telling Paginator to include the query string, I need to adjust before having it create

Re: sanity check: Paginator, query string

2009-01-10 Thread Miles J
Ive done it that way before, and it also shows that in the cookbook. http://book.cakephp.org/view/166/Pagination-in-Views --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send

route conundrum

2009-01-10 Thread brian
A section of my site is split into several smaller sections, each of those concerned with its own model: /ASK/funders /ASK/organisations ... etc. The routes for these are all perfect, save for the index route, which is handled by PagesController. The view for that is in:

Cake relations

2009-01-10 Thread kicaj
Hi, I try something like relations, and I have: Article hasOne User User hasMany Article User hasMany Comment Article hasMany Comment There are fields in 'comments' table: id, comment, model, foreign_key, user_id, created... I build my table like tables from I18n 'i18n' or ACL 'aros' and

Loading models within the controller action

2009-01-10 Thread Miles J
In one of my controllers, I use nearly 10-15 models. The problem is that I dont need all these models, each model is respective to a certain action and loading all these models seems like it would be heavy and load slowly. So I tried doing many variations of this in the action: $this-uses =

Re: sanity check: Paginator, query string

2009-01-10 Thread brian
I got it working. Thanks a bunch for setting me straight! For posterity, this is what I needed: public function index() { /* defaults */ $page = 1; $limit = $this-SearchIndex-limit; $models = array(); /* check form query */

HABTM and extra field

2009-01-10 Thread Yannis
I have an orders table and a payments table. I have joined them with a HABTM relationship (A payment may apply to many orders). I mean, when a client pays 1000$ (a payment), this payment applies e.g. as follows: 200$ are for order #1, 500$ are for order #3, 300$ are for order #10. So, I though

Re: include calculated data in the model

2009-01-10 Thread Yannis
that trigger thing is great! I had to upgrade to MySQL 5, but I think it solved my problem. thank you a lot! On Jan 6, 10:54 pm, Webweave webwe...@gmail.com wrote: Depends on your model. If you always fetch the data for the related orders, it would be fairly simple to create a virtual field

on my way to create an iPhone web app

2009-01-10 Thread James
I am in the middle of creating a iPhone version of my existing Cake app. My first attempt was making something like www.myapp.com/i/ which uses a controller. but the code becomes nasty because I have to copy every logic back in to the is_controller. That's doesn't look like a good practice to

Re: sanity check: Paginator, query string

2009-01-10 Thread Miles J
Very good. One thing id like to point out is that you should stop using ?= and use ?php echo. ?= will deprecated in the next version of php and also doesnt work correctly on some server configs. --~--~-~--~~~---~--~~ You received this message because you are

Re: sanity check: Paginator, query string

2009-01-10 Thread brian
The server config is mine alone, so I don't care about that. But I didn't know about the deprecation, thanks. That's too bad, if true. I really hate having to use echo and a semi-colon in my view code. On Sat, Jan 10, 2009 at 7:46 PM, Miles J mileswjohn...@gmail.com wrote: Very good. One

Deployment Issues

2009-01-10 Thread Chad Casselman
I have been developing my first cake app locally for the past few days. I uploaded the files to my dedicated server as following: .htaccess index.php /app /cake /vendors When I hit the url I get users/login can't be found. Yes, I am using basic Auth. To me this means that it executed enough

Re: Loading models within the controller action

2009-01-10 Thread brian
Based on something I saw on Teknoid's blog, I have this in my Admin index(): $this-set('new_members', ClassRegistry::init('Member')-getNewMembers()); $this-set('new_publications', ClassRegistry::init('Publication')-getNewPublications()); ... Apparently, this is the most

Re: Loading models within the controller action

2009-01-10 Thread Brad V. aka iBspoof
Miles- Try - App::import('Model', _insert_model_name); Brad On Jan 10, 6:08 pm, Miles J mileswjohn...@gmail.com wrote: In one of my controllers, I use nearly 10-15 models. The problem is that I dont need all these models, each model is respective to a certain action and loading all these

Re: Loading models within the controller action

2009-01-10 Thread Miles J
Yeah I know of that. But then I have to initialize all the classes also. Was just wondering if there was something that does it on runtime automatically. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: Problem with text encoding

2009-01-10 Thread Henrique Machado
I'm using notepad++ too Always save your file in UTF-8 Without BOM in the status bar need to appear: Ansi as UTF-8 good luck 2009/1/10 brian bally.z...@gmail.com It seems that you're running into the infamous UTF-8 byte-order mark issue. I do all my work on Linux and am unfamiliar with

Re: Loading models within the controller action

2009-01-10 Thread Miles J
Ive tried doing some logic in beforeFilter() and using App::import, but neither work simply because I use the controller paginate(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Using the named parameters

2009-01-10 Thread Miles J
I found a way to do this. Add these methods to your AppController.php Now if you had a url string like so: /news/archive/limit:10/?test=123 And in your controller you called these: $this-getNamedParam('limit'); // returns 10 $this-getQueryParam('test'); // returns 123 /** *

Re: Loading models within the controller action

2009-01-10 Thread Miles J
Der... I could call $this-loadModel(). --~--~-~--~~~---~--~~ 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

how to use javascript helper??

2009-01-10 Thread vikas
Hey all.. I want to use javascript helper in my project to see its power. But I cant understand how to use it.. Can anyone explain me how to use it or give link to any tutorial or example. --~--~-~--~~~---~--~~ You received this message because you are subscribed