model->delete() generates wrong SQL in 1.3.6
Hi, Just noticed that model delete() function generates new and wrong join condition (for what?) so SQL query doesn't work at all: ..ON Project.project_id = User.id I had to rollback to 1.3.4 version. Can anyone confirm? S. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
using Cake's Form helper in non-Cake apps?
Hi all, I'm looking to migrate part of a Cake project into a non-Cake app. Is there a way to use Cake's form helper in a non-Cake environment? Is there any existing solutions or best practice? Thank you. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
friends please help
friends please help i have a form in ctp and when i hit the save button it shown You don't have permission to access /uscb/pers/save_data on this server. -- Apache/1.3.41 Server at www.www.imeseat.com Port 80 but it's working fine in localhos Miqdad Ali http://www.miqdadali.co.cc Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Losing Session variables
Are yo switching between http and https? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Dec 2010, at 02:43, Rishi wrote: > Hi All, > > I am new Cakephp. I am using simple login mechanism ( not the standard > Auth) for checking in user login. I set a session variable in the > login action and try to access the variable in "graph" action. I am > unable to read the variable. When I do a var_dump, i get NULL. I have > tried all the options suggested by users in this group like setting > security low/medium. Changed cake_session.php @ like 595 > > if(session_id() == '') { > session_start(); > } > > I am using CakePhp 1.3 and Php 5.2. > > I have been trying to get this up for past couple of days. Please help > me to solve this problem.!! > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Cakephp 1.3 problem
Hi I migrate my app from 1.2.4 to 1.3.6. I have two problems. 1. function find('all' , ..) return empty array. I don't change conditions from 1.2. This is strange because I paste and execute sql code from debug and return many rows but cake return 0 and any errors. I don't know what is going on? I using Postgersql. 2 Cake 1.3 must have views in /app/views/plugins/... and I give this file there but in a few controllers show error missing view and return old path /app/plugins/name/view Maybe someone have a similar problem. Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Losing Session variables
Hi All, I am new Cakephp. I am using simple login mechanism ( not the standard Auth) for checking in user login. I set a session variable in the login action and try to access the variable in "graph" action. I am unable to read the variable. When I do a var_dump, i get NULL. I have tried all the options suggested by users in this group like setting security low/medium. Changed cake_session.php @ like 595 if(session_id() == '') { session_start(); } I am using CakePhp 1.3 and Php 5.2. I have been trying to get this up for past couple of days. Please help me to solve this problem.!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Using or not using PHP framework
To be honest. If you're not sure how much work it would be to migrate from Cake to a "normal" PHP application, then you obviously haven't worked enough with neither PHP nor CakePHP (or any framework for that matter). On Dec 7, 2010, at 4:43 AM, Raj wrote: > Hi all, > > Thanks so much for your response. > Could you clarify on: > Some people say that while you are working with a framework you get > limited by the no of libraries developed for that framework and would > not be able to benefit from the large no of libraries that exist for > languages like PHP. So I wanted to know if at the stage of development > I feel that CakePHP is not working very fine for me and I want to > switch working with normal PHP language, can I migrate with my > application easily? > > On Dec 6, 4:26 pm, "Ma'moon" wrote: >> Just take a look at the name, its simply CAKE :-) >> >> On Mon, Dec 6, 2010 at 1:22 PM, burzum wrote: >>> I disagree that you have to invest 100 hours learning in the begining >>> if you already know PHP. >> >>> When I started using CakePHP I migrated a project that was already two >>> month in development to CakePHP in just two weeks. Sure I did not >>> learn everything in this two weeks but it's easy to learn as you go in >>> my opinion and it worked out very well. >> >>> On 4 Dez., 10:28, Rumkuchen wrote: invest 100 hours learning overhead at the beginning -> then you are as fast as without cake. invest another 50 hours of hard experience -> then you are 10 times faster. It is hard at the beginning, but there is an enormous return of time intested. see it as an advantage, that the documentation is not 100% clear, some parts could be better and so on and so on. But: all this hurdles will help you understanding the framework. >> On 4 Dez., 03:55, Raj wrote: >> > hmmThanks so much for the great advice! >> > On Dec 3, 1:59 pm, Joshua Muheim wrote: >> >> Funny, I first learned Ruby On Rails, too, and then dove into CakePHP >> (because at my current job they don't know anything about a >> programming language called Ruby... sadly). I first had quite some >> struggles because I was used to the comfort of RoR and really missed >> some stuff in CakePHP, but now I have acclimated quite well and I >>> have >> to say that CakePHP is quite cool for the PHP language. :-) >> >> On Fri, Dec 3, 2010 at 9:45 AM, Stephen < >>> step...@ninjacodermonkey.co.uk> wrote: >> I have stopped working without a framework in the background years ago, and I only can recommend it. There's SO much stuff you don't >>> even know about that's handled by a good framework in the background >>> (all sorts of hacking-attempts is taken care of, for example), and with >>> a good plugin system your application can probably use great blocks >>> of code you've developed before or somebody else has already >>> developed. >> I only know CakePHP in the PHP world, so I'm not up to date what >>> else is on the market there, but CakePHP really seems to be a good framework to start with. And what can't hurt, too, is to check out >>> a framework in another language from time to time... I can only >>> suggest you check out Ruby on Rails (Ruby), Django (Python) or Seaside (Smalltalk). You can learn A LOT from such "other worlds". You >>> will be quite embarassed and feel like you have been "naive" before after having done it. It's clearly an enlighting... Somehow it can be compared to taking a virtual drug that opens your consciousness. >>> LSD for programmers! ;-) >> >>> Likewise, and I completely agree. >> >>> I did dive into CakePHP some years ago and ended up being baffled >>> and >>> confused because I didn't know anything about objects never mind >>> MVC. >> >>> I got roped into doing a RoR project in a previous job, then I >>> tackled >>> CakePHP again and I never code without a framework anymore >> >>> Kind Regards >>> Stephen >> >>> Check out the new CakePHP Questions >>> sitehttp://cakeqs.organdhelpothers >>> with their CakePHP related questions. >> >>> You received this message because you are subscribed to the Google >>> Groups >>> "CakePHP" group. >>> To post to this group, send email to cake-php@googlegroups.com >>> To unsubscribe from this group, send email to >>> cake-php+unsubscr...@googlegroups.comFor >>> more options, visit this group at >>> http://groups.google.com/group/cake-php?hl=en >> >>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >>> with their CakePHP related questions. >> >>> You received this message because you are subscribed to the Google Groups >>> "CakePHP" group. >>> To post to this group, send email to cake-php@googlegroups.com >>> To unsubscribe from this group, send email t
i just saw this
http://ful.asia Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: using most recent related model data in current view
On Wed, Dec 8, 2010 at 8:50 PM, FahDoos wrote: > Thanks again for your help! > > For some reason using 'NOW()' resulted in a modified time of > -00-00 00:00:00, which I assume is because the query was trying to > insert the string NOW() since it's wrapped in quotes. I ended up using > the following: > > $this->Conversation->saveField('modified', date('Y-m-d H:i:s')); Excellent. I wasn't sure about NOW(), actually. I know I've updated a DATETIME manually before but didn't remember correctly, I guess. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: using most recent related model data in current view
Thanks again for your help! For some reason using 'NOW()' resulted in a modified time of -00-00 00:00:00, which I assume is because the query was trying to insert the string NOW() since it's wrapped in quotes. I ended up using the following: $this->Conversation->saveField('modified', date('Y-m-d H:i:s')); On Dec 8, 7:51 pm, cricket wrote: > On Wed, Dec 8, 2010 at 7:19 PM, FahDoos wrote: > > Wow, this was a really descriptive and helpful writeup, but > > unfortunately the conversations modified timestamp doesn't get update, > > as seen here: > > > [Conversation] => Array > > ( > > [id] => 4cfe98f6-d44c-4722-93ac-70d9c458e2c9 > > [user_id] => 4cfd90f8-ffbc-418c-bc96-68b0c458e2c9 > > [messages_count] => 3 > > [active] => 1 > > [created] => 2010-12-07 15:28:38 > > [modified] => 2010-12-07 15:28:38 > > Bummer. But it does make sense not to update modified when bumping the > counter. What you could do then is add an afterSave() callback in the > Message model to do it for you: > > function afterSave($created) > { > if ($created) // only do this for new Messages > { > $this->Conversation->id = > $this->data[$this->alias]['conversation_id']; > > $this->Conversation->saveField('modified', 'NOW()'); > } > > } > > If you're using something other than MySQL you may need to use > something other than NOW(). Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: newQ - getting info
On Wed, Dec 8, 2010 at 6:35 PM, Steve Mallett wrote: > Hi, I have three tables. Users, Posts & Comments. > > In view.ctp, below, how do I display the username of the user who made > each comment? The Comments table tracks user_id. > > > controllers/posts_controller.php: > function view($id = null) { > $this->set('post', $this->Post->read(null, $id)); > } > > > views/posts/view.ctp: > // echo post content > echo Sanitize::html($post['Post']['body']); > ?> > > > // echo comment > echo $comment['content'];?> > In your view add debug($post) somewhere (make sure debug is set to 2 in core.php). Unless you specifically set recursive to something low, that should include the User record, which you'd get from $post['User']['column_name']. It'll also contain all the Comment records. If that's overkill you can always use ContainableBehavior to get just what you need. A tip: I generally set my main data view variable as $data instead of, eg. $post. It seems redundant to name it after the main model, and cleaner to set it to something neutral. The only thing is you need to be careful of whether you want $data or $this->data. Not a big thing, and definitely a matter of taste. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Two Forms for the Same Model with two datasets
On Tue, Dec 7, 2010 at 5:45 PM, Gerrit wrote: > Hello everybody, > > I want to create an Order Form with Order positions. If i want to use > two Order positions (this IS a Model) on one page, how i will Be able > to do this? With "1.OrderPosition.Count" or "OrderPosition.1.Count"? If they're two separate forms you shouldn't need to do anything special. If you want to save multiple records from the same form you'll be using saveAll(). See this link for a good writeup on that: http://nuts-and-bolts-of-cakephp.com/2008/08/01/practical-use-of-saveall-part-1-working-with-multiple-models/ Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
2010/12/8 osamo101 : > In DATABASE_CONFIG I added the following line > 'encoding' => 'UTF8' Are you sure that Oracle wants 'UTF8' and not something else (eg. 'utf-8', 'UTF-8', etc.)? > and the insertion code is as follows > $this->Activity->query("INSERT INTO TMSACTIVITIES(name, arabic_name) > VALUES('some_name', 'خخخ')"); Any particular reason for using query() instead of using Cake's way? Not that it's necessarily related. And, to cover all bases, you said that you created an ASP script to check the DB would accept it. Try a plain PHP script, also. Who knows? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Authentication problem in 1.3
On Wed, Dec 8, 2010 at 4:13 PM, WhyNotSmile wrote: > Yes, I've done both of those. I was going to say that $form->input('password' should be $form->password('password' but then realised that I do the same. Cake figures it out, I suppose. However, you're not closing the form properly. From the API: --snip-- Closes an HTML form, cleans up values set by FormHelper::create(), and writes hidden input fields where appropriate. If $options is set a form submit button will be created. Options can be either a string or an array. --snip-- Perhaps there's some magic missing because of that. You're creating the submit manually, so you'd call it without any params: echo $form->end(); Also, you should get in the habit of using $this->Form as the old style is deprecated. BTW, what do you have in AppController::beforeFilter()? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: using most recent related model data in current view
On Wed, Dec 8, 2010 at 7:19 PM, FahDoos wrote: > Wow, this was a really descriptive and helpful writeup, but > unfortunately the conversations modified timestamp doesn't get update, > as seen here: > > [Conversation] => Array > ( > [id] => 4cfe98f6-d44c-4722-93ac-70d9c458e2c9 > [user_id] => 4cfd90f8-ffbc-418c-bc96-68b0c458e2c9 > [messages_count] => 3 > [active] => 1 > [created] => 2010-12-07 15:28:38 > [modified] => 2010-12-07 15:28:38 Bummer. But it does make sense not to update modified when bumping the counter. What you could do then is add an afterSave() callback in the Message model to do it for you: function afterSave($created) { if ($created) // only do this for new Messages { $this->Conversation->id = $this->data[$this->alias]['conversation_id']; $this->Conversation->saveField('modified', 'NOW()'); } } If you're using something other than MySQL you may need to use something other than NOW(). Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
Yes On Dec 9, 12:34 am, Ryan Schmidt wrote: > On Dec 8, 2010, at 16:30, osamo101 wrote: > > > In DATABASE_CONFIG I added the following line > > 'encoding' => 'UTF8' > > > and the insertion code is as follows > > $this->Activity->query("INSERT INTO TMSACTIVITIES(name, arabic_name) > > VALUES('some_name', 'خخخ')"); > > Is this PHP file also saved with UTF-8 encoding? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: using most recent related model data in current view
Wow, this was a really descriptive and helpful writeup, but unfortunately the conversations modified timestamp doesn't get update, as seen here: [Conversation] => Array ( [id] => 4cfe98f6-d44c-4722-93ac-70d9c458e2c9 [user_id] => 4cfd90f8-ffbc-418c-bc96-68b0c458e2c9 [messages_count] => 3 [active] => 1 [created] => 2010-12-07 15:28:38 [modified] => 2010-12-07 15:28:38 On Dec 8, 3:39 pm, cricket wrote: > On Wed, Dec 8, 2010 at 12:26 PM, FahDoos wrote: > > Tried searching for answers but can't find any good. > > > To keep it basic, I have a conversations model, which has a one to > > many relationship with messages. In the conversations view i'd like to > > list each conversation sorted by the date of the most recent message, > > and display the body of that message. High level help would be fine, > > and code examples a bonus. > > > What i've tried so far: > > > 1) creating an hasOne relationship to the messages model. This just > > results in the conversation getting duplicated for every related > > message it has. > > > 2) created an additional hasMany relationship to messages model with a > > limit of 1 sorted by date desc. This sorta works, but the single > > related message ends up in an array with one index of 0. > > > I know there has to be a more graceful solution for this. I'm an > > experienced php programmer who's new to cake... so far really loving > > it, but just getting bit in the a$$ with how to best leverage cake in > > some instances. > > The best solution I can think of would be to use both > ContainableBehavior[1] and counterCache[2]. The first is to make it > simple to order & limit the associated Message. The latter, to order > the Conversations (I think--I'll explain below). > > First, the code ... > > Message model: > > public $belongsTo = array( > 'Conversation' => array( > 'counterCache' => 'messages_count' > ) > ); > > Conversation model: > public $hasMany = array( > 'Message' > ); > > ConversationsController: > > public $paginate = array( > 'Conversation' => array( > 'fields' => array('Conversation.*'), > 'order => array( > 'Conversation.modified' => 'DESC' > ), > 'limit' => , > 'contain' => array( > 'Message' => array( > 'order' => array( > 'Message.created' => 'DESC' > ), > 'limit' => 1 > ) > ) > ) > ); > > (You could also create an entry here for Message, so that you could > paginate all Messages for a particular Conversation in the view > action.) > > Containable allows us to both order & limit the associated model > records, so order on the created column and limit to a single record. > Normal stuff. That's step 1. > > Ordering the Conversations, however, is done on the modified column. > This is where I'm straying into untested waters, but I'm pretty sure > it should work. We use counterCache by specifying it--in the model > whose records we want to count--as a key in the association array for > the model whose table will hold the count. So, here it's included in > Message's $belongsTo entry for Conversation. Then, we need a > messages_count column in the conversations table. > > Now, you didn't ask to count messages per conversation but this is > where the trick lies (I think). And, you get a handy count of Messages > per Conversation as a bonus. > > Cake will automatically set the values of DATETIME columns named > created and modified. I'm (mostly) sure that the modified column will > be updated when the counterCache column--messages_count--is. So, this > could be used to paginate Conversations by their most recent Message. > I think. I can certainly see why the Cake devs might have preferred to > inhibit updating the modified column when updating a counterCache > column because this would be undesirable to some people. Anyways, I'd > check the code myself and/or build a test as I'm really curious now, > but I'd better quit procrastinating and get backto work. > > [1]http://book.cakephp.org/view/1323/Containable > [2]http://book.cakephp.org/view/1033/counterCache-Cache-your-count Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
newQ - getting info
Hi, I have three tables. Users, Posts & Comments. In view.ctp, below, how do I display the username of the user who made each comment? The Comments table tracks user_id. controllers/posts_controller.php: function view($id = null) { $this->set('post', $this->Post->read(null, $id)); } views/posts/view.ctp: Thanks newb trying to get the hang of this... S Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
On Dec 8, 2010, at 16:30, osamo101 wrote: > In DATABASE_CONFIG I added the following line > 'encoding' => 'UTF8' > > and the insertion code is as follows > $this->Activity->query("INSERT INTO TMSACTIVITIES(name, arabic_name) > VALUES('some_name', 'خخخ')"); Is this PHP file also saved with UTF-8 encoding? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
In DATABASE_CONFIG I added the following line 'encoding' => 'UTF8' and the insertion code is as follows $this->Activity->query("INSERT INTO TMSACTIVITIES(name, arabic_name) VALUES('some_name', 'خخخ')"); On Dec 8, 3:42 pm, Ryan Schmidt wrote: > On Dec 8, 2010, at 04:22, osamo101 wrote: > > > I am trying to insert Arabic characters into oracle db but i got > > question marks inserted instead, I mad sure that the db accepts Arabic > > characters, I created a sample ASP application and it inserted the > > Arabic characters correctly. > > > Can you please help me, I spent more than two days in trying to fix > > this problem. > > Show us the code you're using to try to insert the data. > > What character encoding is the data in? What character encoding is the > database expecting? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
installation without mod_rewrite is not correct
hello i have used cake for years now. but with the new 1.3 or 1.2 version i think there is a features missing which makes deployment of cakephp scripts more difficult. i am selling scripts which are using cake. the scripts are small so people buy them, upload them to the server and want them to work out of the box. but many of them do not have mod_rewrite enabled. so they have to delete .htaccess files and edit the core.php which is ok. but there is a big problem if you dont install the cakephp script in a seperate folder. i think there are three options to install cakephp 1. with .htaccess and mod_rewrite in every folder or directly in the htdocs folder accessing www.example.com 2. without .htaccess and mod_rewrite only in a subfolder accessing www.example.com/mycake 3. without .htaccess and mod_rewrite in the htdocs folder accesing www.example.com/app/webroot/index.php an important option which is NOT WORKING 4. without .htaccess and mod_rewrtie directly in the htdocs folder accessing www.example.com in option 3 everything is working but css and js is not correct. its linked to "/css" but it should be linked to "/app/webroot/css". when i move my whole script to a subfolder its working fine again. is there a solution for this problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Authentication problem in 1.3
Yes, I've done both of those. On Dec 8, 8:43 pm, cricket wrote: > On Wed, Dec 8, 2010 at 3:37 PM, WhyNotSmile wrote: > > I'm setting up a site in Cake 1.3, and I'm using the Authentication > > component. I've created registration and login pages - the > > registration is working fine, but the login is giving me the standard > > error 'No username and password found with that combination'. > > > On the registration page, I enter my username and password, and those > > go into the database fine - the password is hashed as it should be. > > > The login form is basically: > > > echo $form->create('User', array('id'=>'reg_form', > > 'action'=>'login')); > > echo 'Email address:' . $form->input('username', array('label' => > > false, 'maxlength' => '35')) . ''; > > echo 'Password:' . $form->input('password', array('label' => false, > > 'maxlength' => '35')) . ''; > > echo ''; > > > and in the controller I just have: > > > function login() { > > $this->set('title_for_layout', 'Please sign in'); > > } > > > I have the debug level set to 2, but I'm not getting any errors. I > > added a debug($data) in beforeFilter, and it shows the username and > > password, both unencrypted. > > > Has anyone come across this, or can you suggest what I could do to > > narrow it down a bit? > > Did you include parent::beforeFilter(); in your beforeFilter()? > > Come to that, did you set up Auth in AppController::beforeFilter()? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: CakePHP, IIS6.0 and MSSQL 2000
On Wed, Dec 8, 2010 at 6:01 AM, Rory wrote: > Hi guys, > > I've been struggling with a problem for the past few days and there > seems to be no clear solution on the internet. > > I have CakePHP 1.3 installed on an IIS6.0 web server under PHP 5.2. > Everything else works fine (thanks to a tutorial I saw in the Bakery), > however when trying to connect to my database I get the "Cake is NOT > able to connect to the database". > > My SQL server is Microsoft SQL Server 2000 and it's running on the > local machine. > > PHP 5.2 comes with the MSSQL extension by default and my phpinfo file > shows that it is installed and working. > > This is how my current database config looks (password is hidden for > security reasons): > > var $default = array( > 'driver' => 'mssql', > 'persistent' => 'false', > 'host' => 'localhost', > 'port' => 1433, > 'login' => 'sa', > 'password' => '-hidden-', > 'database' => 'test', > 'prefix' => '' > ); > > All the parameters (database, login, etc) are correct yet Cake just > will not connect to the server. > > Would greatly appreciate a solution - as a quick google search will > show you, there are many others that have a similar problem. Can you connect with a non-Cake PHP script? See anything in the server's logs? It's been almost a decade that I've had to run anything on Windows, so I can't (shouldn't, really) give you any more detailed advice. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Authentication problem in 1.3
On Wed, Dec 8, 2010 at 3:37 PM, WhyNotSmile wrote: > I'm setting up a site in Cake 1.3, and I'm using the Authentication > component. I've created registration and login pages - the > registration is working fine, but the login is giving me the standard > error 'No username and password found with that combination'. > > On the registration page, I enter my username and password, and those > go into the database fine - the password is hashed as it should be. > > The login form is basically: > > echo $form->create('User', array('id'=>'reg_form', > 'action'=>'login')); > echo 'Email address:' . $form->input('username', array('label' => > false, 'maxlength' => '35')) . ''; > echo 'Password:' . $form->input('password', array('label' => false, > 'maxlength' => '35')) . ''; > echo ''; > > > and in the controller I just have: > > function login() { > $this->set('title_for_layout', 'Please sign in'); > } > > > > I have the debug level set to 2, but I'm not getting any errors. I > added a debug($data) in beforeFilter, and it shows the username and > password, both unencrypted. > > Has anyone come across this, or can you suggest what I could do to > narrow it down a bit? Did you include parent::beforeFilter(); in your beforeFilter()? Come to that, did you set up Auth in AppController::beforeFilter()? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: using most recent related model data in current view
On Wed, Dec 8, 2010 at 12:26 PM, FahDoos wrote: > Tried searching for answers but can't find any good. > > To keep it basic, I have a conversations model, which has a one to > many relationship with messages. In the conversations view i'd like to > list each conversation sorted by the date of the most recent message, > and display the body of that message. High level help would be fine, > and code examples a bonus. > > What i've tried so far: > > 1) creating an hasOne relationship to the messages model. This just > results in the conversation getting duplicated for every related > message it has. > > 2) created an additional hasMany relationship to messages model with a > limit of 1 sorted by date desc. This sorta works, but the single > related message ends up in an array with one index of 0. > > I know there has to be a more graceful solution for this. I'm an > experienced php programmer who's new to cake... so far really loving > it, but just getting bit in the a$$ with how to best leverage cake in > some instances. The best solution I can think of would be to use both ContainableBehavior[1] and counterCache[2]. The first is to make it simple to order & limit the associated Message. The latter, to order the Conversations (I think--I'll explain below). First, the code ... Message model: public $belongsTo = array( 'Conversation' => array( 'counterCache' => 'messages_count' ) ); Conversation model: public $hasMany = array( 'Message' ); ConversationsController: public $paginate = array( 'Conversation' => array( 'fields' => array('Conversation.*'), 'order => array( 'Conversation.modified' => 'DESC' ), 'limit' => , 'contain' => array( 'Message' => array( 'order' => array( 'Message.created' => 'DESC' ), 'limit' => 1 ) ) ) ); (You could also create an entry here for Message, so that you could paginate all Messages for a particular Conversation in the view action.) Containable allows us to both order & limit the associated model records, so order on the created column and limit to a single record. Normal stuff. That's step 1. Ordering the Conversations, however, is done on the modified column. This is where I'm straying into untested waters, but I'm pretty sure it should work. We use counterCache by specifying it--in the model whose records we want to count--as a key in the association array for the model whose table will hold the count. So, here it's included in Message's $belongsTo entry for Conversation. Then, we need a messages_count column in the conversations table. Now, you didn't ask to count messages per conversation but this is where the trick lies (I think). And, you get a handy count of Messages per Conversation as a bonus. Cake will automatically set the values of DATETIME columns named created and modified. I'm (mostly) sure that the modified column will be updated when the counterCache column--messages_count--is. So, this could be used to paginate Conversations by their most recent Message. I think. I can certainly see why the Cake devs might have preferred to inhibit updating the modified column when updating a counterCache column because this would be undesirable to some people. Anyways, I'd check the code myself and/or build a test as I'm really curious now, but I'd better quit procrastinating and get backto work. [1] http://book.cakephp.org/view/1323/Containable [2] http://book.cakephp.org/view/1033/counterCache-Cache-your-count Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Authentication problem in 1.3
I'm setting up a site in Cake 1.3, and I'm using the Authentication component. I've created registration and login pages - the registration is working fine, but the login is giving me the standard error 'No username and password found with that combination'. On the registration page, I enter my username and password, and those go into the database fine - the password is hashed as it should be. The login form is basically: echo $form->create('User', array('id'=>'reg_form', 'action'=>'login')); echo 'Email address:' . $form->input('username', array('label' => false, 'maxlength' => '35')) . ''; echo 'Password:' . $form->input('password', array('label' => false, 'maxlength' => '35')) . ''; echo ''; and in the controller I just have: function login() { $this->set('title_for_layout', 'Please sign in'); } I have the debug level set to 2, but I'm not getting any errors. I added a debug($data) in beforeFilter, and it shows the username and password, both unencrypted. Has anyone come across this, or can you suggest what I could do to narrow it down a bit? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Password hash problem after upgrade to 1.3
yes, exactly so you should be able to tell if the lengths are different if so, the hashing method changed :) On 8 Dez., 19:17, cricket wrote: > On Wed, Dec 8, 2010 at 12:11 PM, rgreenphotodesign > > wrote: > > You may want to look to see if your old cake install was using hd5 for > > hashing and the upgrade is using sha1. I know at one point hd5 was > > being used, but has moved to sha1. > > s/hd5/md5/g - That's a good point. What are the lengths of the new and > old hashes? MD5 is 32 chars and SHA1 is 40. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
using most recent related model data in current view
Tried searching for answers but can't find any good. To keep it basic, I have a conversations model, which has a one to many relationship with messages. In the conversations view i'd like to list each conversation sorted by the date of the most recent message, and display the body of that message. High level help would be fine, and code examples a bonus. What i've tried so far: 1) creating an hasOne relationship to the messages model. This just results in the conversation getting duplicated for every related message it has. 2) created an additional hasMany relationship to messages model with a limit of 1 sorted by date desc. This sorta works, but the single related message ends up in an array with one index of 0. I know there has to be a more graceful solution for this. I'm an experienced php programmer who's new to cake... so far really loving it, but just getting bit in the a$$ with how to best leverage cake in some instances. Thanks in advance! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
CakePHP, IIS6.0 and MSSQL 2000
Hi guys, I've been struggling with a problem for the past few days and there seems to be no clear solution on the internet. I have CakePHP 1.3 installed on an IIS6.0 web server under PHP 5.2. Everything else works fine (thanks to a tutorial I saw in the Bakery), however when trying to connect to my database I get the "Cake is NOT able to connect to the database". My SQL server is Microsoft SQL Server 2000 and it's running on the local machine. PHP 5.2 comes with the MSSQL extension by default and my phpinfo file shows that it is installed and working. This is how my current database config looks (password is hidden for security reasons): var $default = array( 'driver' => 'mssql', 'persistent' => 'false', 'host' => 'localhost', 'port' => 1433, 'login' => 'sa', 'password' => '-hidden-', 'database' => 'test', 'prefix' => '' ); All the parameters (database, login, etc) are correct yet Cake just will not connect to the server. Would greatly appreciate a solution - as a quick google search will show you, there are many others that have a similar problem. Thanks Rory Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Two Forms for the Same Model with two datasets
> I want to create an Order Form with Order positions. If i want to use > two Order positions (this IS a Model) on one page, how i will Be able > to do this? With "1.OrderPosition.Count" or "OrderPosition.1.Count"? I'm sorry, I can't really follow the question. Can you give us a bit more information about the purpose of the Order Positions and how they relate to an Order, or how you need them displayed? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: IE7 Display issues with select checkbox form elements
Thanks Cricket! Yes I had a float added to my label and that's what the issue was! Removed and it's all better now :) On Dec 8, 11:20 am, cricket wrote: > On Wed, Dec 8, 2010 at 12:07 PM, rgreenphotodesign > > wrote: > > Wondering if anyone has this issue as well. I have a form input that > > I've set to multiple = checkbox, everything works great except on IE7. > > On IE7 the very last item in the list isn't displaying the checkbox > > next to the label, the actual checkbox displays at the top left of the > > screen. I've tried setting the div option to false, but that hasn't > > helped. I would assume the fix may be CSS related, but I'm not sure > > what at this point. Has anyone else had this issue and am I missing a > > really easy fix? > > Yes, it's likely a CSS thing. Do you have any floats? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HABTM question
On Wed, Dec 8, 2010 at 5:42 AM, Jens Dittrich wrote: > Hello, > > I have the following situation in which i need help: > There are people, roles and lectures, summer_schools and > presentations. > People HABTM roles. Depending on their role people are associated to > lectures or summer_schools or presentations. So I am planning on > creating more HABTM-tables called lectures_people_roles, > people_roles_summer_schools and so on. > > Is that supported by cakes ORM(bake)? Is ist configurable manually in > the models or am I asking to much or just making it more complicated > than necessary? I think the latter. You could probably use: Person HABTM Role Role <-> Lecture Rol <-> SummerSchool Role <-> Presentation I left the other assoc. blank as you haven't described it enough. Perhaps hasOne/belongsTo? The upshot of it, though, is that you could do a find on Person and get: Person - Role - [Lecture|SummerSchool|Presentation] Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: IE7 Display issues with select checkbox form elements
On Wed, Dec 8, 2010 at 12:07 PM, rgreenphotodesign wrote: > Wondering if anyone has this issue as well. I have a form input that > I've set to multiple = checkbox, everything works great except on IE7. > On IE7 the very last item in the list isn't displaying the checkbox > next to the label, the actual checkbox displays at the top left of the > screen. I've tried setting the div option to false, but that hasn't > helped. I would assume the fix may be CSS related, but I'm not sure > what at this point. Has anyone else had this issue and am I missing a > really easy fix? Yes, it's likely a CSS thing. Do you have any floats? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Password hash problem after upgrade to 1.3
On Wed, Dec 8, 2010 at 12:11 PM, rgreenphotodesign wrote: > You may want to look to see if your old cake install was using hd5 for > hashing and the upgrade is using sha1. I know at one point hd5 was > being used, but has moved to sha1. s/hd5/md5/g - That's a good point. What are the lengths of the new and old hashes? MD5 is 32 chars and SHA1 is 40. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Inserting Arabic data into Oracle DB
On Wed, Dec 8, 2010 at 5:22 AM, osamo101 wrote: > Hi > > I am trying to insert Arabic characters into oracle db but i got > question marks inserted instead, I mad sure that the db accepts Arabic > characters, I created a sample ASP application and it inserted the > Arabic characters correctly. Do you have the encoding set in database.php? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Internacionalization NOT working?
"Plural-Forms: nplurals=2; plural=(n != 1);\n" That line in the .po file fix the plural problem with po edit 2010/12/8 Hugo M > Ok cache seems to have gone now, and now I can start again. The only thing > I want is translate the Time Helper strings. Should I run i18n bake task in > the time helper directory? (because if I run it in the whole application > directory I got errors in Po Edit and I'm not able to generate my po file > from mi pot file). > > 2010/12/8 Hugo M > > WTF is going on? There is a Cache for translations? I don't know how but I >> was able to translate "week" to "semana", but now I tried to change "semana" >> to something different "semanadsgfdg" and is not working! I deleted my .po >> file and Cake is still translating "week" to "semana". Im.. scared? >> >> 2010/12/6 Hugo M >> >> Not working. When I go to i18n.php // method translate: >>> >>> debug($_this): >>> >>> I get: >>> >>> I18n Object >>> ( >>> [l10n] => L10n Object >>> ( >>> [language] => English (United States) >>> [languagePath] => Array >>> ( >>> [0] => eng >>> ) >>> >>> [lang] => eng >>> [locale] => en_us >>> [default] => >>> [charset] => utf-8 >>> [direction] => ltr >>> [found] => >>> [__l10nMap] => Array >>> >>> WTF?? :( (this is AFTER setting Config.language) >>> >>> >>> >>> 2010/12/6 100rk >>> >>> > I have in locale/esp/LC_MESSAGES/default.po: locale/spa/LC_MESSAGES/default.po > $this->Session->write('Config.language', 'esp'); > Configure::write('Config.language', 'esp'); $this->Session->write('Config.language', 'es'); Configure::write('Config.language', 'es'); https://github.com/cakephp/cakephp/blob/master/cake/libs/l10n.php#L231 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en >>> >>> >> > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: HABTM question
I believe people_roles_summer_schools wouldn't be a nice table name for a cakephp app. I once tried to bake something like that and it didnt work, instead I used a single name for a table which has many foreign keys. On 8 dez, 07:42, Jens Dittrich wrote: > Hello, > > I have the following situation in which i need help: > There are people, roles and lectures, summer_schools and > presentations. > People HABTM roles. Depending on their role people are associated to > lectures or summer_schools or presentations. So I am planning on > creating more HABTM-tables called lectures_people_roles, > people_roles_summer_schools and so on. > > Is that supported by cakes ORM(bake)? Is ist configurable manually in > the models or am I asking to much or just making it more complicated > than necessary? > > thanks in advance, > jens Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Password hash problem after upgrade to 1.3
You may want to look to see if your old cake install was using hd5 for hashing and the upgrade is using sha1. I know at one point hd5 was being used, but has moved to sha1. On Dec 8, 6:41 am, Ryan Schmidt wrote: > Please let us know what you find; if CakePHP is going to offer a > password-hashing function, it seems of paramount importance to me that it > never change, so if it has, I certainly want to know that. > > On Dec 8, 2010, at 06:18, Tijs wrote: > > > Thanks for the suggestion. the salt value is indeed the same in my > > development and live environment. I tried changing the hash method > > using Security:setHash() but have not found a method that creates the > > same hash i have stored in my db. So the next step is indeed to dive > > into the Auth implementation and see if i can find any differences > > (which i hoped to avoid). Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
IE7 Display issues with select checkbox form elements
Wondering if anyone has this issue as well. I have a form input that I've set to multiple = checkbox, everything works great except on IE7. On IE7 the very last item in the list isn't displaying the checkbox next to the label, the actual checkbox displays at the top left of the screen. I've tried setting the div option to false, but that hasn't helped. I would assume the fix may be CSS related, but I'm not sure what at this point. Has anyone else had this issue and am I missing a really easy fix? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Internacionalization NOT working?
Ok cache seems to have gone now, and now I can start again. The only thing I want is translate the Time Helper strings. Should I run i18n bake task in the time helper directory? (because if I run it in the whole application directory I got errors in Po Edit and I'm not able to generate my po file from mi pot file). 2010/12/8 Hugo M > WTF is going on? There is a Cache for translations? I don't know how but I > was able to translate "week" to "semana", but now I tried to change "semana" > to something different "semanadsgfdg" and is not working! I deleted my .po > file and Cake is still translating "week" to "semana". Im.. scared? > > 2010/12/6 Hugo M > > Not working. When I go to i18n.php // method translate: >> >> debug($_this): >> >> I get: >> >> I18n Object >> ( >> [l10n] => L10n Object >> ( >> [language] => English (United States) >> [languagePath] => Array >> ( >> [0] => eng >> ) >> >> [lang] => eng >> [locale] => en_us >> [default] => >> [charset] => utf-8 >> [direction] => ltr >> [found] => >> [__l10nMap] => Array >> >> WTF?? :( (this is AFTER setting Config.language) >> >> >> >> 2010/12/6 100rk >> >> > I have in locale/esp/LC_MESSAGES/default.po: >>> >>> locale/spa/LC_MESSAGES/default.po >>> >>> > $this->Session->write('Config.language', 'esp'); >>> > Configure::write('Config.language', 'esp'); >>> >>> $this->Session->write('Config.language', 'es'); >>> Configure::write('Config.language', 'es'); >>> >>> https://github.com/cakephp/cakephp/blob/master/cake/libs/l10n.php#L231 >>> >>> Check out the new CakePHP Questions site http://cakeqs.org and help >>> others with their CakePHP related questions. >>> >>> You received this message because you are subscribed to the Google Groups >>> "CakePHP" group. >>> To post to this group, send email to cake-php@googlegroups.com >>> To unsubscribe from this group, send email to >>> cake-php+unsubscr...@googlegroups.comFor >>> more options, visit this group at >>> http://groups.google.com/group/cake-php?hl=en >>> >> >> > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Internacionalization NOT working?
WTF is going on? There is a Cache for translations? I don't know how but I was able to translate "week" to "semana", but now I tried to change "semana" to something different "semanadsgfdg" and is not working! I deleted my .po file and Cake is still translating "week" to "semana". Im.. scared? 2010/12/6 Hugo M > Not working. When I go to i18n.php // method translate: > > debug($_this): > > I get: > > I18n Object > ( > [l10n] => L10n Object > ( > [language] => English (United States) > [languagePath] => Array > ( > [0] => eng > ) > > [lang] => eng > [locale] => en_us > [default] => > [charset] => utf-8 > [direction] => ltr > [found] => > [__l10nMap] => Array > > WTF?? :( (this is AFTER setting Config.language) > > > > 2010/12/6 100rk > > > I have in locale/esp/LC_MESSAGES/default.po: >> >> locale/spa/LC_MESSAGES/default.po >> >> > $this->Session->write('Config.language', 'esp'); >> > Configure::write('Config.language', 'esp'); >> >> $this->Session->write('Config.language', 'es'); >> Configure::write('Config.language', 'es'); >> >> https://github.com/cakephp/cakephp/blob/master/cake/libs/l10n.php#L231 >> >> Check out the new CakePHP Questions site http://cakeqs.org and help >> others with their CakePHP related questions. >> >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To post to this group, send email to cake-php@googlegroups.com >> To unsubscribe from this group, send email to >> cake-php+unsubscr...@googlegroups.comFor >> more options, visit this group at >> http://groups.google.com/group/cake-php?hl=en >> > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Acl and bindNode
Hi Soichi. I think the problem seems to be that you are using the Acl Component instead of the Acl Behavior. The code will be only executed if your User model has the ACL Behavior attached to it. The ACL Component has another purporse. On 7 dic, 14:03, Soichi Hayashi wrote: > Hi. I started using CakePHP 3 days ago, and I am using Cake 1.3.6. I > am having the same problem reported in this thread. > > I have following in my User model > > //make ACL group only (http://book.cakephp.org/view/1547/Acts-As-a- > Requester) > function bindNode($user) { > return array('Group' => array('id' => $user['User'] > ['group_id'])); > } > > When I add a new user, it's adding a new User model record in aros > table. I've patched db_acl as parallel32 suggests, but it's still > adding User model records when I add new users. > > I've also noticed that bindNode() doesn't seem to be called at all > (I've put exit in it, but it doesn't seem to affect the behavior of > the app at all). I have following in my app_controller.php > > var $components = array('Acl'); > > Is there something else that I need to do to make group-only > authorization work? > > Soichi > > On Nov 27, 8:55 am, parallel32 wrote: > > > A very minor change to the core, but you're right nutesco it would > > break upgrades. So far the fix is holding steady on my deployments so > > I'm going to submit it as a bug and perhaps they can permanently fix > > it for the next release. > > > If anyone has a userland fix that would be even better in case it > > takes a while to fix the core. > > > On Nov 23, 4:38 pm, netusco wrote: > > > > I just had the same problem, it really looks like a bug on cakephp... > > > > It was working when ids of groups where the same as ids of aros, but > > > not working when different. > > > > I agree with parallel 32 but I would prefer not to use his approach as > > > it would break in any upgrading... > > > > Is there anyone who could get a light on this issue? > > > > thanks > > > > On Nov 22, 8:37 pm, Jeremy Burns | Class Outfit > > > > wrote: > > > > See the previous reply in this thread that arrived yesterday - haven't > > > > followed it through yet. > > > > > Jeremy Burns > > > > Class Outfit > > > > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > > On 21 Nov 2010, at 22:49, Rajat wrote: > > > > > > i m also facing this issue. > > > > > did u get any official updates on this? > > > > > > On Nov 4, 1:34 am, Jeremy Burns | Class Outfit > > > > > wrote: > > > > >> I'm still really hoping that someone with some inside knowledge can > > > > >> shed a light on this for me. > > > > > >> Jeremy Burns > > > > >> Class Outfit > > > > > >> jeremybu...@classoutfit.comhttp://www.classoutfit.com > > > > > >> On 1 Nov 2010, at 07:24, Jeremy Burns | Class Outfit wrote:> Because > > > > >> the users table has a group_id on it. > > > > > >>> Jeremy Burns > > > > >>> Class Outfit > > > > > >>> jeremybu...@classoutfit.com > > > > >>>http://www.classoutfit.com > > > > > >>> On 31 Oct 2010, at 14:48, huoxito wrote: > > > > > Guess I dont get your point. > > > > > Users still must de added on Aro's table, otherwise how would your > > > > system know that an user A belongs to group ALFA ? > > > > > On 29 out, 08:23, Jeremy Burns | Class Outfit > > > > wrote: > > > > > Anybody else got any more ideas on this? Anyone using it with > > > > > success? > > > > > > Jeremy Burns > > > > > Class Outfit > > > > > > jeremybu...@classoutfit.com > > > > > (t) +44 (0) 208 123 3822 > > > > > (m) +44 (0) 7973 481949 > > > > > Skype: jeremy_burnshttp://www.classoutfit.com > > > > > > On 27 Oct 2010, at 17:10, Jeremy Burns | Class Outfit wrote: > > > > > >> I wish that were the case, but the guide then gives an example > > > > >> of the aros table, which only includes > > > > >> groups:http://book.cakephp.org/view/1547/Acts-As-a-Requester > > > > > >> Jeremy Burns > > > > >> Class Outfit > > > > > >> jeremybu...@classoutfit.com > > > > >>http://www.classoutfit.com > > > > > >> On 27 Oct 2010, at 13:41, cricket wrote: > > > > > >>> On Tue, Oct 26, 2010 at 4:40 PM, Jeremy Burns > > > > >>> wrote: > > > > According to the online tutorial: > > > > > " > > > > In case we want simplified per-group only permissions, we need > > > > to > > > > implement bindNode() in User model. > > > > Code View > > > > > function bindNode($user) { > > > > return array('Group' => array('id' => > > > > $user['User']['group_id'])); > > > > } > > > > > function bindNode($user) { > > > > return array('Group' => array('id' => $user['User'] > > > > ['group_id'])); > > > > } > > > > > This method will tell ACL to skip checking User Aro's and to > > > > check > > > >
Re: Inserting Arabic data into Oracle DB
On Dec 8, 2010, at 04:22, osamo101 wrote: > I am trying to insert Arabic characters into oracle db but i got > question marks inserted instead, I mad sure that the db accepts Arabic > characters, I created a sample ASP application and it inserted the > Arabic characters correctly. > > Can you please help me, I spent more than two days in trying to fix > this problem. Show us the code you're using to try to insert the data. What character encoding is the data in? What character encoding is the database expecting? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Password hash problem after upgrade to 1.3
Please let us know what you find; if CakePHP is going to offer a password-hashing function, it seems of paramount importance to me that it never change, so if it has, I certainly want to know that. On Dec 8, 2010, at 06:18, Tijs wrote: > Thanks for the suggestion. the salt value is indeed the same in my > development and live environment. I tried changing the hash method > using Security:setHash() but have not found a method that creates the > same hash i have stored in my db. So the next step is indeed to dive > into the Auth implementation and see if i can find any differences > (which i hoped to avoid). Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: The view does not see its controller
Try to type localhost//users/register instead of register.ctp... On dec. 7, 12:34, Ahmed El-Sharkasy wrote: > I am a new cake developer and this is my first project , i created a > controller file named users_controller in which u define a > UserController class , created a user file in the model and a register > file in the view > each time i tried to open the register.ctp from the browser by typing > localhost/../users/register.ctp > i got this error > > Error: Create the class ViewsController below in file: app/controllers/ > views_controller.php > > although this class is already created in the shown directory!!! > Also i am facing an error linking my database although i change the > config in database.php > > could anyone please help me ?? > thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Password hash problem after upgrade to 1.3
Thanks for the suggestion. the salt value is indeed the same in my development and live environment. I tried changing the hash method using Security:setHash() but have not found a method that creates the same hash i have stored in my db. So the next step is indeed to dive into the Auth implementation and see if i can find any differences (which i hoped to avoid). Tijs On Dec 7, 7:41 pm, Ryan Schmidt wrote: > On Dec 7, 2010, at 06:16, tteuli...@gmail.com wrote: > > > I have an (old) CakePHP based website that i've faithfully upgraded > > for almost each new Cake release since 1.1 but i'm running into a > > problem now that i tried to upgrade from 1.2.6 to 1.3.6. I got most > > everything working except getting existing credentials to work; when i > > create new user that user can login fine but when i try any of the old > > credentials from my live db (and using the same salt as used on the > > live server) i get an incorrect password error. And when i output the > > hashed password that is generated in beforeFilter() it is indeed not > > the hash stored in my db. > > > So did the hashing method change between 1.2 and 1.3? And if so how do > > i change it back? > > I don't know whether something related to this changed between cake 1.2 and > 1.3. I don't see anything in the migration document. > > But, I do see this: > > http://book.cakephp.org/view/1254/Change-Hash-Function > > It says the password hashing uses your security salt, set in your config > file. Assuming 1.2 did that too (and the 1.2 documentation says it does), > perhaps your salt is different now, and you could change it to be the same > again. > > Last resort, you could implement your own hashPasswords function in your User > model with whatever code the old site is using, if you can find it. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
HABTM question
Hello, I have the following situation in which i need help: There are people, roles and lectures, summer_schools and presentations. People HABTM roles. Depending on their role people are associated to lectures or summer_schools or presentations. So I am planning on creating more HABTM-tables called lectures_people_roles, people_roles_summer_schools and so on. Is that supported by cakes ORM(bake)? Is ist configurable manually in the models or am I asking to much or just making it more complicated than necessary? thanks in advance, jens Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Inserting Arabic data into Oracle DB
Hi I am trying to insert Arabic characters into oracle db but i got question marks inserted instead, I mad sure that the db accepts Arabic characters, I created a sample ASP application and it inserted the Arabic characters correctly. Can you please help me, I spent more than two days in trying to fix this problem. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en