Re: Are we using the slowest PHP framework there is?

2009-02-20 Thread keymaster
I never really understood the reason for this hyper-aggressive loading of everything and it's brother, whether you want it or not. It sure would be nice to have the ability to turn off the auto loading, and do a manual loading of only what you need in your action something like a Containable

RE: No password hashing

2009-02-20 Thread Toby Mathews
Thanks for the tip! I actually am using cake bake - one of the steps is 'use scaffolding?', at which point I'd been blithely responding 'yes'. I have now discovered the alternate route through the process, and that seems to have solved my problems. Best wishes, Toby -Original Message-

Re: View Cache and special characters

2009-02-20 Thread neverlosty
Hi Brian, thanks for the tip. At the moment, I use urlencode, so I tried rawurlencode but that didn't seem to help either. Now my urls look something like: http://www.example.com/tim%27s%20stuff But I still get the white screen. I suspect maybe the apostrophe is causing the code to break as

How avoid some filter conditions

2009-02-20 Thread marco.rizze...@gmail.com
Hi I have this situation. I have create an action in my controller where I can do search on a model (search on every field of my model). Now I have that I would that some field must be except from conditions. Is better if I do the filtering on the conditions on a method of the model or with a

AppController methods

2009-02-20 Thread kaushik
Can anyone provide me list of AppController methods with their definations? --~--~-~--~~~---~--~~ 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

Question about the actions in aros_acos

2009-02-20 Thread Joshua
Hi, I try to add ACL to my application, but when I take a look at the table 'aros_acos', it seems there is only four actions in the table. Did it mean that we can only use four actions in our applications? Is there any body can explain this? Many thanks!

Re: AppController methods

2009-02-20 Thread luke BAKING barker
I'd be 'Api to. On Feb 20, 11:47 am, kaushik kaushikwo...@gmail.com wrote: Can anyone provide me list of AppController methods with their definations? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group.

AW: How avoid some filter conditions

2009-02-20 Thread Liebermann, Anja Carolin
Sorry i don't understand your problem. Why you don't leave out the field in the conditions? How do you build your conditions? Anja -Ursprüngliche Nachricht- Von: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] Im Auftrag von marco.rizze...@gmail.com Gesendet: Freitag, 20.

Re: update from cakePHP 1.2.0.7692 RC3 to cakePHP 1.2.1.8004 stable

2009-02-20 Thread Martin Westin
I don't remember any specific problem updating from RC3. Generally changes should be mostly things that are a problem in RC3 will be fixed. There shouldn't be a lot to change, if anything at all. You should just update the core and test your app. (I imagine you don't have a lot of automated tests

Re: AppController methods

2009-02-20 Thread Martin Westin
No need for all that :) AppController has no methods defined. That is sort of the point of the application controller... that is is defined in the application. The one in the core is just an empty placeholder. On Feb 20, 1:07 pm, luke BAKING barker lukebar...@gmail.com wrote: I'd be 'Api to.

Re: AppController methods

2009-02-20 Thread Gonzalo Servat
On Fri, Feb 20, 2009 at 11:14 AM, Martin Westin martin.westin...@gmail.comwrote: No need for all that :) Maybe, but it was a great reply :-) kaushik: since AppController extends Controller, you're probably looking for what methods you can use from that file. Check http://api.cakephp.org. The

Re: HABTM with only two tables... How to do that..?

2009-02-20 Thread Martin Westin
I think you can create a HABTM onto itself by aliasing. Look at the full definition of the relationship in the cookbook and you will find that you can call the related table something other than it's real name. I don't really get what you want to achieve. At first glance I think I would have

Re: update from cakePHP 1.2.0.7692 RC3 to cakePHP 1.2.1.8004 stable

2009-02-20 Thread amarradi
Thanks a lot the was successful but the reason for updated was that i want to use the Security Component and i had an error. Like this http://groups.google.com/group/cake-php/browse_thread/thread/28e619524d140ad2# But this bug is always there. Did every know anything how i can fix it. many

App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread majna
You can see my report here: http://bin.cakephp.org/view/442110052 There is *too much* wrong paths where cake searches core files. In real application it gets even worse (including behavior.php etc). Am I doing something wrong? Cake founds dispatcher.php on 50th attempt!? Please can someone

Re: Question about the actions in aros_acos

2009-02-20 Thread Joshua
Is there anybody can help me? On Feb 20, 8:22 pm, Joshua josh...@gmail.com wrote: Hi, I try to add ACL to my application, but when I take a look at the table 'aros_acos', it seems there is only four actions in the table. Did it mean that we can only use four actions in our applications?  Is

Re: How avoid some filter conditions

2009-02-20 Thread byqsri
I don't explained very well. The POST to my action contain the fields and the conditions on which then I do the filtering. Now in the POST can be all possible fields and all possible conditions but it's not very good for my application and I would that some conditions are prohibited. I ask you

Re: Question about the actions in aros_acos

2009-02-20 Thread James Louie Puro
I think not...while AROs are elements trying to gain access to a protected system like users and groups, ACOs are elements (actions) that are being protected. so you can add acos (action) in your controller just like function index, view...etc and assign AROs to it. On Fri, Feb 20, 2009 at

Re: AppController methods

2009-02-20 Thread Stu
Well that really depends on what you want to do here. Try to think of your app_controller as a break dancer might think of his piece of cardboard or a street artist of his sidewalk. It is your canvas. It's pretty much what you want your other controllers to depend on. Maybe tell us what you

Re: How avoid some filter conditions

2009-02-20 Thread Stu
Not sure if this is what you want, but for filtering purposes I like to use find. http://book.cakephp.org/view/449/find $groups = $this-Model-find('list', array( 'conditions'=array('Model.field' = exempleValue),

Re: Question about the actions in aros_acos

2009-02-20 Thread Joshua
Thanks for your reply! So what's meaning of these four actions, like _update,_create,_read,_delete in table aros_acos? We say an user has the read rights of an action post? In my opinion, there should be only two status, true or false instead of these four actions. If true, we can say an user has

Re: Problem with Blog Tut 1.2 Database connection...

2009-02-20 Thread Stu
hehe, takes me back to last month when i started using cake. Pretty much had all the same issues. Are you using MySql? if so you should run a phpinfo script to see if PHP recognizes it. Also if you are using MySql (I'm pretty sure that phpMyAdmin uses MySql) consider using sqlyog for creating

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread Matt Curry
The file paths get cached in /app/tmp/cache/persistent/ cake_core_file_map. Set debug to 0 in your core.php and re-run. You'll see all the files found on the first try. -Matt http://www.pseudocoder.com On Feb 20, 8:38 am, majna majna...@gmail.com wrote: You can see my report here:  

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread majna
Tnx Matt. I think this is not expected behavior anyway. On Feb 20, 4:30 pm, Matt Curry m...@mcurry.net wrote: The file paths get cached in /app/tmp/cache/persistent/ cake_core_file_map.  Set debug to 0 in your core.php and re-run. You'll see all the files found on the first try.

Getting max of contained records

2009-02-20 Thread Al
Hello, can someone tell me if this is possible? I have the following Model association: PhdUser hasOne PhdApplication PhdApplication hasMany PhdCollege So a user inputs multiple colleges for their application, and I want to query for only the most recent college (dateLeft). I've just started

Re: Getting max of contained records

2009-02-20 Thread Al
I went back and tried to rebind the PhdCollege model with specific params, but it looks like I can't use GROUP BY conditions and therefore cannot use 'MAX'. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread Martin Westin
I see plenty of not found at debug level 0... which is strange. If anyone is at all interested, there is a way to optimize this, tedious and dirty. For example: in cake/bootstrap.php //App::import('Core', array('Dispatcher')); App::import('Core',

useTable ignored?

2009-02-20 Thread rb
I'm a bit confused.. it seems the useTable variable is being ignored when a controller is accessing an associated model. For example: I have a model named School: class School extends AppModel { var $name = 'School'; var $useTable = 'my_school_master'; } This works great when

Re: Problems with Security Component

2009-02-20 Thread Martin Westin
SecurityComponent protects you from some hacking attempts. If your posted form did not have the required security hashes it protects you by emptying the data. You can be treated as a hacker if for example: - You wrote the form by hand without FormHelper. - You have ajax on the same page. /Martin

Re: update from cakePHP 1.2.0.7692 RC3 to cakePHP 1.2.1.8004 stable

2009-02-20 Thread Martin Westin
See my answer in the other thread. On Feb 20, 2:38 pm, amarradi radis...@googlemail.com wrote: Thanks a lot the was successful but the reason for updated was that i want to use the Security Component and i had an error. Like this

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread majna
There is no Not found when debug = 0, after cake_core_file_map file is created. Refresh page one more time.. 2009/2/20 Martin Westin martin.westin...@gmail.com: I see plenty of not found at debug level 0... which is strange. If anyone is at all interested, there is a way to optimize this,

Re: How avoid some filter conditions

2009-02-20 Thread brian
You could create a static array of possible fields which you would allow. In your action, filter the fields in POST against your class variable class YourController extends AppController { ... var $search_fields = array('foo', 'bar', etc.); On Fri, Feb 20, 2009 at 9:10 AM, byqsri

Re: Getting max of contained records

2009-02-20 Thread Stu
I think it might be Syntax, try: $query = $this-PhdUser-find('all', array( 'contain'=array( 'PhdCollege'=array('dateLeft' = 'max(dateLeft)'), 'PhdApplication'=array('userID' = '6240'), 'PhdTest' ), A work around method... I

Re: Problem with Blog Tut 1.2 Database connection...

2009-02-20 Thread psiborg
I'm using mySQL, because that's what the client is using...to my knowledge. I'm so new at this, I don't even know what you mean by running a phpinfo script... Currently, the location of my database.php file is: \xampp\htdocs\app \config\database.php The relevant portion of the database.php file

Re: Getting max of contained records

2009-02-20 Thread brian
On Fri, Feb 20, 2009 at 10:42 AM, Al al.scheur...@gmail.com wrote: Hello, can someone tell me if this is possible? I have the following Model association: PhdUser hasOne PhdApplication PhdApplication hasMany PhdCollege So a user inputs multiple colleges for their application, and I want

Re: Problem with Blog Tut 1.2 Database connection...

2009-02-20 Thread brian
create a file named info.php with the following: ?php phpinfo(); ? Place that in app/webroot and open it in your browser. This will show you a bunch of configuration, extension, and environment info. Near the top will be the switches that were used to compile PHP. You should see --with-mysql in

Re: ORDER BY Rating

2009-02-20 Thread Kyle Decot
Anyone have any ideas? I'm under somewhat of a time constraint. Thank you for your help! --~--~-~--~~~---~--~~ 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

Re: useTable ignored?

2009-02-20 Thread Marcelo Andrade
On Fri, Feb 20, 2009 at 1:26 PM, rb rbo...@epsbooks.com wrote: class CustAcctsController extends AppController { var $name = 'CustAccts'; var $uses = array('CustAccts', 'Schools'); Your models must be in the singular form. -- MARCELO DE F. ANDRADE (aka eleKtron) Belem, PA,

Re: Problems with Security Component

2009-02-20 Thread amarradi
Hello do cakePHP on scaffolding use Formhelper? my forms are generated via scaffolding... Ajax is not in use this moment... Here is my problem view ?php echo $form-create('User', array('controller'='users','action' = 'add'));? ?php echo div id='left' class='addl';

Re: Getting max of contained records

2009-02-20 Thread Al
Thanks guys, I'm using that userID just for testing purposes. The syntax effort did not work and the find(first) workaround wouldn't apply in this situation, but you did get me to where I needed to go. I ordered the PhdCOllege model by 'dateleft DESC' so that the most recent college is listed

Assigning a model to a variable and accessing it

2009-02-20 Thread ramonmaruko
I know that this is more of a PHP OOP question, but is this possible: http://bin.cakephp.org/view/73084103 ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this group, send email to

Re: Problem with Blog Tut 1.2 Database connection...

2009-02-20 Thread Stu
well, your db config file looks good. I'm thinking it's either a PHP or MySql error. check out this linked, this is what i used to configure everything. http://www.php-mysql-tutorial.com/wikis/php-tutorial/installing-php-and-mysql.aspx Also, I don't know if you've seen this one, but I

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread Martin Westin
No so on my computer, which is why I thought it was strange. (Mac OS X) On Feb 20, 5:37 pm, majna majna...@gmail.com wrote: There is no Not found when debug = 0, after cake_core_file_map file is created. Refresh page one more time.. 2009/2/20 Martin Westin martin.westin...@gmail.com:

Re: Assigning a model to a variable and accessing it

2009-02-20 Thread Marcelo Andrade
On Fri, Feb 20, 2009 at 3:22 PM, ramonmaruko ramonmar...@gmail.com wrote: I know that this is more of a PHP OOP question, but is this possible: http://bin.cakephp.org/view/73084103 ? I think that's no problem! Haven't you tried it yet? Best regards. -- MARCELO DE F. ANDRADE (aka eleKtron)

Re: Assigning a model to a variable and accessing it

2009-02-20 Thread Marcelo Andrade
On Fri, Feb 20, 2009 at 3:22 PM, ramonmaruko ramonmar...@gmail.com wrote: I know that this is more of a PHP OOP question, but is this possible: http://bin.cakephp.org/view/73084103 ? A word of caution: it's not safe to allow the user to insert code in an uncontrolled way. In a safer version

Re: useTable ignored?

2009-02-20 Thread rb
On Feb 20, 12:26 pm, Marcelo Andrade mfandr...@gmail.com wrote: Your models must be in the singular form. Hmm.. whoops! Thanks for pointing that out --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

AC_FL_RunContent

2009-02-20 Thread AussieFreelancer
Hi all, just wondering if anyone could see why the flash in the following doesn't work: http://sjtourism.aussiefreelancer.com.au/ (big white space in the middle) while this flash does: http://sjtourism.aussiefreelancer.com.au/img/slideshow/slideshow.html The first url seems to be running the

Re: AC_FL_RunContent

2009-02-20 Thread mscdex
How does this relate to CakePHP? --~--~-~--~~~---~--~~ 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

Re: combination of validation in model and behaviour?

2009-02-20 Thread Mark (Germany)
well, this is easy - of course :) but i'd really apprechiate if it would be possible the way described above as it is very flexible to add captchas in the view echo $captcha-input(); in the controller ...-Behaviors-attach('Captcha'); and the rest would be done automatically it works -

Re: How to Redirect After Session Has Expired

2009-02-20 Thread lawwton
Is this too hard of a question? Am I the only one running into this or this is something normal, expected behavior ? Because if it is then there is something wrong with Auth. Again I am thinking I am missing something, not assuming that there is a bug or anything like that. I just need to know

ajax form field element null error

2009-02-20 Thread mrrezania
Hi, I'm trying to use the ajax-form code, as below: ?php echo $ajax-form(null,'post',array('update' = 'control'.$member['Member']['member_id'], 'url' = array('controller'='comments', 'action'='add'))). \n;? after page loaded I face this error in the Error Console: Error: element is null if

_Token missing after submitted ajax form

2009-02-20 Thread massl
Hey, this is my first post, so please be gentle to me ;) I've created an ajax form to submit some data (nothing special here). When this data is verified I'd like to redirect to another action in the same or another controller (error occurs with both variants). This also should be nothing

Is ACL right to use to filter records based on membership?

2009-02-20 Thread james revillini
I'm trying to get my head around ACL and figure out if it will be able to filter the available data down to what the user is authorized to see, or if it's just going to lock them out. Example: a regular user visits /departments/index/ (the controller wants to do a Department-paginate()) but this

Re: App::import search Cake core files in wrong paths. Bug?

2009-02-20 Thread Matt Curry
Sounds like you might have a permissions issue. Is the cake_core_file_map file getting created? On Feb 20, 2:12 pm, Martin Westin martin.westin...@gmail.com wrote: No so on my computer, which is why I thought it was strange. (Mac OS X) On Feb 20, 5:37 pm, majna majna...@gmail.com wrote:

Re: How to Redirect After Session Has Expired

2009-02-20 Thread stevel
Alfredo, I'm using ACL/Auth and I do not seem to have this problem. After the session timed out, when I tried to access any restricted places, I was redirected to the login page. Don't know if my using ACL has anything to do with it. BTW how do you tell if your session has expired? In my case,

Re: Question about the actions in aros_acos

2009-02-20 Thread stevel
I'm not an expert in this. This is my understanding. How the 4 action settings are used depends on the type of authorization mode you are using. If you select the CRUD mode Auth-authorize = 'crud', then the full functionality of the aros_acos table will be utilized, so that access will be granted

Re: How to Redirect After Session Has Expired

2009-02-20 Thread Alfredo Quiroga-Villamil
Steve: Thanks for the response. That should be the right behavior. In my case it's not doing that which is the reason why I am thinking I am missing something or have something wrong somewhere. I've posted code in my previous posts to see if there is something that I am missing. I've read the

Re: How to Redirect After Session Has Expired

2009-02-20 Thread Miles J
I have autoRedirect disabled as well but my redirect works fine. Make sure your allow() in each controller isn't allowing those pages to be viewed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: How to Redirect After Session Has Expired

2009-02-20 Thread Alfredo Quiroga-Villamil
Thanks Miles. I finally had a little bit of time to devote to this and brainstorm for a few minutes. The issue is a bit more involved than what I had originally thought. I didn't throughly think about my environment and current implementation. All my requests are being sent via ajax. This

Re: Question about the actions in aros_acos

2009-02-20 Thread Joshua
Steve, thank you! Yeah, I found this in cake source code //code /** * Determines whether the given user is authorized to perform an action. The type of * authorization used is based on the value of AuthComponent:: $authorize or the * passed $type param. * * Types: * 'controller' will

Re: Question about the actions in aros_acos

2009-02-20 Thread Joshua
I got it! //code switch ($perm['_' . $action]) { case -1: return false; case 0: