beforefilter call 3 times

2007-02-22 Thread pieceofcakephp
I have this code (below), but when it run from http://localhost/app/users/login I see the log for function beforefilter() call 3 times 2007-02-22 14:32:44 Error: login-beforefilter():0Users 2007-02-22 14:32:44 Error: defaultX.X.XUsers 2007-02-22 14:32:44 Error: login():Users 2007-02-22 14:32:44

Re: pagination component / question / typo

2007-02-22 Thread AD7six
On Feb 22, 3:27 am, jyrgen [EMAIL PROTECTED] wrote: i found that any pre-existing GET parameters are automatically sorted out and re-appended during the pagelink generation. that's really nice, because you just have to pass an initial extra parameter like this:

Re: Directory Separators / Best Practice?

2007-02-22 Thread AD7six
On Feb 22, 7:27 am, Rhett Waldock [EMAIL PROTECTED] wrote: Hello Everyone, Another thread here made me want to raise a question of best practices when defining directory paths - it really applies both in Cake and in general. I notice that the Cake convention when defining paths is to

Re: scalability tutorial?

2007-02-22 Thread StinkyTofu
This is an excerpt from an MIT textbook about building large scale websites. It has some great tips: http://philip.greenspun.com/seia/scaling The entire textbook can be found here: http://philip.greenspun.com/seia/ And here's a PHP scalability article that gives some good basic suggestions

best practice multiple checkboxes

2007-02-22 Thread szeta
Hello, I'm using CakePHP now for a few months on a project and I really love the framework. It helped me to safe a lot of time! But one thing, I always run into is, that it's not so easy to generate comfortable checkboxes (e.g. for maintaining HABTM relations). I tried e.g.

Re: file upload

2007-02-22 Thread John
Hi Or just put an index.html file in there - then if people try to browse the dierctory they will just see a blank white page... or whatever message you write in the index.html file. John --~--~-~--~~~---~--~~ You received this message because you are

Re: beforefilter call 3 times

2007-02-22 Thread the_woodsman
Interesting - to my knowledge, beforeFilter is called whenever you request a page through the dispatcher, so any calls to requestAction in your view or controller may cause beforeFilter to trigger again. Rather than logging $this-log('login-beforefilter():'.$this-bft. $this-name); Try logging

Re: move_uploaded_file function

2007-02-22 Thread AD7six
On Feb 22, 1:12 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to upload an image file . The file must not save in the database it shoud be saved in the ..\webroot\img\.. folder. Only the path of the image is to be stored in the database. In controller file Coding is as follows

Re: beforefilter call 3 times

2007-02-22 Thread AD7six
On Feb 22, 1:42 pm, the_woodsman [EMAIL PROTECTED] wrote: Interesting - to my knowledge, beforeFilter is called whenever you request a page through the dispatcher, so any calls to requestAction in your view or controller may cause beforeFilter to trigger again. Rather than logging

Re: pagination issue in 1.2

2007-02-22 Thread isk
this does not help too :) parameters still repeated. On Feb 22, 1:19 am, Cynthia [EMAIL PROTECTED] wrote: Try it with: var $paginate= array( 'limit' = 2); I don't set any page value and it works *great* for me :) On Feb 21, 3:34 pm, isk [EMAIL PROTECTED] wrote: thanks Preloader, I saw

Re: file upload

2007-02-22 Thread John
Hi Or just add a blank index.html file to the files directory - people trying to browse will just see a blank page - and of course you can edit the file to show whatever you want. John --~--~-~--~~~---~--~~ You received this message because you are subscribed

Simple Form Authentication in 1.2.x.x

2007-02-22 Thread Peadar
Hi there, I have been following this turotial on Simple Form Authentication in 1.2.x.x. ( http://bakery.cakephp.org/articles/view/212 ) When I attempt to log in it displays the following error message; 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Re: Simple Form Authentication in 1.2.x.x

2007-02-22 Thread Dr. Tarique Sani
On 2/22/07, Peadar [EMAIL PROTECTED] wrote: Hi there, I have been following this turotial on Simple Form Authentication in 1.2.x.x. ( http://bakery.cakephp.org/articles/view/212 ) When I attempt to log in it displays the following error message; 1064: You have an error in your SQL syntax;

Problem with Controller: How to mix db and posted values on edit?

2007-02-22 Thread [EMAIL PROTECTED]
I want the users of my application to be able to change only certain aspects of their profile. Limiting the fields in the save method prevents users from modifying fields like registration date or username. My problem is: If there are validation errors these read- only properties of the model

WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Hello, I'm using latest Cake 1.1. Just tried to turn on WEBSERVICES and made all as stated in manual: I created: views/layouts/rss/default.thtml views/main/rss/feed.thtml And, when accessing /rss/main/feed/ I get this error: === Missing Component File You are seeing

RE: move_uploaded_file function

2007-02-22 Thread Mariano Iglesias
Try this: if (!empty($this-data)) { $currentFile = $this-params['data']['File']['imgpath']; $filePath = WEBROOT_DIR . DS . $currentFile['name']; if (is_uploaded_file($currentFile['tmp_name']) move_uploaded_file($currentFile['tmp_name'], $filePath)) {

Re: Problem with Controller: How to mix db and posted values on edit?

2007-02-22 Thread Sergei
Just keep logged user's data (like login name and so on) in session variable. Then you can use it everywhere. For example, from my code of app_controller.php: function beforeFilter() { $this-loggeduser=$this-Session-read('Userdata'); } function beforeRender() {

RE: Problem with Controller: How to mix db and posted values on edit?

2007-02-22 Thread Mariano Iglesias
Also, don't forget to exit after the redirect(): $this-redirect('/users/index'); exit; -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge.

RE: Problem with Controller: How to mix db and posted values on edit?

2007-02-22 Thread Mariano Iglesias
Start by forcing the $id parameter to the edit action, then pass on the selected ID to the view. Then on the view set the action of the form to include this id. So on the controller set the data regardless if you got submitted information or not, like so: function edit ($id) {

Re: file upload

2007-02-22 Thread bingo
Hi, Thanks for all your reply. I think putting .htaccess is better than puttin index.html. This is because I will have multiple folders inside files directory. If I use index.html then I will need to put index.html in all the sub directory too. However, If I just put one .htaccess in the files

accessing model from inside another model

2007-02-22 Thread teesea
I'm trying to access a model from another model when I perform a save, there is no association between the two, but in the system i am trying to complete one does have a logically effect on the other and I would like to run code in one model which then runs code on another. Anyone know how to do

Re: accessing model from inside another model

2007-02-22 Thread Riky Kurniawan
You can use: 1. app_model.php 2. request action in different controller 3. var uses if you want the 2 model in the same controller -- http://riky.kurniawan.us On 2/22/07, teesea [EMAIL PROTECTED] wrote: I'm trying to access a model from

Re: WEBSERVICES doesn't work

2007-02-22 Thread Chris Hartjes
On 2/22/07, Sergei [EMAIL PROTECTED] wrote: So, how to make WEBSERVICES work? Thank you. Ah, it seems like just yesterday that we had this same discussion. Check out my blog entry where I explain in detail how to make webservices work under the 1.1x branch.

Re: WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Hi, your website doesn't work too :-) Can you paste the content of your text here? Thank you. On 22 фев, 22:27, Chris Hartjes [EMAIL PROTECTED] wrote: On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Ah, it seems like just yesterday that we had this same discussion. Check out my blog entry

RE: accessing model from inside another model

2007-02-22 Thread Mariano Iglesias
If there's no relation betweeen the two and you really need it, put this incide your model: loadModel('ModelB'); $ModelB = new ModelB(); And now you can use $ModelB as any normal model. -MI --- Remember, smart coders

Re: WEBSERVICES doesn't work

2007-02-22 Thread Samuel DeVore
it does http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-native-web-service-support/ also http://blog.samdevore.com/archives/2006/11/29/quick-and-dirty-getting-your-cakephp-to-rest/ On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Hi, your website doesn't work too :-) Can you

Re: WEBSERVICES doesn't work

2007-02-22 Thread Chris Hartjes
On 2/22/07, Samuel DeVore [EMAIL PROTECTED] wrote: it does http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-native-web-service-support/ also http://blog.samdevore.com/archives/2006/11/29/quick-and-dirty-getting-your-cakephp-to-rest/ Thanks Sam. I guess Gmail and Google

Re: Isapi_rewrite with install in a subdirectory

2007-02-22 Thread phrygius
Just to clarify, this is on the default Home page after install. Looking at the generated HTML, the CSS link url is /css/ cake.generic.css, and the image src at the bottom is /img/ cake.power.png. So, it seems that its a matter of Cake not knowing that it is in a subdirectory? On Feb 21, 4:36

Re: Problem with Controller: How to mix db and posted values on edit?

2007-02-22 Thread [EMAIL PROTECTED]
Hello Mariano, hi Sergej, using the record variable is exectly the solution I needed. Thank you very much! Thanks for the advice on exiting after the redirect. Maybe I write a custom redirect method within my app controller which includes an exit on default. Have a nice day, Andreas

How to select a country in user table

2007-02-22 Thread josoroma
I was learning cake with the IBM tutorials, and everything is working nice, is a piece of art, a piece of cake. My question, what can i have to add an use in: model, controller and view to add a select of Country in a user table? Cuz, a user can edit the information later, how to show the

Re: accessing model from inside another model

2007-02-22 Thread Riky Kurniawan
wow, I never realize loadModul Thanx Mariano -- http://riky.kurniawan.us On 2/22/07, Mariano Iglesias [EMAIL PROTECTED] wrote: If there's no relation betweeen the two and you really need it, put this incide your model:

Re: WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Thank you. So why this BUG haven't been fixed yet? On 22 фев, 22:41, Chris Hartjes [EMAIL PROTECTED] wrote: On 2/22/07, Samuel DeVore [EMAIL PROTECTED] wrote: it does http://www.littlehart.net/atthekeyboard/2006/11/29/using-cakephps-nat... also

Re: WEBSERVICES doesn't work

2007-02-22 Thread Chris Hartjes
On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Thank you. So why this BUG haven't been fixed yet? I don't know if you could call it a BUG as much as a FEATURE. Feel free to create a ticket in Trac with information on how to fix it. -- Chris Hartjes My motto for 2007: Just build it,

Re: WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Works, but.. this feature doesn't get function parameters. I have function feed($type) { } and it cannot handle urls like rss/main/feed/2/ Says that page cannot be found. On 22 фев, 23:52, Chris Hartjes [EMAIL PROTECTED] wrote: On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Thank you.

Sum problem

2007-02-22 Thread Junal Rahman
hi everybody ! im net at cakePhp. im trying to show data from different tables. i have done it. problem is i want to sum the total time of the array. let say i have data like this $data['Style']['Sp'][0]['Test'][0]['time']. i have been using a foreach loop to show the data. here Style Sp n

Re: pagination issue in 1.2

2007-02-22 Thread isk
CAN ANYBODY HELP? --~--~-~--~~~---~--~~ 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

Sessions question

2007-02-22 Thread Simon Jackson
Is it possible to retrieve session data within a model? --~--~-~--~~~---~--~~ 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,

relationships

2007-02-22 Thread miggs
first, I would like to say that cake is fantastic. I'm just having a little bit of trouble wrapping me head around relationships and how I should use them. I searched through the groups and other online resources, but I think there's something I'm just not getting. This is a rough outline of

RE: Sessions question

2007-02-22 Thread Mariano Iglesias
Anything is possible, but you shouldn't need that. What is that your model needs that is on the session? There are other ways to do so, like fetch the data you need from the session in the controller, and send it to the model. Like so: // in controller var $uses = array ('Model'); var

CSS path issues in 1.2

2007-02-22 Thread sickrandir
Hi, I decided to try the developement branch 1.2. I'm on linux+apache and for my stable installation of cake I use the method described in the manual in which the libraries are put in /usr/ lib/cake/ and the app/ directory is under the root of the apache server. For the stable installation this

Re: accessing model from inside another model

2007-02-22 Thread teesea
Thanks both of you for your help :D On 22 Feb, 15:36, Riky Kurniawan [EMAIL PROTECTED] wrote: wow, I never realize loadModul Thanx Mariano -- http://riky.kurniawan.us On 2/22/07, Mariano Iglesias [EMAIL PROTECTED] wrote: If there's

*CakePHP IRC and GoogleGroup Etiquette Suggestions*

2007-02-22 Thread John David Anderson (_psychic_)
Given the amount of traffic on this list (and traffic on our IRC channel), I'm wondering if we need to lay down some guidelines. Anyone have any suggestions? Here are a few of mine: disclaimerThis list reflects my own personal opinions/disclaimer - If you don't bother to Google your issue

Re: [C] Problem with custom validation

2007-02-22 Thread abba bryant
I last hit the svn about 2 weeks ago and found that the validation using html-tagE... versus validator-tagE... wasn't quite the same. The html helper expected a regex string as an argument while yours accepts an array. Perhaps it has changed. I will give the ajax and recent svn a look-see. A

Re: Cake 1.2 pagination using hasAndBelongToMany association!

2007-02-22 Thread nate
This is not currently supported. On Feb 22, 2:52 am, Vu Nguyen [EMAIL PROTECTED] wrote: I'm having this problem with cake 1.2 pagination: Things work well if I just want to search and paginate data on 1 model (i.e: $this-paginate(Entry, $condition);) However, if Entry can have and belong

Re: Custom tags.php not working in 1.2

2007-02-22 Thread nateklaiber
I am now having the same issue in 1.2 trying to create custom tags. The previous loadConfig file used to parse an ini file. Now, it looks to be including a tags.php file. Is it now looking for a tags array or still an ini format? Also, does it need to be manually loaded in custom helpers? On

Using a existing session

2007-02-22 Thread dhalsim
Hi, I'm using 1.2alpha release to make the administration interface of a web application which already use a session. How can I setup cakePHP to use this session without destroy it ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: WEBSERVICES doesn't work

2007-02-22 Thread Chris Hartjes
On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Works, but.. this feature doesn't get function parameters. I have function feed($type) { } and it cannot handle urls like rss/main/feed/2/ Says that page cannot be found. Oh, I see what you're talking about. I'm curious about what you're

Password validation

2007-02-22 Thread josesquared
Hey Everyone, I'm new to cake and I would like to know how I could validate a password and a re-enter password input field in cake. Obviously, the re-enter password input field does not belong in the database. I tried using the invalidate function in my controller and it doesn't seem to work.

Re: Password validation

2007-02-22 Thread Chris Hartjes
On 2/22/07, josesquared [EMAIL PROTECTED] wrote: Hey Everyone, I'm new to cake and I would like to know how I could validate a password and a re-enter password input field in cake. Obviously, the re-enter password input field does not belong in the database. I tried using the invalidate

Re: Baking @ fosdem?

2007-02-22 Thread [EMAIL PROTECTED]
Just bumping this thread once more Fosdem will be this weekend !! and it will be great :) just look at the schedule which is now very full http://www.fosdem.org/2007/schedule/days ps: normally Joe Hewitt would have give a session about firebug, but he couldn't make it :( so now Dries Buytaert

Download weather toolbar

2007-02-22 Thread asit
Download Weather Toolbar - Instant weather reports, forecasts, and radar images anytime for FREE! - http://surl.in/HLWTD238206SVRAKSX-google --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post

Download weather toolbar

2007-02-22 Thread asit
Download Weather Toolbar - Instant weather reports, forecasts, and radar images anytime for FREE! - http://surl.in/HLWTD238206SVRAKSX-google --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post

RE: *CakePHP IRC and GoogleGroup Etiquette Suggestions*

2007-02-22 Thread Mariano Iglesias
Sounds good, also add something that we've seen happening a lot this past few days: - Do not only give your best effort to write using good manners, but also the best grammar you can possibly use. Do not post a 1500 words sentence with no punctuation whatsoever on just one paragraph. It doesn't

RE: Baking @ fosdem?

2007-02-22 Thread Mariano Iglesias
These are the things that make me envy you guys up there. You get like 100 developer conferences a day in the US, lucky bastards ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be

RE: Download weather toolbar

2007-02-22 Thread Mariano Iglesias
OH COME ON. Let all spammers burn in hell. -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: Baking @ fosdem?

2007-02-22 Thread Mariano Iglesias
Ops, my bad, it is in Belgium ;) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar

Re: Sessions question

2007-02-22 Thread nate
You could be taking about one of two things here. If you're referring to database-driven sessions, then see here: https://trac.cakephp.org/ticket/1163 This is an enhancement that will (most likely) be implemented before 1.2 final. If you mean accessing session data in your model, then Mariano

Accessing DB session data from outside app

2007-02-22 Thread kitten
Hi, Someone knows how to access Cake session data (that has been saved to DB) from an external app? I certainly can select the appropriate record from the session table, but how to get the data column in human readable form? I don't really understand the code that does this in the CakeSession

Pagination Page Numbers in 1.2?

2007-02-22 Thread Jon M.
I am curious if anyone can show me how to add selectable page numbers along side the prev and next links. Having 50 pages and having to click next 50 times to get to the last page is not fun :) so if someone can help me out with that ... I would be very thankful :D !

Re: scalability tutorial?

2007-02-22 Thread Bootstrapper
Thanks! Can't wait to dig into these. --~--~-~--~~~---~--~~ 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

beforeFind example

2007-02-22 Thread Mikee Freedom
afternoon all, a very simple one. all i would like to do is make sure certain fields are being included in any read / find / findAll. Could someone have a look at the code and see where my problem might lie? function beforeFind($queryData) { if (!empty($queryData['fields']))

Re: Download weather toolbar

2007-02-22 Thread djiize
They ARE Hell! On 22 fév, 22:58, Mariano Iglesias [EMAIL PROTECTED] wrote: OH COME ON. Let all spammers burn in hell. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be

Re: WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Yep, I had to make different functions for different types of content. On 23 фев, 04:26, Chris Hartjes [EMAIL PROTECTED] wrote: On 2/22/07, Sergei [EMAIL PROTECTED] wrote: Works, but.. this feature doesn't get function parameters. Oh, I see what you're talking about. I'm curious about what

Re: Sum problem

2007-02-22 Thread Eric C Blount
Please explain how this problem relates to CakePHP, not simply to PHP. foreach($yourArray as $yourValue) $totalTime += $yourValue; Eric On 2/22/07, Junal Rahman [EMAIL PROTECTED] wrote: hi everybody ! im net at cakePhp. im trying to show data from different tables. i have done it.

Re: WEBSERVICES doesn't work

2007-02-22 Thread Sergei
Strangely the feed returns Content-type: text/html while it must return text/xml. On 23 фев, 09:17, Sergei [EMAIL PROTECTED] wrote: Yep, I had to make different functions for different types of content. --~--~-~--~~~---~--~~ You received this message because

Multiple Paths for Models/Views/Controllers in paths.php

2007-02-22 Thread Max
Hi Guys, I've been trying to write up more complex applications with Cake. However, I'm stuck at a place... I want Cake to load models/views/ controllers from multiple directories since the main application is divided in various modules which are being developed individually... Any ideas will be

Re: Multiple Paths for Models/Views/Controllers in paths.php

2007-02-22 Thread Max
OOPS After looking 2 hours into core code, I just found something from simple bootstrap.php... lol /** * The settings below can be used to set additional paths to models, views and controllers. * This is related to Ticket #470 (https://trac.cakephp.org/ticket/ 470) * * $modelPaths =

RE: Multiple Paths for Models/Views/Controllers in paths.php

2007-02-22 Thread Mariano Iglesias
Try setting them on your app/config/bootstrap.php like so: $modelPaths = array ( '/some/other/path/models' // Custom ); // Standard model path is added automatically by Configure:: __buildModelPaths() You get this by looking at: 1. cake/basics.php - loadModels() has this:

RE: Multiple Paths for Models/Views/Controllers in paths.php

2007-02-22 Thread Mariano Iglesias
Regarding point 1 below: I was looking at loadModels(), but loadModel() has the same: function loadModel($name = null) { // ... if (!is_null($name) !class_exists($name)) { $name = Inflector::underscore($name); $paths = Configure::getInstance();

Re: *CakePHP IRC and GoogleGroup Etiquette Suggestions*

2007-02-22 Thread Dr. Tarique Sani
On 2/23/07, Mariano Iglesias [EMAIL PROTECTED] wrote: Sounds good, also add something that we've seen happening a lot this past few days: http://groups.yahoo.com/group/in-phpug/files/guidelines.html This is what I have been using since a long time BUT most of the people never bother to read

Re: CakePHP configuration on WAMP - directory path settings?

2007-02-22 Thread spheroid2007
With the modified settings, I get the correct cake default page when i go to http://locahost/cakeApp1. But, when starting the examples in Cook up websites fast with Cake Part 1, I go to http://localhost/cakeApp1/users/register and get a Page cannot be found