handling acl warnig

2011-09-13 Thread luca capra
Hi all, I'm using the acl component on 2.0. I get the "AclNode::node() - Couldn't find %s node identified by \"%s\" warning message which isn't user friendly and stop redirection for example after saving a record. Is there a workaround to stop the warning and keep debug at 2, so app can be de

Duplicate emails sent.

2011-09-13 Thread #2Will
Hello My little app is sending duplicates of its emails. Here is an example function: [code] $this->log($media); App::uses('CakeEmail', 'Network/Email'); $CakeEmail = new CakeEmail(); $CakeEmail->viewVars(array('media'=>$media, 'person'=>$person)); $CakeEmail->from(Configure::read('app.email'));

Re: Overriding cakephp core functions

2011-09-13 Thread Ryan Schmidt
On Sep 13, 2011, at 19:47, Chris Cinelli wrote: > if it is your argument and you feel strong on how difficult is to access you > DB, why don't you store the passwords in clear in your DB? So that, when I browse my database, I can't read my users' passwords. Thank you by the way for bringing up

Re: 'Site under maintenance' option

2011-09-13 Thread ecsyle
I like this idea. On Sep 13, 7:25 pm, Juan Basso wrote: > You can use a non-cake solution that is use htaccess (or any rewrite > rule from different http server) that check if file app/webroot/ > maintenance.html is present. If is there, show the file to any > request. So you can delete/create/re

Re: Overriding cakephp core functions

2011-09-13 Thread Greg Skerman
As a serious aside... if the Auth component/hashPasswords won't do it for you, could you not subclass the auth component: BcryptAuthComponent extends AuthComponent { } and replace the 'offending' bits of the code so it *does* work for you? again, never tried (never saw the need) but if there is

Editing data

2011-09-13 Thread nOLL
Hi, I have a form that use 2 models(A,B). For create and view function it was run perfectly, but there is a problem when editing the form. I use B controller for all the function(CRUD) and i only can edit the B table attributes but for A attributes the data remain the same. I follow this http://b

Re: Overriding cakephp core functions

2011-09-13 Thread Greg Skerman
I don't assume my system is invulnerable.. just as you should not assume bcrypt is invulnerable (its at least as vulnerable as everything else from the perspective of brute forcing/attacking at the login form). I do however take reasonable steps to reduce the risk of my system being attacked r

Re: 'Site under maintenance' option

2011-09-13 Thread Juan Basso
You can use a non-cake solution that is use htaccess (or any rewrite rule from different http server) that check if file app/webroot/ maintenance.html is present. If is there, show the file to any request. So you can delete/create/rename the maintenance file to enable/disable. Faster :) Juan Bass

Re: Overriding cakephp core functions

2011-09-13 Thread Chris Cinelli
Again, if you assume that your system is invulnerable, why complicating your life using hashed passwords in the database, then? Put them in DB in clear. I understand that getting the DB and the salt may not be trivial. However every once in a while vulnerabilities are discovered and bad guys can be

Re: Overriding cakephp core functions

2011-09-13 Thread Greg Skerman
The inference is that every cake application is magically vulnerable to an attack predicated on ridiculously weak passwords and the highly unlikely occurance that the attacker has both the salt and unfettered access to the database. If you are so convinced, couldn't you override AuthComponent::has

Re: Overriding cakephp core functions

2011-09-13 Thread Chris Cinelli
Or maybe, Paypal is using bcrypt. :-P Yes, of course you need the user table in the DB, but if it is your argument and you feel strong on how difficult is to access you DB, why don't you store the passwords in clear in your DB? I am not saying that it is easy to do, but in case it happen (see Rock

Re: 'Site under maintenance' option

2011-09-13 Thread ecsyle
I have a boolean set in my AppController to enable/disable the site. If the site is disabled, I run $this->cakeError('maintenance') to send the user to a custom error page explaining that the site is down for maintenance. I also use a .lock file in the webroot to automatically disable the site whe

Re: Overriding cakephp core functions

2011-09-13 Thread Greg Skerman
On Wed, Sep 14, 2011 at 8:33 AM, Chris Cinelli < chris.cine...@formativelearning.com> wrote: > > > According to: http://research.microsoft.com/pubs/74164/www2007.pdf *~20% > of Fidelity, ~20% of NY Times, ~15% of Paypal* have a password with bit > strength of 30 or less. According to that study, t

Re: Overriding cakephp core functions

2011-09-13 Thread Greg Skerman
**nothing** absolutely protects you from brute force. your bcrypt is just as vulnerable to a plain jane dictionary attack as anything else. If you have generated all possible passwords, its just a case of (painstakingly slow) trail and error to get you in. Changing the hashing approach wont change

Re: Overriding cakephp core functions

2011-09-13 Thread Chris Cinelli
If you have the access to the DB, you have probably have the access to the salt too. Salts protect you against rainbow tables, not against brute forcing. While to brute force a 46 character password would take more than the life of our sun, you have to consider what is the bit strength of the avera

Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-13 Thread 0x20h
Tom, from the stack trace of the error message on your site I conclude that you checked out the latest 1.3 branch, not Cake 1.3.11. Since the release of 1.3.11 there has been a change on writing cache files to gain atomicity, so I guess that error is a bug. Am 13.09.2011 22:54, schrieb Tom Belkn

Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-13 Thread Tom Belknap
Here's the thing: these files and folders are supposed to be managed by Cake. I'm not required to *create* the directories, other than making sure that the app/tmp/cache directory is created. All of the basic caching directories are there and they're all set to 777. The directories that come pr

Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-13 Thread LipeDjow
Hi, The error is 'No such file or directory' and not 'Permission denied', so I don't think it has relation with permissions. Check if every level of the path exists (remember that linux is case-sensitive, so cache != Cache). This may sound silly, but sometimes we are concerned with more advance

Re: fopen(.../app/tmp/cache/persistent/cake_core_default_en-us) [function.fopen]: failed to open stream: No such file or directory

2011-09-13 Thread Tom Belknap
And yes, by the way: I've attempted to clear those files. Actually, the error seems to be indicating that the CakePHP system was unable to create the folders (they do not, in fact, exist). Seems like, beyond my problem, a patch should be developed to work around this problem: if there is a prob

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread Xoubaman
I will suggest the correction to the documentation. Thanks for the answers! -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscrib

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread Xoubaman
I'm talking to correct this sentence (from http://book.cakephp.org/view/1086/set): In your view file you can do $this->set('activeMenuButton', 'posts'); *Then in your layout the $activeMenuButton variable will be available and contain the value 'posts'.* because it should say that the var will

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread mark_story
It totally does, it does not however, come with a time-machine. Once you understand the constraints of time and space, and the fact that you cannot inject local variables into a different execution stack frame in PHP it works exactly the same. Having to update the cake docs about these constraint

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread mark_story
On Sep 13, 11:54 am, gremlin wrote: > Keep in mind - when you are doing $this->set from an element: You > aren't calling View::set - you are calling Element::set. Why would you > expect that to behave as if it was an instance of the View class when > it isn't? Also, the two pass rendering of Cak

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread gremlin
Keep in mind - when you are doing $this->set from an element: You aren't calling View::set - you are calling Element::set. Why would you expect that to behave as if it was an instance of the View class when it isn't? Also, the two pass rendering of CakePHP means that in order for what you propose t

Re: display last 5 inserted image

2011-09-13 Thread Tilen Majerle
explain more...where are images, which model is used itd something like this $images = $this->ImageModel->find('all', array( 'order' => array( 'ImageModel.id' => 'DESC' ), 'limit' => 5 )); -- Lep pozdrav, Tilen Majerle http://majerle.eu 2011/9/13 Sivaramakrishnan S > hi, > > i nee

display last 5 inserted image

2011-09-13 Thread Sivaramakrishnan S
hi, i need to display last five inserted image, anyone can help me to fix this problem -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. T

Re: cakephp 2.0 naming external datasource in database.php

2011-09-13 Thread Salines
Ispravka All my datasource files are placed in app /model/datasource as eg * youtube_source.php* -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related quest

cakephp 2.0 naming external datasource in database.php

2011-09-13 Thread Salines
Hi, please tell me how to correctly naming the external data source in the database.php. All my datasource files are placed in app /model/datasource as eg youtube.php. *database.php* : '*YoutubeSource*', . ?> Or as described for twitter example in http://book.cakephp.org/2.0/en

Re: Overriding cakephp core functions

2011-09-13 Thread AD7six
On Sep 13, 3:02 pm, AD7six wrote: > On Sep 13, 3:21 am, Chris Cinelli > > wrote: > > Read the link I posted. 40 secs to bruteforce crack an hash > > How about: how long on average to brute force a sha1-ed 46 char a-zA- > Z0-9 string? > > That's the default hash for cake 1.3, and the length of t

Re: Overriding cakephp core functions

2011-09-13 Thread AD7six
On Sep 13, 3:21 am, Chris Cinelli wrote: > Read the link I posted. 40 secs to bruteforce crack an hash How about: how long on average to brute force a sha1-ed 46 char a-zA- Z0-9 string? That's the default hash for cake 1.3, and the length of the salted string with a 6 char (weak) password. Quo

Re: last inserted id

2011-09-13 Thread David Cole
$this->Page->save($this->data); $id = $this->Page->getLastInsertID(); On Sep 12, 8:52 am, Sivaramakrishnan S wrote: > hi' >   I need to retrive data from last inserted id, how  to get the last > inserted id from mysql database... -- Our newest site for the community: CakePHP Video Tutorials h

Re: Containable behavior

2011-09-13 Thread David Cole
$this->Page->contain(array('AssociatedModel')); $this->Page->find('all); Try the above, your problem I believe is: $this->Milestone->Behaviors->attach('Containable'); This looks incorrect to me. Regards, Dave On Sep 12, 1:59 pm, Silver Lu wrote: > Hi Guys, > > I need a little help with the Co

Translate behaviour not working as expected

2011-09-13 Thread Gabe
Hi all, I am using translate behaviour with multiple translate tables and I have configured it according to book.cakephp.org but when there is no translation for an article I get empty strings instead of one of my other translation. I would appreciate any suggestions Gabe -- Our newest site for

Media plugin transferTo

2011-09-13 Thread ZAky
I save my posts files under /files/[user_id]/[post_id]/[image]. This mean I need to know the just seved post id in Post->transfer_to. How do I achieve that? Thank you -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site ht

Re: image insertion

2011-09-13 Thread Nitin Hittalamani
Hi, Mention relative image path in src field. On Tue, Sep 13, 2011 at 3:55 PM, Sivaramakrishnan S wrote: > > > hi, > > my code n template: > foreach($bookid as $id){ > // echo 'book image path:'.$id['Book']['front_page']; > $imgpath = $id['Book']['front_page']; > // echo $imgpath; >

Re: 'Site under maintenance' option

2011-09-13 Thread Xoubaman
I mean is my second option. I'm Spanish and made a literal translation of a Spanish expression, maybe it isn't correct in English. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others

Re: Using $this->set in view doesn't set the var

2011-09-13 Thread Xoubaman
I think doc needs a correction then, as Var::set doesn't work exactly analogous to Controller::set. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related qu

Re: image insertion

2011-09-13 Thread Sivaramakrishnan S
hi, my code n template: foreach($bookid as $id){ // echo 'book image path:'.$id['Book']['front_page']; $imgpath = $id['Book']['front_page']; // echo $imgpath; echo ''; echo ''; echo ''; echo ''; echo ''; echo $id['Book']['book_name'].''; echo '';

Re: Why is this better?

2011-09-13 Thread WebbedIT
Yip, it's all about using wrapper functions so when you want to suddenly treat those tags differently you change one function and that function instantly starts doing as you want. It's all about tradeofffs - if you believe that tag and your routes are never going to change then hard coding tags m

Re: Making a "Complex search"

2011-09-13 Thread WebbedIT
Show us what you have tried so far ... it will be easier to make sense of your SQL or Cake conditions On Sep 12, 9:01 am, CaStarCo wrote: > Hello, I have a doubt about the best way to do a complex search. > > I have a model "Agreements", every agreement entity have a 'state' field, > wich can ha

Re: HeLp me 'bout make form in cakephp

2011-09-13 Thread WebbedIT
Hi nola, I assume english is not your first language as it's pretty difficult from your question to understand how to help you. It appears your struggling with the basics of CakePHP so the best thing to do is read through the book a couple of times and complete the blog tutorial and you will then

Re: Containable behavior

2011-09-13 Thread WebbedIT
Containable does not run one database call inolving all your conditions. In this example it does the following (pseudocode) SELECT all Milestones FOREACH(Milestones AS Milestone) { SELECT ALL Task WHERE Task.milestone_id = Milestone.id AND Task.assignee_id = $user_id SELECT ALL Project WHERE

Re: Which is the better IDE for cakePHP?

2011-09-13 Thread Nitin Hittalamani
Hi, I prefer PHP Eclipse On Tue, Sep 13, 2011 at 3:20 PM, Tran Cao Thai wrote: > You should open the source page and see whether the path is correct or not > > > On Tue, Sep 13, 2011 at 3:50 PM, AD7six wrote: > >> >> >> On Sep 13, 8:38 am, clod wrote: >> > I use free PHP IDE http://www.code

Re: image insertion

2011-09-13 Thread Nitin Hittalamani
HI, mention the code...!!! So i can see and let you know ...!!! On Tue, Sep 13, 2011 at 3:21 PM, Tran Cao Thai wrote: > You should open the source page and see whether the path is correct or not > > > On Tue, Sep 13, 2011 at 4:38 PM, Sivaramakrishnan S > wrote: > >> >> hi, >> >> Thanks for the

Re: image insertion

2011-09-13 Thread Tran Cao Thai
You should open the source page and see whether the path is correct or not On Tue, Sep 13, 2011 at 4:38 PM, Sivaramakrishnan S wrote: > > hi, > > Thanks for the reply, I tried the both, but no use. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Che

Re: Which is the better IDE for cakePHP?

2011-09-13 Thread Tran Cao Thai
You should open the source page and see whether the path is correct or not On Tue, Sep 13, 2011 at 3:50 PM, AD7six wrote: > > > On Sep 13, 8:38 am, clod wrote: > > I use free PHP IDE http://www.codelobster.comCodelobster PHP Edition > with > > special CakePHP plug-in for Autocompelte for Help

Re: image insertion

2011-09-13 Thread Sivaramakrishnan S
hi, Thanks for the reply, I tried the both, but no use. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group,

Re: Overriding cakephp core functions

2011-09-13 Thread WebbedIT
@Chris: you've got to backup such serious claims with more than that. Do you seriously think with all the highly skilled developers involved with the core of CakePHP that any of them would be happy with a password encryption process that could be crute force decrypted in 40secs? Not many people, i

Re: custom validation rules - custom message

2011-09-13 Thread Christophe Vandeplas
Thanks Paul On Fri, Sep 9, 2011 at 9:18 AM, WebbedIT wrote: > Google is your friend.  A search for 'cakephp return link in > validation error': > http://www.google.co.uk/search?q=cakephp+return+link+in+validation+error&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a > > To

Re: Which is the better IDE for cakePHP?

2011-09-13 Thread AD7six
On Sep 13, 8:38 am, clod wrote: > I use free PHP IDE  http://www.codelobster.comCodelobster PHP Edition  with > special CakePHP plug-in for Autocompelte for Helpers, Components and > Behaviors . I use a crayon and a recently painted wall -- Our newest site for the community: CakePHP Video Tut

Re: image insertion

2011-09-13 Thread Tran Cao Thai
make sure about your image path in database is relative path On Tue, Sep 13, 2011 at 3:02 PM, Andras Kende wrote: > what is ? > > Andras Kende > > > On Sep 13, 2011, at 2:14 AM, Sivaramakrishnan S wrote: > > > hi, > > i save the image path in mysql field.i get that path in controller > > and s

Re: CakePHP without naming convention. is it possible?

2011-09-13 Thread Cruisine
many thanks to you guys. i do appreciate for all ur replies here. i found it really useful to me. and yeah, i already decided that i could continue using cakephp as my framework (thnks god). yeah, i'd been searching many posts related to this issue and guess what, i didn't see there are lots of pro

Re: image insertion

2011-09-13 Thread Andras Kende
what is ? Andras Kende On Sep 13, 2011, at 2:14 AM, Sivaramakrishnan S wrote: > hi, > i save the image path in mysql field.i get that path in controller > and send it to template to print the image by using > $html->image($path), but this one is not working for me, so anyone can > help to fix

image insertion

2011-09-13 Thread Sivaramakrishnan S
hi, i save the image path in mysql field.i get that path in controller and send it to template to print the image by using $html->image($path), but this one is not working for me, so anyone can help to fix this problem Thanks in advance, shiva -- Our newest site for the community: CakePHP Vide