Re: Mod Rewrite problem

2009-02-09 Thread Webweave
, Webweave webwe...@gmail.com wrote: You need to add the RewriteBase to the .htaccess files in the folder where you blog is. Assuming that blog.mywebsite.com is set up to serve the files from the /blog folder, you just need to make sure you have the .htaccess files as described here:http

Re: Mod Rewrite problem

2009-02-08 Thread Webweave
You need to add the RewriteBase to the .htaccess files in the folder where you blog is. Assuming that blog.mywebsite.com is set up to serve the files from the /blog folder, you just need to make sure you have the .htaccess files as described here:

Re: Can a variable defined in one view file be used in another ?

2009-02-07 Thread Webweave
Personally, I like the ability to pass variables to elements, it allows me to reuse them on the same view. For instance I have a page that displays two tables of the same type of data: one is volunteer time slots that people can still sign up for, and the other is to show the time slots that the

Re: Database question, How do I represent a zero in a zero to one relationship?

2009-02-07 Thread Webweave
Just means that there is a child table that has at most one row that is related to the parent, but also could have none. On Feb 7, 1:53 am, WebbedIT p...@webbedit.co.uk wrote: Forgive me for asking what seems a dumb question .. but what is a zero to one relationship (don't snigger too loudly

Re: Customized View for each User

2009-02-06 Thread Webweave
You get the currently authenticated user information from the Auth object, so in your controller, you reference: $userId = $this-Auth-user('id'); You can then use the value in your find to restrict the data. On Feb 3, 7:47 pm, psa developer@gmail.com wrote: Hello. I'm new to cakePHP. I

Re: trouble when i try to use OOP with Cake

2009-02-05 Thread Webweave
There is no requirement to have a one-to-one relationship between models and controllers. Chris Hartjes talks about this in his blog: http://www.littlehart.net/atthekeyboard/2009/01/04/cakephp-mythbusters/ You can run your entire application with a single controller if that makes sense for you.

Re: Beginner: Cake PHP and XAMPP (windows)

2009-02-05 Thread Webweave
That error is usually seen when your .htaccess files are not in the right places. Look at http://book.cakephp.org/view/37/Apache-and-mod_rewrite On Feb 4, 8:43 am, Celso cels...@gmail.com wrote: I thanks! I did! However, I have this error:   Error: NotesController Create the class below in

Re: utf-8 encoding problem

2009-02-03 Thread Webweave
/search?hl=enrls=igq=%D9%85%D9%82%D8%A7%D9%84btnG=Search, but even that does the correct search. On Feb 3, 3:50 am, mohammad al-ani alani.moham...@gmail.com wrote: Webweave i didn't know how to explain my problem well because of my poor English but to know what i mean with my problem just open your

Re: Auth not hashing passwd with scaffolded controller?

2009-02-03 Thread Webweave
Once you turn on Auth, the passwords will get hashed automagically by Cake (assuming you have 'Auth' in your $components, and your beforeFilter logic is right). If you have existing rows that were added before you turned Auth on, you will likely need to update them so that they get stored in the

Re: utf-8 encoding problem

2009-02-03 Thread Webweave
The ci flavors are for case-insensitive versions, so if you want John to be equal to john with no case conversion, you use one of them. The utf8_bin is the normal collation. On Feb 3, 10:28 am, BrendonKoz brendon...@hotmail.com wrote: While on this subject, which MySQL table encoding is the

Re: Calling select queries within find()

2009-02-03 Thread Webweave
The only change you need to make is to add the model name in front of the star, and to make sure the count syntax results in a usable field name: find('all', array('fields' = array('Post.*', '(SELECT COUNT(1) FROM comments Comment WHERE Comment.post_id = Post.id) AS comment_count'))); On Feb 3,

Re: utf-8 encoding problem

2009-02-02 Thread Webweave
Well, that to me would seem to mean that you are indeed trying to access the page from a page that is not defined as UTF-8. From Firefox, if I type مقال into the Google search box, I get a return search of

Re: how to config my habtm?

2009-02-02 Thread Webweave
You simply tell the model what the name of the table is as described here: http://book.cakephp.org/view/436/useTable You can always use existing table structure, it's just a little easier with things that follow the Cake convention. I do something similar with the primary key fields in my DB,

Re: Hello to all !!! How to code for Cakephp

2009-01-30 Thread Webweave
Best place to start is http://www.cakephp.org, and read the Cookbook at http://book.cakephp.org/view/4/Beginning-With-CakePHP ... On Jan 30, 1:07 am, maulik@gmail.com maulik@gmail.com wrote: hi to all frnds !!! i m just a beginner for cakephp. i want to learn so many things in cakephp.

Re: CakeAmfphp

2009-01-30 Thread Webweave
A quick search gives a Bakery article about it: http://tinyurl.com/c838jz The first result is the CakeAMFPHP site, and the second is the Bakery article on using it. On Jan 29, 11:10 pm, laaptu sani...@gmail.com wrote: I am new to the cakephp framework. I am an actionscript programmer and I

Re: AJAX in CakePHP

2009-01-30 Thread Webweave
The AjaxHelper utilizes the ever-popular Prototype and script.aculo.us libraries for Ajax operations and client side effects (see: http://book.cakephp.org/view/208/AJAX) You can use any JS libraries you want, and most of them have articles in the Bakery about how to do so. Try

Re: Vote for add Cakephp into Netbeans

2009-01-30 Thread Webweave
for debugging cake since it is properly structured classes, methods etc. It is just a super-sized php application. So it would seem the only perk is interface design, which I tend to avoid in IDEs since they usually add alot of extraneous code. Just my opinion though. On Jan 29, 11:45 am, Webweave

Re: utf-8 encoding problem

2009-01-30 Thread Webweave
How did you save your files? Are you working on Windows (using character set windows-1256) ? Windoze by default saves files on the file system with the default ANSI character set. In order to get it to save as UTF-8, you have to explicitly tell it to (e.g. in Notepad change the dropdown for

Re: Any one looking for a freelance work

2009-01-30 Thread Webweave
Post your req at http://withcake.com/ On Jan 25, 12:55 am, Novice Programmer novice.prog...@gmail.com wrote: Hello, Please get in touch with me if you are looking for a freelance work. I have a site based on cakephp and want to add a few features to it. -- Thanks Regards, Novice.

Re: my html can't be show very good.

2009-01-30 Thread Webweave
Most of the IDE's and editors will let you do a global search and replace like that. I use NetBeans, and would just do a shift-command-H to bring up the Replace in projects dialog (another argument for using a modern IDE). On Jan 24, 2:03 am, Rimoe meiyo...@gmail.com wrote: Thanks,it's the

Re: for create home.ctp page

2009-01-30 Thread Webweave
Read the cookbook, and then run 'cake bake' to build your skeleton views is the easiest thing: http://book.cakephp.org/view/108/The-CakePHP-Console On Jan 29, 11:18 pm, sagu sarvaiya.sag...@gmail.com wrote: Hey group  I am just beginner with cake php framework.. So how to create .ctp  file

Re: __mergeHasMany causing EXTREMELY slow data retrieval

2009-01-30 Thread Webweave
The exponential number would happen if your join isn't right. Are you saying that it's fetching 8 million rows, or that you think there's a looping bug in the code? On Jan 19, 7:48 am, Dan grip...@gmail.com wrote: On Jan 16, 4:57 pm, Miles J mileswjohn...@gmail.com wrote: Why do you even

Re: CakePHP Model Advice

2009-01-29 Thread Webweave
What are you seeing in the debug data for your Recipe find? Post the controller code where you do the find, and what the data output is, and it will be easier for someone to answer your question. On Jan 28, 1:29 pm, matth matt...@gmail.com wrote: Thanks for that tidbit about the Ingredient

Re: Vote for add Cakephp into Netbeans

2009-01-29 Thread Webweave
C'mon people, there are only 84 votes out there - If NetBeans adds Cake support I'm guessing not only would it do the cool IDE stuff it does now, but we'd be able to debug, and some level of front end for baking (like ModelBaker) On Jan 28, 9:11 am, matt m...@madesecure.com wrote: Great idea!

Re: Creating a tagging system for uploaded images

2009-01-29 Thread Webweave
I'm not sure that I understand your question. What is the error you are getting? How are you doing the update of the related data (save, saveAll) ? On Jan 28, 9:18 am, foldiman vi...@vinceallen.com wrote: Can anyone give general strategy advice on building a tagging system? I'm creating an

Re: Get count of related model

2009-01-29 Thread Webweave
You could just add a count to the fields that you are fetching like: $this-Foo-find('all', array('fields' = array('Foo.*', '(select count (1) from bars Bar where Bar.foo_id = Foo.id) as bar_count'))); I use this approach both with fields and it can also be used with conditions when you need to

Re: Which editor for Mac OS X?

2009-01-29 Thread Webweave
I use NetBeans with Cake and haven't seen any serious shortcomings on code completion, can you elaborate ? My only complaint with the PHP support in NB has been that it feels a bit like a bolt-on, but as the past has shown I'm sure the NB team will continue to rapidly improve that. There's also

Re: Which editor for Mac OS X?

2009-01-29 Thread Webweave
On Jan 25, 10:49 am, leo ponton@gmail.com wrote: Sorry to be slow getting back - we've had a thirty hour power outage following a storm that ripped off roofs and uprooted trees. A little unusual here in Spain. @everybody and nobody, I dislike Eclipse and Netbeans because 1. (without

Re: CakePHP Model Advice

2009-01-29 Thread Webweave
] = Array         (         ) ) On Jan 29, 11:37 am, Webweave webwe...@gmail.com wrote: What are you seeing in the debug data for your Recipe find? Post the controller code where you do the find, and what the data output is, and it will be easier for someone to answer your question. On Jan

Re: Fatal error: CakePHP core could not be found

2009-01-23 Thread Webweave
It looks like you must have a typo in one of your config files. The word PATH_SEPARATOR is being placed in your PATH instead of the path separator charater (:), so there has to be a typo where you are setting up the include path. On Jan 23, 5:42 am, Mono sirmonit...@gmail.com wrote: Hello!!

Re: Which editor for Mac OS X?

2009-01-23 Thread Webweave
What's your objection to NetBeans? If you're using it as a PHP editor and it has all the code sense stuff like Komodo but seems to be more stable to me. On Jan 23, 6:01 am, leo ponton@gmail.com wrote: Having spent months trying to find an adequate editor for Windows, I eventually settled

Re: XML help

2009-01-21 Thread Webweave
Of course it depends on what you're trying to do, but ... It's pretty much built in to Cake, all you need to do is set up the routing and add code if you need it. I wrote a bit about it here: http://blog.accuweaver.com/2008/12/04/cakephp-and-restful-web-services/ On Jan 21, 1:57 am, tjr88

Re: HABTM - fields in jointable

2009-01-21 Thread Webweave
? i haven't find :( On 19 Gen, 17:03, Webweave webwe...@gmail.com wrote: What do you mean it doesn't work? Is it not firing, or are you getting an error ? On Jan 19, 7:05 am, Ernesto e.fanz...@gmail.com wrote: uhm... i -partially- found the solution... if i load data from

Re: Relationships - HABTM

2009-01-21 Thread Webweave
http://book.cakephp.org/view/439/recursive On Jan 19, 7:57 am, rhythmicde...@gmail.com rhythmicde...@gmail.com wrote: I have been making some pretty good headway on defining the relationships for my models. However I am not getting some data that I expect to get. This may be due to my

Re: MVC Desing tips

2009-01-21 Thread Webweave
I would suggest going through the Cookbook and doing a bake to get started. My typical dev cycle for Cake is: 1. Build some tables 2. Bake the app 3. Bake the models, views and controllers 4. Modify as needed. See: http://book.cakephp.org/view/113/Code-Generation-with-Bake On Jan

Re: getLastInsertId or something similar

2009-01-21 Thread Webweave
It will only return a value after you do an insert (a save of the new Event). Post the action you are having trouble with, and perhaps we can spot the issue. On Jan 19, 3:41 pm, mike mwu...@gmail.com wrote: eeerrr, this is not working. I have this in the User model: var $hasMany = array

Re: getLastInsertId or something similar

2009-01-21 Thread Webweave
controller is where I'm trying to get the event_id I just inserted. On Jan 21, 4:49 pm, Webweave webwe...@gmail.com wrote: It will only return a value after you do an insert (a save of the new Event). Post the action you are having trouble with, and perhaps we can spot the issue. On Jan 19

Re: MVC Desing tips

2009-01-21 Thread Webweave
Yes, there is a learning curve for Cake, it took me a couple of weeks to even figure out that bake was the right way to get started. On Jan 21, 2:03 pm, Andrea Cardinale mirt...@gmail.com wrote: On Wed, Jan 21, 2009 at 9:39 PM, Webweave webwe...@gmail.com wrote: I would suggest going through

Re: Dynamic Model Call

2009-01-21 Thread Webweave
OK, I'm not sure why you are trying to do the late binding and use a variable model name, but my guess would be that there is something that hasn't been set up in the normal Cake magic of loading the code that has caused something not to be initialized. What is the rest of the stack for the

Re: HABTM - fields in jointable

2009-01-19 Thread Webweave
What do you mean it doesn't work? Is it not firing, or are you getting an error ? On Jan 19, 7:05 am, Ernesto e.fanz...@gmail.com wrote: uhm... i -partially- found the solution... if i load data from Customers_Controller the order_customer::afterFind doesn't work... On 19 Gen, 15:29,

Re: edit function is not working

2009-01-18 Thread Webweave
OK, I've responded about this exact code before. Just rewrite the function with Cake conventions, and remove the direct MySQL updates and you should be fine. Your code is updating the record after the save, when you could simply do the save with the query value from the count query, which should

Re: Counting Tags. What is the find() syntax?

2009-01-18 Thread Webweave
Easiest way I've found is just to include a select field in the query like: $data = $this-find(all, array( fields=array( Tag.id, Tag.name, (select COUNT(Article.id) from

Re: getLastInsertId or something similar

2009-01-18 Thread Webweave
You don't have to have two forms, you just have to save things in the right order. I do this on one of my volunteer signup (http://volunteercake.sf.net). Before the user is logged in, I display a list of jobs they can sign up for, if they click on the 'signup' link, I take them to a page that

Re: Installation on a shared server (Hostmysite.com)

2009-01-18 Thread Webweave
You may need to update your .htaccess with the RewriteBase directive: RewriteBase / This one change has always fixed my problems with shared hosting servers. On Jan 16, 5:34 pm, PHPScriptKiddy curl.rob...@gmail.com wrote: Hi guys, I am new to cakePHP, and am trying to set up a dev

Re: Model Loading the Wrong Model

2009-01-18 Thread Webweave
Your belongsTo for 'Friend' is set up to use the 'User' model. If you want the Friend model loaded, you need to tell it to load that class instead. On Jan 16, 8:57 am, Chad Casselman ccassel...@gmail.com wrote: I am building a social network and work on the users, requests, friends portion.

Re: How to use cake console for baking

2009-01-18 Thread Webweave
It's in the manual (http://book.cakephp.org/view/113/Code-Generation- with-Bake), what is the problem you are having ? On Jan 16, 8:41 am, mona poojapinj...@gmail.com wrote: Can anybody tell me how to use bake.php for baking in cakephp1.2 i know how to use this in cakephp1.1 but i don't know

Re: Distant Association Issue

2009-01-18 Thread Webweave
Just change your query to: $this-EventDeadline-PayGroup-User-find('all', array( 'conditions'=array('User.id'=$user['User']['id']), 'order'='EventDeadline.due_start_date' 'recursive' = 2)); That should fetch the related data for you (http://book.cakephp.org/ view/439/recursive)

Re: unwanted user_id increase

2009-01-18 Thread Webweave
Looks like a documentation bug, you need to get the inserted ID before you can save the related data, so the code really should be: $this-data['Profile']['user_id'] = $user['User']['id']; Alternatively, you could use: $this-data['Profile']['user_id'] = $this-User-getLastInsertId();

Re: multiple httpd.conf files

2009-01-18 Thread Webweave
correctly to the root of your   cake app folder. On Jan 14, 2009, at 3:44 PM, Webweave wrote: Looks like you are running on Mac. If you're using the built in web server, then it is located at / private/etc/apache2/httpd.conf The 'which' command doesn't find files, it just tells you

Re: Questions about forms / validation

2009-01-18 Thread Webweave
The only reason your data would be getting reset, would be that you've done a find again before the form is redisplayed. Could you post the code for your edit so we can see what you're doing ? On Jan 14, 11:45 pm, Miles J mileswjohn...@gmail.com wrote: So Im working on this area where users

Re: there is something missing

2009-01-18 Thread Webweave
The automated tool is just a convenience, so no you don't need to understand it. You can manage ACOs completely with bake if you want to. I don't understand the rest of your post, looks like a reply to something. On Jan 13, 3:56 pm, Delirium tremens pedbe...@gmail.com wrote: We'll be doing

Re: Updating a User Record

2009-01-18 Thread Webweave
Then you just need to set the model and tell it what the primary key is: $primaryKey = email; Then $this-Administrator-id would be the the email. You might also need to set the Auth fields to match (I do this in my App controller's beforeFilter): $this-Auth-fields = array('username' =

Re: get method validation

2009-01-18 Thread Webweave
Not clear on what your question means, are you asking about validation rules? On Jan 18, 7:30 am, Delirium tremens pedbe...@gmail.com wrote: How to validate an id passed not by post, but by get? I do not have to output an error message to hackers and crackers, do I? I tested using /

Re: baking cakephp on MAC OS

2009-01-18 Thread Webweave
Looks to me like you ran into the same problem as I did here: http://blog.accuweaver.com/2008/12/20/moving-my-volunteercake-to-my-mac/ Basically your MySQL and PHP are not configured the same way, so you need to change one of them so that PHP can talk to MySQL. This is a pure PHP problem, the

Re: get method validation

2009-01-18 Thread Webweave
Not sure I do, looks like you got a partial post. The validate 'numeric' for id, will validate the data for your id column as numeric. You don't even need that if the field is numeric as there wouldn't be allowed automatically. IF on the other hand you are asking how do I detect if a value was

Re: Writing to a database from a view

2009-01-14 Thread Webweave
I would suggest you run through baking a small app to see how the MVC bits fit together (http://book.cakephp.org/view/113/Code-Generation- with-Bake) The Model is where your data and business logic goes. The Controller handles getting the data from the Model and preparing it for the View. The

Re: Bake scripts without shell access

2009-01-14 Thread Webweave
What I do is to do the bake locally (on my Mac or PC) and then upload it to the server. Normally then all you need to do is modify your config files and .htaccess to be correct for the server you are hosting on. On Jan 14, 11:06 am, Bob Albert b...@superstan.com wrote: I'm new to this group

Re: How to load HABTM Joining model in a plugin?

2009-01-14 Thread Webweave
Can you post your HABTM from your models ? It looks like you have the model file in the right place, so my guess is that the problem is in there. On Jan 14, 4:59 am, Martin Westin martin.westin...@gmail.com wrote: Hi everyone, This is the first time I have tried to make a real model for a

Re: Writing to a database from a view

2009-01-14 Thread Webweave
You will find the data you need in $this-data after the form has submitted (assuming your form is built correctly and posting to the right action). On Jan 14, 1:39 pm, xybersoftw...@gmail.com xybersoftw...@gmail.com wrote: Ok got it to write to the database from the controller by hard coding:

Re: multiple httpd.conf files

2009-01-14 Thread Webweave
Looks like you are running on Mac. If you're using the built in web server, then it is located at / private/etc/apache2/httpd.conf The 'which' command doesn't find files, it just tells you where the executable is in your path. On Jan 13, 3:54 pm, neridaj neri...@gmail.com wrote: Hello, I

Re: validation message are not coming

2009-01-13 Thread Webweave
Like grigri says, read the manual and use Cake functionality. Below is your add function rewritten (completely untested of course) to use Cake conventions: function add(){ $this-set('sections', $this-Entry-Section-find('list',array ('fields'='Section.section','Section.id'))); if

Re: ie7 urls messed up - http:///appname/ rather than http://localhost/appname/

2009-01-13 Thread Webweave
Sounds like you are not getting a reverse DNS for localhost. Try using 127.0.0.1 as your host name and see if IE7 works with that (or do a nslookup on localhost). On Jan 13, 1:34 am, will will.ev...@the-omni-group.net wrote: Hi there, My CakePHP app is working fine in firefox.  In ie7,

Re: Fighting cakephp : can't add user count to group index

2009-01-13 Thread Webweave
Just add the field and groupings to the find (http://book.cakephp.org/ view/73/Retrieving-Your-Data) find('all', array('fields' = array('Group.*', '(COUNT(*)) as group_count', 'User.username') 'group' = array('Group.id', 'Group.name', 'Group.created', 'Group.modified',

Re: counterCache is not working in 1.2

2009-01-13 Thread Webweave
Looks to me like your relationships may not be correct. Can you post your hasMany/hasOne and belongsTo for each of the models (User/Project/Topic) ? On Jan 12, 9:45 pm, Sergei yatse...@gmail.com wrote: I think I found a bug in generated countercache query: UPDATE `projects` AS `Project` LEFT

Re: ACL's permission problem

2009-01-12 Thread Webweave
From my experience with this, the user gets redirected back to the page that they came from. If you go to http://volunteercake.sf.net and login as jdoe/jdoe, then try to go to http://volunteercake.sf.net/slots, you'll get the You are not authorized to access that location. error and be

Re: hasMany + belongsTo relationship problem

2009-01-12 Thread Webweave
forgot to paste the var $primaryKey in my model's code. sorry. everything is working fine in my app. i just can't fetch Location Types starting from persons. i'll take a look @ containable behaviour. thx again On 8 Gen, 21:43, Webweave webwe...@gmail.com wrote: Since you are using non

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Why do you have the echo in test action of your controller ? That's going to break things even if everything else was OK. If you set debug to 2 or 3, you should get the SQL that was produced, which will help diagnose your issue. I don't think you should be calling the test method in the model,

Re: belongsTo not working on a HABTM

2009-01-12 Thread Webweave
Sounds like there was something wrong with your model in that case. Did you have your corresponding hasMany/hasOne in your Topic and Entry models ? What 'extra data' were you not getting that you expected ? On Jan 12, 12:50 pm, Miles J mileswjohn...@gmail.com wrote: Ive tried many different

Re: Deployment Issues

2009-01-11 Thread Webweave
Sounds like you may have a problem with your .htaccess or routing. Are you using the default .htaccess files ? Is mod_rewrite enabled ? On Jan 10, 5:35 pm, Chad Casselman ccassel...@gmail.com wrote: I have been developing my first cake app locally for the past few days.  I uploaded the files

Re: Session trouble

2009-01-11 Thread Webweave
First, you really don't want to read the session from the view, it should be done from the controller. Second, the error you are getting sounds like the value wasn't set in the session, so either you are referencing what you set incorrectly, or you need to query for it. The last inserted ID

Re: Deployment Issues

2009-01-11 Thread Webweave
, Webweave webwe...@gmail.com wrote: Sounds like you may have a problem with your .htaccess or routing. Are you using the default .htaccess files ? Is mod_rewrite enabled ? On Jan 10, 5:35 pm, Chad Casselman ccassel...@gmail.com wrote: I have been developing my first cake app locally

Re: Loading models within the controller action

2009-01-11 Thread Webweave
I'm confused by your question, why wouldn't you just add the model to your $uses: http://book.cakephp.org/view/53/components-helpers-and-uses That's the standard way of including a model in your controller. On Jan 10, 10:56 pm, Miles J mileswjohn...@gmail.com wrote: Der... I could call

Re: Cake ACL check

2009-01-11 Thread Webweave
As long as everything is set up properly for your app, you can just cd to the app directory and run the following from a command prompt: cake schema run create DbAcl If you don't have Cake in your path, you may need to change it to be something like: path_to_cake/console/cake schema run create

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

2009-01-11 Thread Webweave
Try adding an isAuthorized method to your AppController: /** * Function to return whether you are authorized or not. * * @return type */ function isAuthorized() { return true; } On Jan 9, 7:31 am, volka volker.b...@googlemail.com wrote: Hi there, i have

Re: How to do this in cakephp

2009-01-08 Thread Webweave
I'm not sure I understand your question, but if you have a field you want to save a counter in, you can do this in the model using countCache: http://book.cakephp.org/view/445/cacheQueries If on the other hand you need to find the count from some set of values, you can simply use find('count'):

Re: ModelBaker ... umm... yummy

2009-01-06 Thread Webweave
It's on their web site now: 399 for an individual license. Hope they at least donated to CakePHP On Jan 4, 6:03 pm, Webweave webwe...@gmail.com wrote: Yeah, CakeApp, that was it (although webbaker looks interesting too). Anybody have an idea whether ModelBaker is going cost anything

Re: Problem after uploading to host - mod_rewrite is enabled apparently

2009-01-05 Thread Webweave
You have to look in the httpd.conf file to see if it is allowed or not. You should see something like LoadModule rewrite_module libexec/ httpd/mod_rewrite.so or (for Apache 1.3) AddModule mod_rewrite.c in your httpd.conf. See: http://book.cakephp.org/view/333/A-Note-on-mod_rewrite On Jan 5,

Re: custom SQL query - all values IN() bust be AND

2009-01-05 Thread Webweave
I'm not really clear on what it is you are trying to fetch. Are you trying to restrict your results by the associated values? The results you show can be fetched using a normal find('all') assuming your models are correct. Just add another select count to the conditions like:

Re: Auth Redirect And Routes

2009-01-05 Thread Webweave
Don't set the loginRedirect in your beforeFilter, and then just use $this-Auth-redirect() in your login function as follows: /** * Login function - this is where we do the login ... */ function login() { if ($this-Auth-user()) {

Re: debug a failed save()

2009-01-05 Thread Webweave
Did you try setting debug=2 or 3 so you can see the queries that were executed, and the data ? The code you posted doesn't show you disabling validation, Cake does the validation unless you a) remove any validation from the model or b) you explicitly turn off validation in your save call.

Re: List users who are logged in

2009-01-05 Thread Webweave
You can get some of this if you set up your app to use the database to store sessions. Look at config/core.php where it talks about setting Session.save to 'database' On Jan 5, 10:50 am, Bernardo Vieira bvieira.li...@gmail.com wrote: AFAIK you'd need to create custom login and logout actions in

Re: New Install Does Not Show Graphics

2009-01-05 Thread Webweave
It should be compiled into Apache so you shouldn't have to download it separately. What platform are you on? On Jan 5, 1:31 pm, reidster reidmckin...@gmail.com wrote: This is all I see in modules.  I know this isn't an apache group. But, do you know if apache requires any special configure

Re: setting up cake bake console

2009-01-05 Thread Webweave
Step 1: change directory to where your app lives (in your example above /Users/myusername/myappname) Step 2: from a console, type cake bake Step 3: follow the prompts ... On Jan 5, 1:15 pm, gemmes variouspix...@googlemail.com wrote: Hi, I ran: cake bake I entered my path to appname and

Re: 404 error

2009-01-05 Thread Webweave
Your app is in a sub-directory, if you want it to be in the root, you need to change your configuration or move the app up a directory. Apparently you have the app for posts in the root for that web server, which is why it works with /posts/edit On Jan 5, 12:43 pm, sarahlou

Re: New Install Does Not Show Graphics

2009-01-05 Thread Webweave
: Webweave, Thanks for your interest. Here is the configuration. Configuration: PHP Version 5.2.8 Apache/2.2.11 Linux 2.6.18-92.1.22.el5 #1 (CentOS 5.2) Cake 1.2.0.7962 I have cake directory downloaded and extracted into the htdocs directory. [r...@localhost rillian_cake]# pwd /usr

Re: HABTM and associations and loading

2009-01-04 Thread Webweave
What do you mean never runs ? Do you mean it times out, or dies, or what ? On Jan 4, 4:32 pm, Troy Schmidt schmidt.t...@gmail.com wrote: I have a database of 20 tables and several belongsTo, hasMany, and HABTM relationships.  When I have all my relationships loaded into the models and turned

Re: HABTM naming convention messed up?

2009-01-04 Thread Webweave
Please post your HABTM from your TeamUser model. Seems like you have a problem there. Should look something like (guessing): // Link to jobs var $hasAndBelongsToMany = array( 'TeamUser' = array( 'className' = 'TeamUser',

Re: Validation errors for the wrong form

2009-01-04 Thread Webweave
I think this is related to the controller, and you need to implement something like Multivalidatable (see: http://bakery.cakephp.org/articles/view/multivalidatablebehavior-using-many-validation-rulesets-per-model) I have this in my user_controller to deal with login, registration and signup,

Re: ModelBaker ... umm... yummy

2009-01-04 Thread Webweave
Yeah, CakeApp, that was it (although webbaker looks interesting too). Anybody have an idea whether ModelBaker is going cost anything? On Jan 4, 7:35 am, Bernardo Vieira bvieira.li...@gmail.com wrote: Maybe cakeapp?http://cakeapp.com Drinkspiller wrote: There was a web based thing floating

Re: creating tmp-folder on install

2009-01-04 Thread Webweave
It depends on the users and groups that own your app directory on the server. If the two users belong to the same group, and the permissions are set properly with group having full permissions on app, then you should be able to create the app/tmp directory. The other issue you may run into is

Re: getting content from another content type into a static page

2009-01-04 Thread Webweave
Elements sound like the right thing, but you can always use a model anywhere you like, and Cake does some really nice magic for you in most cases where you'd want to do this. Sounds like you are wanting to get some specific data displayed on your home page, which would involve adding the models

Re: Edit multiple models in the same page: possible?

2009-01-04 Thread Webweave
All you need to do is handle the related models in the same form. There's no need to separate into two forms unless that's your intention. I have many pages where I update data from one form into multiple models (e.g. - register a user and sign him up for a job, which involves creating a row in

Re: ModelBaker ... umm... yummy

2009-01-02 Thread Webweave
There was a web based thing floating around I saw posted on this group too (unfortunately I used it once and have promptly forgotten the URL). It had a lot of the same features, and was driving the build through the web (even had a slick GUI table building tool). On Jan 2, 11:44 am, Bernardo

Re: putting 2 modules on the same page

2009-01-02 Thread Webweave
The element refers to data just like any other view. I use an element to display task listings, and by choosing which data to pass to the element, I get different displays on the same page: div class=related ?php if (isset($userSlots)):? h3?php __('You are signed up for');?/h3 ?php

Re: problem with crating a table structure for the acl

2009-01-02 Thread Webweave
You are probably running cake from the wrong directory. Change directory to your app, then run the command (cake has to find your DB connection in the database.php file). On Jan 1, 8:26 am, vikas vikas...@gmail.com wrote: hello all.. HAPPY NEW YEAR... Still problem contenious with ACL in new

Re: Conditional find on recursive belongsTo association

2009-01-02 Thread Webweave
Probably just a typo, but it should be 'foreignKey' not 'foriegnKey' ... All you need to do is set the recursive level on your parent model, and you should get all the related data: $this-Staff-recursive = 2; Or set recursive in your find. On Dec 30 2008, 3:58 am, WebbedIT p...@webbedit.co.uk

Re: Small problem passing variables

2009-01-02 Thread Webweave
these to the views? On Dec 29, 4:22 pm, Webweave webwe...@gmail.com wrote: I think you meant $this-User-getLastInsertId(); On Dec 28, 9:59 am, Troy Schmidt schmidt.t...@gmail.com wrote: $this-User-getInsertID(); I don't know about the Auth component as i haven't used it alot

Re: TCPDF error: Some data has already been output, can't send PDF file

2009-01-02 Thread Webweave
You are getting redirected to the login page (probably because your action is not in the allowed list). Post your beforeFilter() so we can see what the problem is, but my guess would be the same as robechar: you are being asked to login. On Dec 29 2008, 1:08 pm, BrianRehg brianr...@gmail.com

Re: API

2009-01-02 Thread Webweave
My experience is that you are much better off looking at the cookbook for that sort of information. In a few cases the API docs are very clear as to what the options are and how to use them, but often it requires a lot of digging to understand them. What part of the API are you having trouble

Re: Selecting users who are not friends

2009-01-02 Thread Webweave
First, you should reall be using find('all') not findAll, as in: $friends = $this-User-find('all', array('conditions' = array ('User.id' = $target))); To find all the users who are not friends, simply use the following: $notFriends = $this-User-find('all', array('conditions' = array

  1   2   >