User Id Updating

2009-04-30 Thread Dave Maharaj :: WidePixels.com
I am debugging a save debug($this->User->save($this->data[$model_table], true, array_keys($this->User->$join_table->schema(; Everything is working fine in regards to the save except in the debug array I see User id...and in the SQL log I see UPDATE `users` SET `id` = 3 WHERE `users`.`id` =

Save fields

2009-04-30 Thread Dave Maharaj :: WidePixels.com
Question about selecting fields allowed to have data saved to with a HABTM save. I have a users_systems table which has id, user_id, system_id and a form to update the users systems only...no other data. Now I do not want a User attempting to edit the form and edit other data thats saved in the

Re: Eine Frage zu Tabellen Relationen( Error 1054)

2009-04-30 Thread davidpersson
Hallo Marcus, Auf dieser Mailingliste wird leider nur Englisch gesprochen. Versuch es entweder auf der deutschen CakePHP Mailingliste (http:// groups.google.com/group/cakephp-de) oder poste deine Frage nochmal auf Englisch neu. -David On 30 Apr., 18:59, amarradi wrote: > Hallo zusammen, > > ic

Re: Buggy radio buttons using Form Helper?

2009-04-30 Thread Gwoo
Check the test cases, hopefully there is one that covers your issues. If not, add one and submit a ticket. Drop by #cakephp if you want to discuss. Happy Baking. -GwooBot :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: ACL from View

2009-04-30 Thread sdc53
Faza, appreciate the help. The problem I see with your approach occurs in your earlier example here: >>in view i put this: (yes, I will make a helper to do it one day) if (in_array($session->read('Auth.User.group'), array("Administrator", "Designer")) { ... } This assumes (hard-coded in the view

htacces issue

2009-04-30 Thread Leprosy
Hi, i've installed cake in two servers, two different applications, never had a trouble installing and firing it up. Suddendly I've installed this copy of cake php in a third server...htaccess trouble. I've activated mod_rewrite and tested the installation. And this error appears : Not Found The

404 File not found when try to browse my first project

2009-04-30 Thread Nathan
Here is the background. - cakePHP 1.2 in Linux with Apache - everything was extract to /root/cakePHP - when I browse http://localhost/cakePHP, it shows the first page correctly (CSS, tmp writable, DB connected.) I establish my first project by creating files (in Dreamweaver) and store them in app

Re: Missing table for missing model

2009-04-30 Thread Miles J
Clear your cache in your tmp folder. --~--~-~--~~~---~--~~ 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-

Re: Memory Limit Exhausted

2009-04-30 Thread Benedikt R.
Okay... Forget this. I used the paginator helper :D On 30 Apr., 22:13, "Benedikt R." wrote: > But how does this happen? > > Doesn't CakePHP recieve the data via an MySQL-Request? How could the > memory limit be reached? --~--~-~--~~~---~--~~ You received this mess

Validate HABTM

2009-04-30 Thread Dave Maharaj :: WidePixels.com
I have tried figuring this out on my own to no avail. Where do I validate data being saved into a HABTM table? I have USERS: id SYSTEMS: id name USERS_SYSTEMS: id user_id system_id I created a simple form for the User to update their Systems but where is validation for this? Do I validate

Re: Memory Limit Exhausted

2009-04-30 Thread Benedikt R.
But how does this happen? Doesn't CakePHP recieve the data via an MySQL-Request? How could the memory limit be reached? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send em

Re: Missing table for missing model

2009-04-30 Thread nurvzy
I had that error as well. Unfortunately I don't specifically remember how I fixed it other than the things you already tried. I remember it was definitely something I had put in as custom code, (IE.. walking through associations in another controller). The way I found it was using the backtrace

Re: Compare Array - GOT IT!

2009-04-30 Thread Brendon Kozlowski
You can set validation as numeric, AS WELL as your own custom validation, Cake will let you do that. You create a function that checks the values (comparing to the DB in your case), and if it's not valid, your custom validation method simply returns false, and Cake's validation mechanism takes ov

Re: Is this even possible in cake? (model associations with unknown models)

2009-04-30 Thread the_woodsman
Have you tried using bindModel() (I think that's what it's called) with dynamic names? That might work... However, I'm not sure why this is necessary - If you know enough about the page to widget relations to serialise it in an array, surely you know enough to do the same things with a proper DB

RE: Value from Key

2009-04-30 Thread Dave Maharaj :: WidePixels.com
Its all good no worries. I learned something so no matter how it was written or what not, thanks. Bake on! Dave _ From: Aivaras [mailto:faifas1...@gmail.com] Sent: April-30-09 3:13 PM To: cake-php@googlegroups.com Subject: Re: Value from Key I see that You are offended by my

Re: Memory Limit Exhausted

2009-04-30 Thread Jonathon Musters
likely your php config memory limit is being used up On Thu, Apr 30, 2009 at 1:38 PM, Benedikt R. wrote: > > Hey! > > I am currently building an app that should be able to parse some > tables with bank codes. The database table contains about 25,000 > entries. > > When I try to request some da

Memory Limit Exhausted

2009-04-30 Thread Benedikt R.
Hey! I am currently building an app that should be able to parse some tables with bank codes. The database table contains about 25,000 entries. When I try to request some data ($this->ControllerObj->find (conditions)) the server shouts out: Fatal error: Allowed memory size of 20971520 bytes exha

Multi Field DisplayField...

2009-04-30 Thread Krist van Besien
Hello all, This has probably been asked a couple of times allready. I would like to use multiple fields to generate the labels in a drop down list box. I searched the list, and this search came up with several different strategies to achieve this. I tried to implement one of these strategies but

Re: Value from Key

2009-04-30 Thread Aivaras
I see that You are offended by my last e-mail and for that I offer my humble apologies. I am not a professional PHP guru and I truly agree with You. Once you make an error you learn from it. Don't get my opinion wrong, I was also criticized by few cakePHP gurus even tho I do know PHP quite well an

Re: Possible very-low-danger bug in view.php (cake core)

2009-04-30 Thread mark_story
There is no check, you are supposed to define $fooPaths variables correctly. No trailing slash == not correct :) -Mark On Apr 29, 10:04 am, Ernesto wrote: > Hello. > > here's my bootstrap.php. > > if (!defined("SHARED_ITEMS_FOLDER")) { >         define("SHARED_ITEMS_FOLDER", CAKE_CORE_INCLUDE_P

Eine Frage zu Tabellen Relationen( Error 1054)

2009-04-30 Thread amarradi
Hallo zusammen, ich habe 2 Tabellen mit folgendem Aufbau Tabelle 1 masterdata enthält folgende Felder id, vname, vstrasse, vpostleitzahl, vort, vgericht, vmitglieder, vgenrenummer, vgenre,vansprechpartner Tabelle 2 contacts enthält folgende Felder id canrede, ctitel, cvorname, cname, cstra

Re: Auth ignoring Session, redirecting to login under heavy load.

2009-04-30 Thread brian
On Thu, Apr 30, 2009 at 5:04 AM, Jonas Hartmann wrote: > > Hello, > > i have an issue with deploying my cake application. Running local on > Mac OS X it works like charm. After uploading it to a Ubuntu based > VHost on HostEurope I had some headaches with PLESK and its strange > standard unix per

who can help me about ACL?

2009-04-30 Thread xing
Hi,everyone! I have a problem about ACL, there always a warnning like this: " DbAcl::allow() - Invalid node [CORE\cake\libs\controller \components\acl.php, line 325" who know this,please help me! thanks! --~--~-~--~~~---~--~~ You receiv

Syntax-Error

2009-04-30 Thread Saibot
Can somebody ecplain me what I am doing wrong? http://pastebin.com/m79236652 --~--~-~--~~~---~--~~ 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 unsubsc

routing to a non-cake php page (again)

2009-04-30 Thread the_woodsman
Hi Bakers, I want to use routes to point /about to /blog/about, i.e in webroot, not a controller/action combo. I know I could do this mod rewrite, and it'd be better for performance etc, but given some tight deadlines and a lot of legacy routes to change, it'd be lots simpler for me to do someth

RE: Value from Key

2009-04-30 Thread Dave Maharaj :: WidePixels.com
Thanks for the tip...but you can keep your comments to yourself. If i ask a question and make a mistake im glad to those who point it out but you can keep your critiques to yourself. Maybe I am not a professional PHP guru such as yourself but the way you learn is from mistakes. _ From

Re: Value from Key

2009-04-30 Thread Aivaras
count($results) ? You surely need to study PHP just a little bit more before diving into a framework :') Faifas On Thu, Apr 30, 2009 at 19:06, Dave Maharaj :: WidePixels.com < d...@widepixels.com> wrote: > Thanks to everyone, > > What i did was: > > $i = 0; > foreach ($results as $error) :

RE: Value from Key

2009-04-30 Thread Dave Maharaj :: WidePixels.com
Thanks to everyone, What i did was: Its just for tracking a user actions on my siteso if they do something they should not be doing such as messing with the URL or links/forms with Firebug it saves the 'bad' info they tried changing it to , where they tied changing it to in a db, and

RE: Compare Array - GOT IT!

2009-04-30 Thread Dave Maharaj :: WidePixels.com
Yes... the goal is to secure the form (the checkbox values) so an end user can not modify the values and submit...All values submitted are checked against possible values in the db...so if they don't exist we know someone was messing with the form. So that's all done and working then it was ju

Is this even possible in cake? (model associations with unknown models)

2009-04-30 Thread Evert
My site is build with a lot of plugins. Now, I used to use a 'pages' table that had the column called 'widgets' the column contained a serialized array which contained information about which widgets (models) should be in that page. Something like this: array( [0] => array( 'name' =>

Re: Need little help with a validation rule

2009-04-30 Thread Smelly Eddie
Ernesto: I like to make custom validation methods when dealing with complex relationships between fields. http://edwardawebb.com/programming/php-programming/cakephp/validating-optional-fields-cakephp-dreaded-scenario On Apr 30, 4:31 am, Ernesto wrote: > Hi guys thx for the responses > > @Brian

Re: Problem with update of multiple div's with Ajax helper

2009-04-30 Thread chris
One of the reasons I wasn't getting any helpful information is becuase I'd disabled debugging for the ajax view. Anyway, it seems that the issue was the model data I was trying to loop through, or just get the size of, needs to be avaialable to the ajax view, even though it is not meant to be upd

Buggy radio buttons using Form Helper?

2009-04-30 Thread Martin Westin
Hi, I was playing with radio.-buttons today. (rarely used form element in my work) I think it is strage if this is a proper bug but radio buttons seem to be missing seem of the magic of other elements. Am doing something staggeringly wrong here? echo $form->input('spelling_important', array(

Re: recursive for parents

2009-04-30 Thread brian
It goes up to 4?!? Signs and wonders ... On Thu, Apr 30, 2009 at 11:26 AM, fain182 wrote: > > solution was simple... > var $recursive = 4 > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Re: recursive for parents

2009-04-30 Thread fain182
solution was simple... var $recursive = 4 --~--~-~--~~~---~--~~ 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

Validation on staging server

2009-04-30 Thread MN
Hi, I am facing a weird problem and hope somebody has a clue. The problem is that the validation of any model doesn't work after deploying on a staging server. The local app is just working fine and all form data is validated and validation messages are shown. The staging app seems to do nothin

MSSSQL nvarchar support

2009-04-30 Thread umberleigh
Does anyone know if CakePHP officially supports nvarchar fields in MSSQL databases? I'm using MS SQL Server 2005 with CakePHP 1.2.2.8120 Stable on windows and get the following errors from Cake when trying to view a page that contains text from an nvarchar(max) field: Warning (2): mssql_query()

Re: Auth Component require login in every page

2009-04-30 Thread Faza
I think you have forgotten to add this to controller beforeFilter(): function beforeFilter() { parent::beforeFilter(); $this->Auth->allowedActions = array('logout', 'initDB'); } http://book.cakephp.org/view/643/Preparing-to-Add-Auth also, I'm not sure but I've read s

Re: Fatal error: Call to a member function find()

2009-04-30 Thread Stu
Well the key lines here are: Notice (8): Undefined property: Enmn::$Wordtype [APP\controllers \enmns_controller.php, line 27] and Fatal error: Call to a member function find() on a non-object in F: \wamp\www\dict\app\controllers\enmns_controller.php on line 27 My diagnostic shows that you are

Database column level processing

2009-04-30 Thread MalContented
I need a way to process specific database columns when they are read from or saved to the database. Specifically, we need to format dates to a local formatting when read and format them to database format when saved. The only way I can see is to hook in to beforeSave and afterFind but those hooks

Re: Auth Component require login in every page

2009-04-30 Thread DatacenterHellas
I've got it ! ! ! Thanks a lot ! ! ! Now It works perfectly ! ! ! On 30 Απρ, 17:33, rgreenphotodesign wrote: > You need this in all your controllers... > > function beforeFilter() >     { > >         //actions we allow without authentication, you can also put them > in the app_controller.php

Re: Auth Component require login in every page

2009-04-30 Thread Brendon Kozlowski
rgreenphotodesign gave the right code, but I'm going to *guess* it won't work as-is. If by "index" you meant the home page of your site (home.ctp), you actually need to allow the PagesController method of "display". Therefore, in your AppController, you'd add: //App Controller -- global control

Re: Auth Component require login in every page

2009-04-30 Thread rgreenphotodesign
You need this in all your controllers... function beforeFilter() { //actions we allow without authentication, you can also put them in the app_controller.php $this->Auth->allow('index'); } Add all the actions in your controller you want people to have access to without a

Re: recursive for parents

2009-04-30 Thread fain182
maybe i found the solution.. linkable behavior: http://rafaelbandeira3.wordpress.com/2008/11/16/linkable-behavior-taking-it-easy-in-your-db/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to

Re: Compare Array - GOT IT!

2009-04-30 Thread Brendon Kozlowski
Ah, okay I understand what you mean now. It looks like you're doing this in the model; am I correct on that? It should probably be set as a custom validation for the particular field(s) you are concerned about. Since you didn't paste all of your code (you don't need to) I'll just hope that's wh

url validation php4 Bug?

2009-04-30 Thread nicolas
hello, I wrote a message a week ago to explain that the url validation wasn't working well on a production server running php4. The server has been upgraded to php5 and now the validation works smoothly. Before I file this as a bug, anyone has experienced the same problem? Thanks ,n --~--~-

Re: MVC PHP Framework

2009-04-30 Thread AD7six
Thread closed. --~--~-~--~~~---~--~~ 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...@google

how to retrieve joined result from multiple tables in cakePHP

2009-04-30 Thread Manish Sharma
Hi, can anyone tell me, how to retrieve joined result from multiple tables in cakePHP from using cakePHP mvc architecture. For e.g., I've three tables to join (tbl_topics, tbl_items, tbl_votes. There relationship is defined as, a topic can have many items and an item can have many votes). Now I wa

Problem with update of multiple div's with Ajax helper

2009-04-30 Thread chris
Hi I'm fairly new to cakePHP and have been working on trying to use the Ajax helper to update 2 or more divs from a single button press. I've been using this tutorial http://www.reversefolds.com/articles/show/ajax Which I can get to work with my cake install (1.2), but I think its designed for

Auth Component require login in every page

2009-04-30 Thread DatacenterHellas
Hello all ! ! ! I'm new to CakePHP and I already have create a login system based on Auth Component. All are fine with that component, but the problem that I have is that if the user logou the system then he can't see any page. The Auth redirects automatic to login form. What can I do, for despla

Fatal error: Call to a member function find()

2009-04-30 Thread kani
Notice (8): Undefined property: Enmn::$Wordtype [APP\controllers \enmns_controller.php, line 27] Code } } $wordtypes = $this->Enmn->Wordtype->find('list'); EnmnsController::add() - APP\controllers\enmns_controller.php, line 27 Object::dispatchMethod() - CORE\cake\l

Re: MVC PHP Framework

2009-04-30 Thread Celeroo
You have a point although not entirely correct. The models provide standard CRUD operations through 2 simple functions in the DB object. So all you need to do is to pass them array of variables, like $_POST and you can insert or update. In my opinion it's even better that ActiveRecord, because AR

saveAll weirdness

2009-04-30 Thread Ernesto
Hello. i'm playing with saveAll here's the array i'm saving Array ( [Commessa] => Array ( [Codice] => [XXX] ) [OggettiPerCommessa] => Array ( [1] => Array ( [FieldA] => "AAA" [FieldB] => "BBB

Re: Missing table for missing model

2009-04-30 Thread forrestgump
Has no one a solution? :( On Apr 29, 9:10 pm, forrestgump wrote: > Hey Faifas, > Yes i havewhat is even more amusing is that...i put back the > Seasons table, but there is no Mode,View or controller for it(i > deleted them)and the app seems to be running... > > Cheers2u2, > Forrestgump >

Re: Different Validation Rule for Different Purpose?

2009-04-30 Thread starkey
You don't need to call model->validates for the login or set any variables to dummy values. Here is an article you should read: http://bakery.cakephp.org/articles/view/simple-form-authentication-in-1-2-x-x On Apr 29, 9:57 pm, "yangsy...@gmail.com" wrote: > Thanks for your answer. I understand

Re: model::getColumnType (or something equivalent) in Views or Elements

2009-04-30 Thread John Andersen
Get the information from the model! Look at: http://book.cakephp.org/view/71/Model-Attributes#_schema-442 Enjoy, John On Apr 30, 11:37 am, Ernesto wrote: > Hello. > > is there any way to know the column type of a given field from a view > (or an element)?? --~--~-~--~~--

Re: Value from Key

2009-04-30 Thread starkey
just do a foreach loop. http://us.php.net/manual/en/control-structures.foreach.php On Apr 30, 3:36 am, Aivaras wrote: > for($i = 0; $i < count($array); $i++){ >    echo $array[$i]; // will output your error >    echo $i; // will output the index. > > } > > Still, I have absolutely no idea why w

Re: multiple from error message with "escape => false"

2009-04-30 Thread Amit Badkas
Hi, The FormHelper::error() needs second argument in same fashion as you used it in Form::input() method's second argument's 'error' key. i.e., echo $form->error('fieldName', array('rule1 => __('Message 1', true), 'rule2 => __('Message 2', true), ..), array('escape' => false)); Hope this help

Re: Auth ignoring Session, redirecting to login under heavy load.

2009-04-30 Thread Amit Badkas
Hi, What's the security level of your application (you can find this in app/config/core.php in 'Security.level' setting)? If it's 'high' then try after changing it to 'medium' or 'low' Amit http://amitrb.wordpress.com/ http://coppermine-gallery.net/ http://cheesecake-photoblog.org/ http://www.sa

Re: cakePHP Media Views vs Apache virtual() subrequest

2009-04-30 Thread davidpersson
Hi Martin, Media View should just work for your scenario but if you are really searching for an alternative have a look on mod_xsendfile at http://dickensurl.com/76ad/Repression_is_the_only_lasting_philosophy -David On 29 Apr., 20:41, "mar...@sommer.net" wrote: > Hi, > > I am working on a cak

Re: howto access paginator data in controller

2009-04-30 Thread tobi_one
Hi Amit, many thanks for your hint! Worked great! For reference, the count after a pagination call in the controller can be accessed with; $this->params['paging']['Model']['count']; where "Model" is the name of the model you were paginating. Cheers, tobi_one On 30 Apr., 11:04, Amit Badkas wr

Re: howto access paginator data in controller

2009-04-30 Thread Amit Badkas
Hi, If you look at https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/controller/controller.php#L1096(at paginate() method's end), you will notice that pagination related parameters get stored in controller's 'params' property Amit http://amitrb.wordpress.com/ http://coppermine-gallery

Auth ignoring Session, redirecting to login under heavy load.

2009-04-30 Thread Jonas Hartmann
Hello, i have an issue with deploying my cake application. Running local on Mac OS X it works like charm. After uploading it to a Ubuntu based VHost on HostEurope I had some headaches with PLESK and its strange standard unix permission setup. After making those things work, I still have o

Re: Possible very-low-danger bug in view.php (cake core)

2009-04-30 Thread Ernesto
Thx fain. The page you linked says "Send an email (post a message) to the google group to see if anyone else has seen the issue." so... someone else encountered this issue? On 29 Apr, 20:05, fain182 wrote: > On Wed, Apr 29, 2009 at 2:04 PM, Ernesto wrote: > > > Hello. > > > here's my bootst

model::getColumnType (or something equivalent) in Views or Elements

2009-04-30 Thread Ernesto
Hello. is there any way to know the column type of a given field from a view (or an element)?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegrou

Re: Need little help with a validation rule

2009-04-30 Thread Ernesto
Hi guys thx for the responses @Brian i already have the "notEmptY" rule on each field. But the rule will fail is the field is not set. @starkey overriding model::save doesn't sound cake-ish to me... imo a custom validation rule will be more coherent @jstein thx for the hint On 30 Apr, 01:54, b

Re: recursive for parents

2009-04-30 Thread fain182
> Right. I had mixed up the hasMany/belongsTo relationships. I believe > that, if it was the other way around, you'd get all the models. there is no way to have the parents of the parents of a model ?! it's really strange... thank you, pietro --~--~-~--~~~---~--~~

howto access paginator data in controller

2009-04-30 Thread tobi_one
Hi, I see that using the paginator results in a "SELECT COUNT(*)" query before retrieving the data. I would like to use the result of this query rather than doing another findCount on the model again. How do I access this count data in the controller? Or in general - how do I access the paginato

Re: Value from Key

2009-04-30 Thread Aivaras
for($i = 0; $i < count($array); $i++){ echo $array[$i]; // will output your error echo $i; // will output the index. } Still, I have absolutely no idea why would you need to know indexes for error reporting. Faifas On Thu, Apr 30, 2009 at 02:30, Dave Maharaj :: WidePixels.com < d...@widep

Re: HELP - Search & Pagination on three different models

2009-04-30 Thread TGurske
As a follow up - I ended up making a mysql view table with a UNION join to include the content from all the tables I wanted to search. Then I just searched that table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "