Re: Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread Louie Miranda
You mean, run parallel? different subdomain? or folder? I think, you could do that. Just check for syntax changes from 1.2 to 1.3 though. Goodluck -- Louie Miranda - Email: lmira...@gmail.com - Web: http://www.louiemiranda.com On Thu, Jul 1, 2010 at 11:21 PM, WebRia wrote: > Yeah I know this

Re: Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread nurvzy
Anything is possible. However, you'll run into major problem early. The point in which you tell cake where the core files are is before the router even touches the url/uri (webroot/index.php). As such, you're on your own for figuring out what controller/action pair is being requested and then sw

Using Key Value pairs with Cake

2010-07-01 Thread WebRia
I know Cake does some fantastic automagic as long as the database has been designed as a proper relational database. However considering the latest trends in no-Sql and key / Value storage concepts I was wondering if it would be possible to design a database using Key/Value pairs and still have it

Can I run 2 versions of CakePHP within a single project

2010-07-01 Thread WebRia
Yeah I know this might sound weird, but the problem is, We built a really large site using Cake 1.2 Beta, and its grown significantly over the period of time and and started to slow down. We've noticed the latest cake 1.3 gives a much better performance, however we can't just upgrade the version o

Re: Validation - Multiple attempts

2010-07-01 Thread gremlin
Make sure if you are passing id's for edit actions that the edit action is in the forms action attribute ie array( 'url'=>array( 'controller'=>'foo', 'action'=>'bar',$foo['Foo'] ['id'] )).. Also, if you use char(36) for id's then you get UUID's - and it would be really unlikely that a user will gu

Re: cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
Cool thank you man That´s it :D ! this is learning by asking with googlegroup :) thank you very much... I wouldn´t find it because i did not know which issue i had. thx 2010/7/1 John Andersen > When you are saving Kattaxonomie in a loop, then you have to use the > create method first. > Se

Re: Functions in View could not able to load Helpers?

2010-07-01 Thread Nabil Alsharif
Or if you want to be stylish about it make a new helper class with your function in it and add 'Html' to the $helpers array: class MyHelper extends AppHelper { var $helpers = array('Html'); function my_function(){ On Thu, Jul 1, 2010 at 2:04 PM, Miles J wrote: > Because $html is not a

Re: Functions in View could not able to load Helpers?

2010-07-01 Thread Miles J
Because $html is not a global variable, its restricted to the scope of the view rendering process. You need to pass it as an argument. On Jul 1, 4:46 am, saidbakr wrote: > So why global does not work? > > for example: > function foo(){ > global $html; > > } > > On Jul 1, 12:22 pm, "Dr. Loboto"

Re: cannot save multiple checkboxes

2010-07-01 Thread John Andersen
When you are saving Kattaxonomie in a loop, then you have to use the create method first. See http://book.cakephp.org/view/1031/Saving-Your-Data where you can read about the create method. Enjoy, John On Jul 1, 6:49 pm, Davor Ilic wrote: > hi i want to save with the for loop why because i don´

Re: Undefined property: QuestionsController::$Session

2010-07-01 Thread rtconner
Probably you have some other error, like a missing database.php file, or invalid database connection. 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 "CakeP

Re: External script in cakephp

2010-07-01 Thread Nabil Alsharif
http://www.example.com/chat/install.php On Thu, Jul 1, 2010 at 10:44 AM, Info wrote: > Its in there… how do I get to run the install.php? > > > > *From:* cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] *On > Behalf Of *Nabil Alsharif > *Sent:* 1 juillet 2010 10:48 > *To:* cake-php@g

Re: save() omitted

2010-07-01 Thread Andrei Mita
It is solved. When I created my table I defined outcome as tinyint and when baked, cake made a validation rule to be boolean. I then realized I need at least 3 values for that field and changed it to float. When trying to update the record with -1 the validation rule was broken and no update was pe

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
try to do an insert with the data you are testing directly into your database, so I noticed you need the user_id and stage_id 2010/7/1 Andrei Mita > The action is the above one and the model(with validation rules deleted): > > class Game extends AppModel { > var $name = 'Game'; > > var

Re: save() omitted

2010-07-01 Thread Andrei Mita
The action is the above one and the model(with validation rules deleted): array( 'className' => 'Stage', 'foreignKey' => 'stage_id', ), 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', ) ); var $has

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
Em 01/07/10 13:57, Andrei Mita escreveu: I am unbelievably stupid some times. I have lost two days trying to figure this one out and it never crossed my mind to check the validation rules in the model. And everything was right there in the manual: "If for some reason your data isn't saving, be

Re: save() omitted

2010-07-01 Thread Andrei Mita
I am unbelievably stupid some times. I have lost two days trying to figure this one out and it never crossed my mind to check the validation rules in the model. And everything was right there in the manual: "If for some reason your data isn't saving, be sure to check to see if some validation rules

cannot save multiple checkboxes

2010-07-01 Thread Davor Ilic
hi i want to save with the for loop why because i don´t know how to save this in other why to my DB. i save it like this: for($i=0;$i<$counted_katId;$i++) { $save_product = $this->Kattaxonomie->save($this->Kattaxonomie->set(array( 'kat_id' => $this->data['Kattaxonomie']['kat_id'][$i], 'produc

Re: save() omitted

2010-07-01 Thread Andrei Mita
I believe it's OK Array ( [Game] => Array ( [id] => 2 [scored] => 0 [conceded] => 6 [correct_answers] => 0 [wrong_answers] => 30 [time_end] => 2010-07-01 19:47:49 [outcome] => -1 ) ) On Thu,

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
Em 01/07/10 13:39, Andrei Mita escreveu: Where should I try that? View, controller? Controller. On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani mailto:phpedi...@gmail.com>> wrote: Em 01/07/10 13:24, Andrei Mita escreveu: No luck. I don't get it. No errors, nothing. It's as if t

Re: echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Renato de Freitas Freire
I dont know what version you are using... but in 1.2, i would do like this: $adressee = $this->User->find('first',array('conditions' => array('User.email' =>$user,'fields' => array('username'; try it... -- Renato de Freitas Freire ren...@morfer.org On Thu, Jul 1, 2010 at 12:46 PM, Jeremy

Re: save() omitted

2010-07-01 Thread Andrei Mita
Where should I try that? View, controller? On Thu, Jul 1, 2010 at 7:33 PM, Edinei L. Cipriani wrote: > Em 01/07/10 13:24, Andrei Mita escreveu: > > No luck. I don't get it. No errors, nothing. It's as if the query isn't > there. The only thing I get from sql dump is: > > Try: > > pr($game_final)

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
Em 01/07/10 13:24, Andrei Mita escreveu: No luck. I don't get it. No errors, nothing. It's as if the query isn't there. The only thing I get from sql dump is: Try: pr($game_final); die(); It seems to me that they are accessing the correct action Check out the new CakePHP Questions site http:/

Re: save() omitted

2010-07-01 Thread Andrei Mita
No luck. I don't get it. No errors, nothing. It's as if the query isn't there. The only thing I get from sql dump is: SELECT COUNT(*) AS `count` FROM `games` AS `Game` WHERE `Game`.`id` = 1 SELECT COUNT(*) AS `count` FROM `games` AS `Game` WHERE `Game`.`id` = 1 On Thu, Jul 1, 2010 at 7:12 PM, Ed

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
Try: $game_final['Game'] = array( 'id' => $this->Session->read('Game.game_id'), 'scored' => $scored, 'conceded' => $conceded, 'correct_answers' => $correct_answers, 'wrong_answers' => $wrong_answers, 'time_end' => date('Y-m-d H:i:s'), 'outcome' => $game_outcome); $this->Game->save($game_final); E

Re: save() omitted

2010-07-01 Thread Andrei Mita
I've tried without create, no result. On Thu, Jul 1, 2010 at 6:40 PM, Edinei L. Cipriani wrote: > If you have id, you do not need to use create () > > 2010/7/1 Andrei Mita > >> Hello, >> >> I have tried many different ways to update a record in one table with no >> luck. In one simple function

Re: echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Jeremy Burns | Class Outfit
The results of the find is an array, so Cake is doing what it's told. You will need to do something like: $this->set('username', $addressee['User']['username']); That's a guess - to check it, do this just after your find: die(debug($addressee)); That will print the array returned by the find t

RE: External script in cakephp

2010-07-01 Thread Info
Its in there. how do I get to run the install.php? From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Nabil Alsharif Sent: 1 juillet 2010 10:48 To: cake-php@googlegroups.com Subject: Re: External script in cakephp If you have your cake setup done right you shoul

echoing data after retrieving it via "find". cake doesn't echo the actual value, but rather "array"

2010-07-01 Thread Tomfox Wiranata
hi everyone, i am about to implement a "forgot password" feature. for that the user has to enter his email adress and then receives his new password. in this email i want to start Hello , you forgot.bla bla but i am having problems to actually get the username out of my database. it always

Re: save() omitted

2010-07-01 Thread Edinei L. Cipriani
If you have id, you do not need to use create () 2010/7/1 Andrei Mita > Hello, > > I have tried many different ways to update a record in one table with no > luck. In one simple function I have 2 save(update) queries. The first one is > always skipped. > > This is the one: > > $game_final = arra

save() omitted

2010-07-01 Thread Andrei Mita
Hello, I have tried many different ways to update a record in one table with no luck. In one simple function I have 2 save(update) queries. The first one is always skipped. This is the one: $game_final = array( 'id' => $this->Session->read('Game.game_id'), 'scored' => $scored, 'conceded' => $con

Re: Fatal error: Class 'I18n' not found in

2010-07-01 Thread Jonas
Okay, for anyone else getting this. Remember to force your memcached to flush the cache... http://kevin.vanzonneveld.net/techblog/article/flush_memcached_using_bash/ Thanks :) /Jonas On Jul 1, 4:43 pm, Jonas wrote: > Hello, > > I just tried to re-arrange an old 1.2 CakePHP website when I sudd

Re: External script in cakephp

2010-07-01 Thread Nabil Alsharif
If you have your cake setup done right you should put it into /app/webroot/ On Wed, Jun 30, 2010 at 9:21 PM, Monnerd wrote: > Hey there, > > I'm trying to install AJAX IM to cake php website... > > Installing files to root (public_html/chat) gives me missing > controller! > > Any clue on how to

Fatal error: Class 'I18n' not found in

2010-07-01 Thread Jonas
Hello, I just tried to re-arrange an old 1.2 CakePHP website when I suddenly got this error when I try to access any page at all: Fatal error: Class 'I18n' not found in /dev/cake/basics.php on line 589 Funny thing is, a totally unrelated site on the same machine also gives this error now. All f

Re: Undefined property: QuestionsController::$Session

2010-07-01 Thread Teh Treag
You book may be a little old. As of CakePHP 1.3, the Session Component is not included for your automatically. To solve your problem add the Session Component: var $components = array('Auth', 'Cookie', 'Session'); Please check out the migration guide for further information: http://boo

Re: Functions in View could not able to load Helpers?

2010-07-01 Thread saidbakr
So why global does not work? for example: function foo(){ global $html; } On Jul 1, 12:22 pm, "Dr. Loboto" wrote: > You need to pass these variables into function. > > On Jul 1, 2:57 am, saidbakr wrote: > > > Sorry, it was just typing mistake. I already write it with brckets - > > notice the cl

External script in cakephp

2010-07-01 Thread Monnerd
Hey there, I'm trying to install AJAX IM to cake php website... Installing files to root (public_html/chat) gives me missing controller! Any clue on how to run external script Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You

HTML File With All Elements Defined in default.css

2010-07-01 Thread femasazo
Hello everyone, I was hoping someone has made an HTML file that uses all of the elements defined in default.css from which I could create a new design. I've made my own css files for cake but only in a rather hacky haphazard way. I would like to do a proper layout. Thanks, Damon Check out the

Sessions across multiple apps, same domain

2010-07-01 Thread kevenages
I'm fairly new to cake, but an experienced PHP developer. I have a production setup of cake. It looks as follows: /home/keven/cake1.3 - This contains the 'spark_plug' plugin, which handles authentication /home/keven/app1 /home/keven/app2 Webroot is located here: /var/www/login /var/www/contest

Undefined property: QuestionsController::$Session

2010-07-01 Thread n4thancake
Hi to all, I'm newer to CakePHP and i'm reading this book 'packt publishing cakephp application development'. I'm running into a problem where my controllers don't seem to be inheriting from my AppController or someone else. This is my code app_controller.php Auth->loginRedirect = array('controlle

Re: Pagination starting at a given page

2010-07-01 Thread Andrei Mita
I noticed that in the API but dind't know for sure. Thanks. On Tue, Jun 29, 2010 at 5:03 PM, cricket wrote: > On Tue, Jun 29, 2010 at 7:47 AM, Andrei Mita > wrote: > > Hello, > > > > Here is the situation: I have 1000 users competing in an online game. > This > > game has standings. Is it possi

Re: Need CSV import: best practices?

2010-07-01 Thread euromark
without details we can only speculate but we all agree that the model should process the imported data if we open and parse the files the models as well, is not that clear. maybe its cleaner to to that in the "import" action" and pass the data to the model. On 30 Jun., 16:23, Shaz wrote: > Cake

Re: Functions in View could not able to load Helpers?

2010-07-01 Thread Dr. Loboto
You need to pass these variables into function. On Jul 1, 2:57 am, saidbakr wrote: > Sorry, it was just typing mistake. I already write it with brckets - > notice the closing bracket -. > > I still don't know how to make Html helper accessible inside the > function. > > On Jun 30, 7:33 pm, Shaz

Re: Which is the best hosting server for CakePHP?

2010-07-01 Thread Gonzalo Servat
Another suggestion is www.servint.net. I've been with them for a few years and they have been pretty good to me. Cheers Gonzalo On Thu, Jul 1, 2010 at 4:52 AM, cricket wrote: > On Wed, Jun 30, 2010 at 5:44 AM, jodator wrote: > > I have similar thoughts on VPS after switching to one. > > It's n

Re: image and a tag problem without mod_rewrite

2010-07-01 Thread AD7six
On Jun 30, 3:45 pm, kaushik wrote: > I have developed my site in a server where mod_rewrite and .httaccess > are available. I used '$this->webroot' variable for a tag and img path > extensively. But I have to make the live in a server where mod_rewrite > and .httaccess are not available and the

Re: Path for images etc

2010-07-01 Thread AD7six
On Jul 1, 6:19 am, Sanfly wrote: > Hi All > > It's been a long time since I've written any CakePHP, and even longer > since Ive had to set up a server.  I know there is an answer to this > somewhere but I cant for the life of me find it!  Also I have > previously only used 1.1, and am now using

Using Js helper on select list

2010-07-01 Thread Jeremy Burns
I have a select list that contains a list of currencies. When the user changes the currency, I want to use the Js helper to refresh the cart, which is presented inside a div in the same view. How do I do that? Check out the new CakePHP Questions site http://cakeqs.org and help others with their C