Re: Installing CakePHP on Windows

2007-04-07 Thread Devraj Mukherjee
Ensure that you are allowing Override of variables using .htaccess files and that mod_rewrite is turned on On 4/7/07, etng [EMAIL PROTECTED] wrote: find DirectoryIndex index.html index.html.var change it to : DirectoryIndex index.php index.html index.htm Then everything will go ok

how to deal with $this-User-findById('3')['User']['name']

2007-04-07 Thread [EMAIL PROTECTED]
when code in cake,I always encounter the situation $this-User- findById('3')['User']['name'] ,something like that. but it doesn't work.I know.I used to coding like this :$foo = $this- User-findById('3'); $foo['User']['name'],but I am really tired of that . so what really need to be done in php?

the controller::flash() function doesn't work

2007-04-07 Thread [EMAIL PROTECTED]
it just doesn't work. it shows the msg but doesn't do the redirect job. --~--~-~--~~~---~--~~ 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

Re: the controller::flash() function doesn't work

2007-04-07 Thread jyrgen
flash itself won't redirect. $this-Session-setFlash('Invalid id for Article.'); $this-redirect('/articles/search'); works for me. paste some code. cheers, jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: the controller::flash() function doesn't work

2007-04-07 Thread Larry E. Masters aka PhpNut
Try setting DEBUG = 0 in core.php Read the doc comment above the define also... -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ --~--~-~--~~~---~--~~ You received this

RE: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread Mariano Iglesias
If you recently downloaded, guess you *DID* read the announcement: http://bakery.cakephp.org/articles/view/322 We are still working on the new documentation, but there is some good information already on the Bakery and in some of the blogs about the new features. -MI

Re: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread Dr. Tarique Sani
On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I recently moved to the 1.2.0 version ,a lot of things change . There isn't any but if you run the code through phpDoc you will get decent api documentation. However moves from 1.1 to 1.2 are much less painful than moves between some of

unserialize error

2007-04-07 Thread jyrgen
i'm still struggling with reading data from the sessions table. at least i'm now able to retrieve session entries, after i set up a simple model like this. class Session extends AppModel{ var $name = 'Session'; } but when i try to print out the session data in a controller

Re: unserialize error

2007-04-07 Thread majna
Also I need to grab username from session. Sessions are set to database. Cake 1.1.13. Session data filed is NOT just serilalized. Is there any other way beside reg exp? On Apr 7, 12:22 pm, jyrgen [EMAIL PROTECTED] wrote: i'm still struggling with reading data from the sessions table. at

Re: unserialize error

2007-04-07 Thread jyrgen
oops. i just noticed that the Session model interferes with the Session object. therefore i renamed the Session model into mysession.php class Mysession extends AppModel{ var $name = 'Mysession'; var $useTable = 'sessions'; } j.

Re: unserialize error

2007-04-07 Thread jyrgen
valid sessions on my system look like this Config|a:3:{s:4:rand;i:1735136669;s:4:time;i:1175943092;s: 9:userAgent;s:32:cc98eaffc23c634e0efd75ab9e36e810;} User|a:5:{s:2:id;s:1:6;s:9:author_id;s:1:5;s: 12:publisher_id;s:1:0;s:9:logged_in;i:1;s:4:type;s:1:A;} (two arrays) i'm asking myself if the

Re: Making REST Requests to a web-server like yahoo

2007-04-07 Thread Tonyz
I have no need to parse xml as the response is in php serialized. My only concern is doing in php the http request and after some searches I think will use the pear package html client as my host has no curl. Thanks for your response. I was wondering if cake 1.2 has or will have included

Re: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread [EMAIL PROTECTED]
I can't quite understand most of the *html and form helper*... and the function doc is limited. On 4月7日, 下午6时16分, Dr. Tarique Sani [EMAIL PROTECTED] wrote: On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I recently moved to the 1.2.0 version ,a lot of things change . There isn't any

Re: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread Dr. Tarique Sani
On 4/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I can't quite understand most of the *html and form helper*... and the function doc is limited. I can't understand most of the things around me either but the way I approach such things is define clearly what I want to do with them. What

Re: unserialize error

2007-04-07 Thread jyrgen
finally i found a way to implement a custom session garbage collection. luckily there is the expires field which can be evaluated instead of the serialized value in the data array: // custom session garbage collection $sessions = $this-Mysession-findAll(); foreach($sessions as $session){

Re: how to deal with $this-User-findById('3')['User']['name']

2007-04-07 Thread Seb
no way to do that in PHP, afaik. the { } string operators will not operate on a function. However if you add something like this to your app_controller; [code] function get($data, $member) { if (!is_array($member)) { $member = explode('.',

mysterious SQL query

2007-04-07 Thread [EMAIL PROTECTED]
1 DESC `groups` 3 3 4 2 DESC `users`4 4 4 3 DESC `contacts` 7 7 4 4 SELECT COUNT(*) AS count FROM `groups` AS `Group` WHERE 1 = 1 when I debug ,I always find some sql query like above ... I didn't do

How to generateList with more than more value per key?

2007-04-07 Thread zen
Hi, Cake noob here... I've been searching for a while for this... but can't seem to find the solution... basicly what i'd like to do is to generate an array using generateList, then populate a dropdown using the result set. what i can't seem to do is to make it generate more than more value per

Re: how to deal with $this-User-findById('3')['User']['name']

2007-04-07 Thread GreyCells
If you find you're writing the same old find($conditions, $fields) time after time, why not encapsulate it as a method on your User model class? e.g. : User-findMyUserStuff($userId); And you get extra 'DRY' points :) If you're just fetching one field then use $model-field(); ~GreyCells On

Re: How to generateList with more than more value per key?

2007-04-07 Thread GreyCells
http://groups.google.com/group/cake-php/browse_thread/thread/b32341e00a1324bb/916efdf548c20b68?lnk=gstq=afterfind+fullnamernum=1#916efdf548c20b68 On Apr 7, 12:43 pm, zen [EMAIL PROTECTED] wrote: Hi, Cake noob here... I've been searching for a while for this... but can't seem to find the

Re: How to execute OthAuth protected actions with a CRON job?

2007-04-07 Thread CraZyLeGs
log someone without password ? eh talk about security.. maybe a hash of the password and login with some salt Anyway look here http://bakery.cakephp.org/articles/view/99 in the comments 11 Howto automaticly sign in a user. On Apr 6, 11:54 pm, Bootstrapper [EMAIL PROTECTED] wrote: Excellent!

Re: How to execute OthAuth protected actions with a CRON job?

2007-04-07 Thread CraZyLeGs
log someone without password ? eh talk about security.. maybe a hash of the password and login with some salt Anyway look here http://bakery.cakephp.org/articles/view/99 in the comments 11 Howto automaticly sign in a user. On Apr 6, 11:54 pm, Bootstrapper [EMAIL PROTECTED] wrote: Excellent!

Re: How to generateList with more than more value per key?

2007-04-07 Thread [EMAIL PROTECTED]
I don't know if its possible using generateList, but it's pretty easy to make your own list. Here are a couple examples; (The first one less desirable because it uses a database function which is unique to mysql.) $list = array(); $rows = $this-Player-query(SELECT id, CONCAT(firstname, ' ',

Re: mysterious SQL query

2007-04-07 Thread [EMAIL PROTECTED]
The DESC command asks the database to DESCribe a table. Cake uses these queries to get the names and data types of your fields. Try running DESC `users` and look at the results. On Apr 7, 7:25 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 1 DESC `groups` 3 3 4 2

Re: Selecting far relations

2007-04-07 Thread [EMAIL PROTECTED]
I like my Databases only when it's totally normalized Hmm. I like my database when it accurately reflects the business model it represents, and when it functionally makes sense. Relational databases are supposed to make your life easier, not harder. Fully normalized database are great, but not

Re: new auth component in cake 1.2

2007-04-07 Thread [EMAIL PROTECTED]
First attempt at providing some insight into the new AuthComponent: http://dieter.plaetinck.be/figuring_out_cakephp_new_authcomponent On Apr 6, 8:21 pm, gar [EMAIL PROTECTED] wrote: Would it be possible for me to take a stab at making a doc on how to use this functionality? If someone

Re: Making REST Requests to a web-server like yahoo

2007-04-07 Thread Chris Hartjes
On 4/7/07, Tonyz [EMAIL PROTECTED] wrote: I have no need to parse xml as the response is in php serialized. My only concern is doing in php the http request and after some searches I think will use the pear package html client as my host has no curl. Why can't you use file_get_contents? --

associationForeignKey not working --trying self join

2007-04-07 Thread bingo
hi, I have a table with following structure posts_keywords: post_id keyword_id created I am trying to find coocurring keywords for this I created a association like this var $belongsTo = array( 'Coocurrence' = array('className' = 'PostsKeyword',

Re: How to generateList with more than more value per key?

2007-04-07 Thread zen
thx :) --~--~-~--~~~---~--~~ 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 more

Is cake a solution for hosting set-up?

2007-04-07 Thread jofftan
I'm having a hard time installed it on my Tiger OsX local machine because it needs a lot of config. So installing it on a webhosting server(RedHat) that I don't have config access look almost impossible. --~--~-~--~~~---~--~~ You received this message because

conditions in 1.1.14.4797 doesn't work at all?

2007-04-07 Thread [EMAIL PROTECTED]
After upgrading cake's core libs from 1.1.13.4450 to 1.1.14.4797 condituins in model relations (like hasOne = ... 'conditions=Classname.field='zzz') doesn't work at all. PHP4, mySQL4. --~--~-~--~~~---~--~~ You received this message because you are subscribed to

RE: conditions in 1.1.14.4797 doesn't work at all?

2007-04-07 Thread Mariano Iglesias
Can you please report this to trac? https://trac.cakephp.org Anytime you find what seems to be a bug please report it to trac. Otherwise we have to go through all google group emails to see if anyone reported a bug here. Not every optimal, if you ask me. -MI

RE: conditions in 1.1.14.4797 doesn't work at all?

2007-04-07 Thread Mariano Iglesias
And when you do report it please attach your controllers/models so we can easily test it. Thanks :) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your

Re: conditions in 1.1.14.4797 doesn't work at all?

2007-04-07 Thread mariano.iglesias
Fixed in: https://trac.cakephp.org/changeset/4818 -MI --~--~-~--~~~---~--~~ 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,

$html-formTag() and security component

2007-04-07 Thread yolabingo
I'm new to Cake. I'm using Cake 1.1.x and started adding requireAuth constraints to my controllers. According to the manual, this requires I generate my forms using $html-formTag(), which (according to the API) is deprecated and its use seems to be discouraged elsewhere on this list. Does

routing: custom sitename before EACH controller

2007-04-07 Thread gerbenzomp
I've read the article on routing (http://bakery.cakephp.org/articles/ view/86) and serached through this group, but couldn't really find an answer to this question: How can I enable users to have their custom sitename, like this: http://www.site.com/users_custom_sitename/controller/action/ So

Re: Is cake a solution for hosting set-up?

2007-04-07 Thread Poncho
I'm not exactly sure of your question, but I'll give you an example of how I set cake up on my local Tiger system. If you don't have the latest MySQL and PHP installed, follow the instructions on http://www.entropy.ch/software/macosx/. To easily create symlinks, download from either

Re: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread BlenderStyle
http://api.cakephp.org/ is always pretty good. Also, the source code is commented well. On Apr 7, 2:07 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I recently moved to the 1.2.0 version ,a lot of things change . where to find manual or doc?

Re: where to find any doc about 1.2.0.4798alpha version

2007-04-07 Thread John David Anderson
On Apr 7, 2007, at 5:43 PM, BlenderStyle wrote: http://api.cakephp.org/ is always pretty good. Also, the source code is commented well. On Apr 7, 2:07 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I recently moved to the 1.2.0 version ,a lot of things change . where to find manual or

Limiting findAll() fields in associations

2007-04-07 Thread joel
Let's say I have a Blog with many Comments, but I only want to return some of the fields for the Blog and its Comments. Is it possible to use findAll() to only return, for example, the fields Blog.id and Blog.title (which I know how to do using the $fields parameter in findAll), but also only

RE: Limiting findAll() fields in associations

2007-04-07 Thread Mariano Iglesias
Just as you can set 'foreignKey' or 'className' on the association array, use 'fields': var $hasMany = array( array('Comment' = array( 'fields' = array('id', 'title') )) ); In cake/libs/model/datasources/dbo_source.php, you can see that on line 879 for self

Re: Limiting findAll() fields in associations

2007-04-07 Thread joel
Thanks, Mariano! That makes sense. Is there any easy way to change this on the fly? Otherwise, I guess I could just make another hasMany association, like CommentTeaser, that only has those fields. --~--~-~--~~~---~--~~ You received this message because you

Problem loading custom helper when calling views using admin routing...

2007-04-07 Thread zen
good day bakers! I am trying to create a custom helper that extends the Html helper, basicly following the manual... Here's my helper class: found in cake/app/views/link.php class LinkHelper extends Helper { var $helpers = array('Html'); function makeEdit($title, $url)

RE: Limiting findAll() fields in associations

2007-04-07 Thread Mariano Iglesias
If it's on a per-find basis that you need to make the change, sure, just use bindModel() to rebind the model changing those details. Otherwise doing another association like you mentioned also works. -MI --- Remember,

How do I point my domain to a specific view?

2007-04-07 Thread peterhf
I'm certain that this question has been asked a thousand timea and answered two thousand times! I just couldn't find it on the lists. How to I point my domain, http://www.my_domain_name.com/;, to a specific view so that I don't have to do http:// www.my_domain_name.com/view_name/. Thanks in

Re: How do I point my domain to a specific view?

2007-04-07 Thread Poncho
Open {cakeapp}/config/routes.php Lets say the page you want the root of your site to point to /pages/ display/home $Route-connect('/', array('controller' = 'pages', 'action' = 'display', 'home')); That would be if you are using the built-in PagesController. For my current project I created my

Re: Best Practice with Behaviors or How To Make a Model Act As...

2007-04-07 Thread err_
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/model/behaviors/tree.php?rev=4521 On Apr 5, 5:25 pm, BlenderStyle [EMAIL PROTECTED] wrote: The concept of behaviors is a new one to me. I understand that views have helpers, controllers have components, and models have behaviors, but

How to stop Ajax triggered by onLoad event?

2007-04-07 Thread skyblueink
The code below, using prototype and Ajax, populates 3 divs. But, once the page is loaded and Event.observing is acting, can I stop the populating with a click button? I thought Event.stop() and Event.stopObserving() should come, and did some tries but failed. div id=red/divscript type=text/