Re: cakePHP and ecommerce security reisks

2007-10-12 Thread Olexandr Melnyk
The information is valuable to the attacker only if s/he has the access to the database (read: there is a security hole in the application). There may still be a way to get the field list from the table (eg. SHOW CREATE TABLE for MySQL) once an attacker can execute own SQL statements on the

Re: Cakephp - generating excel files.

2007-10-12 Thread [EMAIL PROTECTED]
With regard to 4, what platform are you developing on? Matt Kosoy wrote: Hello. I'm having a ton of problems trying to get cakephp to generate excel files correctly, and I was wondering if anyone out there has any info/ suggestions. So far I have tried the following: 1. Re-writing a

Cache gone crazy!

2007-10-12 Thread dfgonzalez
Hello people, I'm using CakePHP 1.2 and this is what's happening: My cache works correctly only with one action in one controller, any other actions in other controllers does not work. BUT the craziest thing is that if I clone the working action (changing it's name), the new action that is

Re: Session

2007-10-12 Thread [EMAIL PROTECTED]
I have try to set define('CAKE_SECURITY', 'high'); but when the browser is closed the session does not expire. On 12 Ott, 00:27, Grant Cox [EMAIL PROTECTED] wrote: There have been threads like this before, where the question was really why are Cake sessions persisting even after closing and

Re: Cakephp - generating excel files.

2007-10-12 Thread Mike Green
You may be trying too hard with what you are trying to achieve Excel will take a file made up basically of tables in html. as long as you send a header like: ContentType = application/vnd.ms-excel then the following format for the data (note, no HTML, HEAD or other tags) TABLE TRTD2/TD/TR

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread Mech7
Well to be honest this is one point that is not as clearly pointed out in the tutorials and manual as it should have been. On Oct 12, 2:22 pm, AD7six [EMAIL PROTECTED] wrote: On Oct 12, 10:28 am, Sharkoon [EMAIL PROTECTED] wrote: Well he's got a point. When I have this:

model called Model, scaffold problem.

2007-10-12 Thread Austen
Hi all, I have a problem with using scaffold on a model called 'Model'. I can't seem to find an answer in the groups... All the other models in my app work correctly under scaffolding, except the 'Model' model which does not join with the 'HardwareType' or 'HardDrive' models like it is supposed

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make /products/byCategory/$catId work. I.e. display in that page the Category details and then do exactly the same as you would with the index. - Do you mean that I

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make /products/byCategory/$catId work. I.e. display in that page the Category details and then do exactly the same as you would with the index. - Do you mean that I

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make /products/byCategory/$catId work. I.e. display in that page the Category details and then do exactly the same as you would with the index. - Do you mean that I

Re: update the view with flush()?

2007-10-12 Thread sucram
How do I correct this: ob_start(); for($i = 0; $i count($mails); $i++) { ob_clean(); $mails[$i]['error'] = false; $this-set('data',$mails);

Re: Eclipse code completion in Views

2007-10-12 Thread Mech7
Btw does anybody know how to have the codeassist popup automatically? Like with Zend neon? no ctrl + space needed? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread Mech7
It would be nice idea if this is pointed out in big red letters in the blog tutorial and manual ;) As i think allot of users will be overlooking on this. On Oct 12, 2:58 pm, djiize [EMAIL PROTECTED] wrote: One best practice, specify which fields are to be

Re: generateList from seperate table, having problems.

2007-10-12 Thread Chambrln
If you want a list of all authors, not just authors associated to that lesson use: $this-User-generateList(..); (fill in with what you had) I'm assuming your controller has $uses = arra('Lessons', 'Users'); or similar... On Oct 12, 8:04 am, EVan [EMAIL PROTECTED] wrote: My application

Re: Phpmailer compoent error

2007-10-12 Thread Chris
Hi Danielle, On Oct 12, 5:34 pm, Danielle Tilley [EMAIL PROTECTED] wrote: Have you told the the UsersController to use the email component? var $components= array('Email'); I was about to say off course I have, but I'd declared var $components= array('email'); instead, (no capital E) One

Issue on IIS

2007-10-12 Thread patcoll
I'm having some problems with simple page dispatching on IIS. After circumventing the BASE_URL routing, which doesn't work on this IIS (the following gives a 404): index.php/controller/action Even the manual url variable pass doesn't work: index.php?url=controller/action And I get this error

Re: Strange The requested address 500.shtml was not found on this server. error

2007-10-12 Thread elimpa
On Oct 12, 7:27 am, Wi1d [EMAIL PROTECTED] wrote: I've had a strange error on some of the views on a new 1.2 application. The errors only occurred when I uploaded them to my shared hosting on Site5. It ran fine on my Gentoo Apache 2.2.6 server but after uploading I noticed that any view that

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Sorry for repeating postwhen I first submit the message, it don't comes up.. I post several times until it appears~_~ This is my first time to the google groupapologize for the wrong post i On Oct 12, 10:20 pm, Wayne Fay [EMAIL PROTECTED] wrote: I think you can stop hitting

Re: Phpmailer compoent error

2007-10-12 Thread Danielle Tilley
Have you told the the UsersController to use the email component? var $components= array('Email'); Chris wrote: Hi Guys I've been trying to use the PHPMailer Compoent as described in http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer But I get the following error..

Re: Session

2007-10-12 Thread Danielle Tilley
Some browsers including FireFox require you to close all open browser windows before the session cookies will expire. [EMAIL PROTECTED] wrote: I have try to set define('CAKE_SECURITY', 'high'); but when the browser is closed the session does not expire. On 12 Ott, 00:27, Grant Cox

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Wayne Fay
I think you can stop hitting send... Five copies of the same email is enough. Wayne On 10/12/07, Alpha [EMAIL PROTECTED] wrote: Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make

passing error- and flash-messages from a behavior

2007-10-12 Thread LW
Is it possible to pass error- and flash-messages from a behavior 'beforeSave'-mesthod to a controller / view? thanks LW --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send

Phpmailer compoent error

2007-10-12 Thread Chris
Hi Guys I've been trying to use the PHPMailer Compoent as described in http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer But I get the following error.. Fatal error: Call to undefined method stdClass::send() in F:\xampplite \htdocs\cake\app\controllers\users_controller.php

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make /products/byCategory/$catId work. I.e. display in that page the Category details and then do exactly the same as you would with the index. - Do you mean that I

Re: Cakephp - generating excel files.

2007-10-12 Thread Matt Kosoy
Did you mean method # 3? Method #2 is used as a component - sorry. On Oct 11, 7:20 pm, Grant Cox [EMAIL PROTECTED] wrote: We use a modified version of the helper on the Bakery (#2 in your list). We found that same issue of larger files being invalid - this was fixed by just removing the

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread grigri
AD7six: to be fair, the whitelist is not in the manual. It is in the api though... I'm wondering how I missed that! On Oct 12, 1:22 pm, AD7six [EMAIL PROTECTED] wrote: On Oct 12, 10:28 am, Sharkoon [EMAIL PROTECTED] wrote: Well he's got a point. When I have this:

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread grigri
Well, sure - $this-User-save() will save any correct data in the array. But the user doesn't have access to model functions, only controller functions (actions). And in your controller action you should always, always, always validate the data being transmitted. This isn't cakephp-specific, it's

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread djiize
One best practice, specify which fields are to be saved: http://api.cakephp.org/1.2/class_model.html#ebe42ae387be89985b5a35dd428f5c81 The third argument of the Model-save() is an array List of fields to allow to be written and in your CREATE TABLE, add DEFAULT 0 to active field. On 12 oct,

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread AD7six
On Oct 12, 10:28 am, Sharkoon [EMAIL PROTECTED] wrote: Well he's got a point. When I have this: $form-input('User.email'); $form-input('User.password'); and put via firebug input type=text name=data[User][active] value=1 and then $this-User-save($this-data); It saves active as

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Dr. Tarique Sani
On 10/12/07, Alpha [EMAIL PROTECTED] wrote: Did I ask the wrong question ? or in a wrong way ?. Kindly let me know You will most likely have to wait for Andy to come along and answer that for you T -- =

update the view with flush()?

2007-10-12 Thread sucram
Hi! I'm writing a newsletters module, and I want to update the rendered view while i'm in the for loop ... #CODE for($i = 0; $i count($mails); $i++) { //Here comes the send function ... $mails[$i]['error'] = false; //If everything is ok set error to false; $this-set('data',$mails); }

Re: cakePHP and ecommerce security reisks

2007-10-12 Thread Sharkoon
Well he's got a point. When I have this: $form-input('User.email'); $form-input('User.password'); and put via firebug input type=text name=data[User][active] value=1 and then $this-User-save($this-data); It saves active as well!!! A huge security risk!!

Re: Translate to different languages in same controller

2007-10-12 Thread Nico
Help anybody? Doesn't anybody else has translation issues like this? I'd appreciate some help, thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: SoftDelete Behavior not working

2007-10-12 Thread RLR
Thanks grigri alot for pointing that out! I spent several hours trying to find whats wrong. Have a great day! On Oct 11, 1:17 pm, grigri [EMAIL PROTECTED] wrote: it's $actsAs, not $actAs On Oct 10, 8:46 pm, RLR [EMAIL PROTECTED] wrote: I am trying to use the SoftDelete behavior as

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Did I ask the wrong question ? or in a wrong way ?. Kindly let me know If the question has no solutionalso let me know... at least I may stop struggling on it.. Many thanks~ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread AD7six
On Oct 11, 6:14 pm, Alpha [EMAIL PROTECTED] wrote: I have simply two table Products -id -name -category_id Categories -id -name Product $belongsTo Category with foreign key category_id Category $hasMany Product with foreign key category_id Views / Controllers are then cooked

Re: Cakephp - generating excel files.

2007-10-12 Thread Matt Kosoy
Hey Everyone - thanks for your suggestions and help Mr. Xeeton -- we're developing on a redhat linux box running PHP 4.4 -- i'm not sure which version of PEAR is installed, but i do know that we're getting some Open_basedir warnings/errors when trying to access PEAR from cake.i think it's

Re: Pagination for model with association (cake 1.1)

2007-10-12 Thread Alpha
Dear Andy, You mean you view the Category and want to see and paginate the related products? - yeah , exactly~ Easiest way it to make /products/byCategory/$catId work. I.e. display in that page the Category details and then do exactly the same as you would with the index. - Do you mean that I

New 1.2 coming? 5750?

2007-10-12 Thread MikeK
I noticed when I hit the 1.2 online Cake API the 1.2 label has changed to 1.2.05750branch Is a new release coming? I saw nothing in the release notes or anything. Where else should I look for more details? --~--~-~--~~~---~--~~ You received this message because

Re: generateList from seperate table, having problems.

2007-10-12 Thread EVan
I've tried just doing that but I get the error: Undefined property: LessonsController::$User I expected that to result in an error because I'm writing this code in the lessons_controller not the users_controller. Here's the complete function that I'm trying to add to the controller... function

RE: New 1.2 coming? 5750?

2007-10-12 Thread Mariano Iglesias
When there's a new release it will get posted here, and in the bakery. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog:

Re: Layout code being overlooked

2007-10-12 Thread ifcanduela
I've been tinkering with it for a while with absolutely no success, so if anybody has any insight, it would be great to hear it. -Igor On Oct 10, 5:00 pm, ifcanduela [EMAIL PROTECTED] wrote: Hello everybody, I have a strange problem: the HTML and PHP/Cake code in the layout THTML document

Re: 1.2.5750?

2007-10-12 Thread Gwoo
Yeah, hopefully. But in reality, there are already a lot of people using the 1.2 branch which currently stands at 5750. There have been enough changes to new features since the last release revision to warrant an update. Also, it was a good excuse to use the new layout

Re: 1.2.5750?

2007-10-12 Thread rtconner
You couldn't read 6 posts down even? It's still on the first page. On Oct 12, 1:40 pm, j-rod [EMAIL PROTECTED] wrote: Just saw this version 1.2.5750 in the API section. Does this mean there will be a new release soon? --~--~-~--~~~---~--~~ You received this

1.2.5750?

2007-10-12 Thread j-rod
Just saw this version 1.2.5750 in the API section. Does this mean there will be a new release soon? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: Best/proper way to save HABTM?

2007-10-12 Thread [EMAIL PROTECTED]
If you've constructed the relationships properly, you shouldn't be specifying 'Resource' in your save call. You should just have this: $this-Resource-save($this-data); All the HABTM rows will get saved automatically. Using checkboxes in your html you might have something like this: input

Re: model called Model, scaffold problem.

2007-10-12 Thread nate
Given that the name of the class which AppModel extends is itself called Model (inside the CakePHP core), this question should answer itself. On Oct 12, 8:51 am, Austen [EMAIL PROTECTED] wrote: Hi all, I have a problem with using scaffold on a model called 'Model'. I can't seem to find an

Re: passing error- and flash-messages from a behavior

2007-10-12 Thread nate
No, not directly. You could use the behavior to set a property in the model, which is checked for in the controller. On Oct 12, 9:45 am, LW [EMAIL PROTECTED] wrote: Is it possible to pass error- and flash-messages from a behavior 'beforeSave'-mesthod to a controller / view? thanks LW

Re: Layout code being overlooked

2007-10-12 Thread nate
My first guess would be that there's a fatal error in your view which is preventing execution from continuing. If this is not a public site, I would suggest turning on debugging, and making sure errors are being displayed, and error reporting is on in your PHP configuration. On Oct 12, 2:06 pm,

Join table issues

2007-10-12 Thread Dave M.
Hi all, I am working on a CakePHP app where people can view and sign up for classes (or 'meetings', as i have called them. That was the best synonym i could think up for the reserved word of 'class'). Unfortunately, i can't change the existing database structure, so i am trying my best to work

Warning (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]

2007-10-12 Thread [EMAIL PROTECTED]
Does anyone know why I get this warning. And how do I get around it? I'm using cake_1.2.0.5427alpha the code comes from IBM's tutorial at: https://www6.software.ibm.com/developerworks/education/os-php-cake1/section4.html Their code: ?php echo $html-formTag('/users/register') ? pPlease fill out

Re: Warning (512): Method HtmlHelper::formTag does not exist [CORE/cake/libs/view/helper.php, line 148]

2007-10-12 Thread Wayne Fay
That code was written for Cake v1.1. The formTag method has been deprecated in v1.2. You'll need to revert to v1.1 or rewrite the code to use FormHelper directly. Wayne On 10/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Does anyone know why I get this warning. And how do I get around it?

Question re. models

2007-10-12 Thread CakeONaut
Hi! I have a model query - at first I thought it was recursive but when I found such references in the cakephp manual I think perhaps not. The situation is this: I have one table with many tabs. There is another table full of renovation images that I want displayed when people click on a tab

Re: Layout code being overlooked

2007-10-12 Thread CakeONaut
Hi! A while back I had .htaccess missing in one location and it caused my layout not to be accessed. . . Good luck! -Will --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group,