$this-Model-Behaviors-detach('Translate'); causes Segmentation Fault

2009-09-04 Thread blickensdoer...@googlemail.com
hi all i'm running into a very strange problem: i've got a model running with Translate Behavior and so far no Problems. now, at some point where i do a Model-save() i want to detach the Translate Behavior in before, because otherwise my foreign keys in the table get lost. when doing so, i get

Help with Date Range in Forms Helper

2009-09-04 Thread dmsmitty
I'm creating a form using the forms helper to allow a user to search for events occurring within a specified date range. My model (called Event) has a field called date, which is of type DATE. I want to create 2 form inputs: a minimum and a maximum date range. My controller will have conditions

Initial Install

2009-09-04 Thread Scott Kustes
Okay, this is probably the most simple, ridiculous question you've had on this group, but here goes...I downloaded the latest version of Cake and uploaded it to a directory on the server (LAMP). I cleared up the errors when accessing the root of the folder (http://lifespotlight.com/

Registration using auth component

2009-09-04 Thread hemant
I want use auth component for new registration. it always ask me to login first and then prompt for registration can any one guide me how to use auth for registraion and login process --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Error on syntax of localization file default.po

2009-09-04 Thread byqsri
Ok ... thanks But I use a behaviour that validates the extension and return the error message like The submitted file extension is not permitted, only jpeg,png,gif permitted. where the extension's type can change. In my view I would use a code like: __d('errors',$messageError) because

Re: Mapping beetween CakePHP attribute's model's names and real database table's names!

2009-09-04 Thread Xanax
ok :( On 3 sep, 18:27, Miles J mileswjohn...@gmail.com wrote: If you hardcoded the column names, then yes you would have to change them manually. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To

Re: Creating command-line script

2009-09-04 Thread WebbedIT
I created a shell which is ran by cronjob and it's contents are as follows: ?php class DashboardShell extends Shell { function main() { ClassRegistry::init('Agency')-__reminders(); ClassRegistry::init('Bednight')-__reminders(); ClassRegistry::init('RolesStaff')-__reminders();

Re: Registration using auth component

2009-09-04 Thread WebbedIT
You need to specify $this-Auth-allow('register'); in the beforeFilter () of your users_controller.php Read about the Auth components methods for more info. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP

Re: User preferences

2009-09-04 Thread MPeg
I've built a system called Register who manage a table with a key=value logic with a little complex key definition. A key is generally a meaningfull string such elementsPerPage, applicationName, etc... This string is an unique identifier in Register. To reach a more sophisticated level of

Re: Complex model associations, pagination and containable

2009-09-04 Thread martinp
Haven't I got MySQL errors because my model's aren't being contained? On Sep 4, 3:54 am, Miles J mileswjohn...@gmail.com wrote: Well there you go, it aint containing cause your MySQL fails. Try fixing that first. --~--~-~--~~~---~--~~ You received this message

seTable for ACL tables ?...

2009-09-04 Thread Xanax
Hello, Do you know if there is a way to set the $useTable variable for ACL tables ? I changed the names of acos, aros, aros_acos to T_acos,T_aros,T_aros_acos tables and i need to make a mapping beetween the new names and the models. I tried to create 3 models file acos.php etc... with var:

Cake looking for css controller?

2009-09-04 Thread Ernesto
Hello. i'm having troubles with one of my cake apps basically the app won't load any css. if i copy/paste css link in browser's address bar cake returns an error page like this: Missing Controller Error: CssController could not be found. Error: Create the class CssController below in file:

how to check whether the file has already ben uploaded

2009-09-04 Thread ruchika batra
HiI have created an upload module.I want to check that whether a file has already been uploaded and the user is not allowed to upload the same file again.Please suggest. Thanks in advance.can i do it using beforesave() callback method and how? --~--~-~--~~~---~--~~

Re: Cake looking for css controller?

2009-09-04 Thread grigri
Looks like your css files are not where they should be. Check all their filenames and paths. Because missing asset files (img, css, js, ...) can really slow down a website (in debug mode especially), and make nonsense of your logs and sometimes trash your sessions, I usually modifiy the

Validation for FCK Editors field

2009-09-04 Thread bhushan A
Hi All, I have integrated fck editor in cakephp. But unable to apply JS validation for that field. I have tried with document.getElementById('specified value').value. But it is showing blank value though i have entered sometext in it. Please help. You can mail me on

Re: how to check whether the file has already ben uploaded

2009-09-04 Thread martinp
CakePHP has a file class, with an exists function. Or you can just use PHP's file_exists function. http://api.cakephp.org/class/file#method-Fileexists See also: http://cakebaker.42dh.com/2006/09/20/how-to-use-the-file-class-from-the-core/ On Sep 4, 12:17 pm, ruchika batra

Re: Help with Date Range in Forms Helper

2009-09-04 Thread martinp
You can set the minYear and maxYear in the form helper: http://book.cakephp.org/view/480/options-minYear-options-maxYear Then you just have to make sure your conditions are like: array( 'Event.date =' = $this-data['Event']['min_date'], 'Event.date =' = $this-data['Event']['max_date'] )

Re: Validation for FCK Editors field

2009-09-04 Thread martinp
I would ask in a Javascript forum unless you're mixing up your PHP and Javascript, which would be bad. On Sep 4, 12:18 pm, bhushan A bhushanahir...@gmail.com wrote: Hi All,    I have integrated fck editor in cakephp. But unable to apply JS validation for that field. I have tried with    

Re: Validation for FCK Editors field

2009-09-04 Thread Aivaras
Why is it bad to mix JS with PHP? You can get some seriously cool results. Or when you need a custom ID for your element which you created via ajax, you still have to use PHP Faifas On Fri, Sep 4, 2009 at 13:55, martinp he...@martinpetts.com wrote: I would ask in a Javascript forum

Re: Validation for FCK Editors field

2009-09-04 Thread bhushan A
I have created form in cakephp using $form object and i am accesing it by id in js function. Generally we do validation in JS only so we always mix JS and php to get results. I have followed http://bakery.cakephp.org/articles/view/using-fckeditor-with-cakephp to integrate fck. On 4 Sep, 16:26,

Automatically rendering element using RequestHandler - possible?

2009-09-04 Thread eagerterrier
Hi I have a problem that I just can't get my head around, and wonder if anyone can help. In my app, I have a series of normal pages that have google analytics in footer. I then have hundreds of ajax calls that are either rendered views, or simply echoed PHP statements in controllers. What I

Re: Cake looking for css controller?

2009-09-04 Thread Ernesto
thanks grigri. the path name were correct. the problem was the layout's name content + leftbar.ctp it looks like the + was the cause :) On 4 Set, 12:28, grigri j...@hendersonwebdesign.com wrote: Looks like your css files are not where they should be. Check all their filenames and paths.

Changing Acl database

2009-09-04 Thread Nate
I'd infer from the comments in the code that in order to change my Acl's data source from the default, I should set the following in my app's core.php: Configure::write('Acl.database', 'myDataSourceName'); Assuming that $myDataSourceName is set in database.php, I'd expect cake -app

helping in pagination with relationship

2009-09-04 Thread Amit Rawat
Can any one tell me how to use pagination with relationship. for e.g $locArray = array( 'hasOne'=array ('profile'=array('className'='Profile' , 'dependent'='true', 'foreignKey' = 'pro_id')));

Re: helping in pagination with relationship

2009-09-04 Thread Cosmin Paul
For pagination with relationships I use this: CODE function ReturnMyArrayForPagination(){ . . /* conditional code */ . return array( 'MortgageDetail' = array( 'limit'= 10,

xml serialization - node root

2009-09-04 Thread tobi_one
Hi, since updating to cake 1.2. I have been having problems with the xml helper. This ticket (https://trac.cakephp.org/ticket/6538) seems to fix a bug, but I still have the following problem. If I have a data structure like this: Array ( [result] = Array (

Re: Changing Acl database

2009-09-04 Thread Dardo Sordi Bogado
Have you tried using the-connection config switch? Regards, - Dardo. --~--~-~--~~~---~--~~ 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

Re: Mapping beetween CakePHP attribute's model's names and real database table's names!

2009-09-04 Thread Rick
If you are using a later version of mysql you can use views to handle column and table name changes I think. Rick On Sep 4, 3:37 am, Xanax mammer...@gmail.com wrote: ok :( On 3 sep, 18:27, Miles J mileswjohn...@gmail.com wrote: If you hardcoded the column names, then yes you would have

Re: Validation for FCK Editors field

2009-09-04 Thread Aivaras
Well, Sadly, I do not know the ID, but you could try adding some content into FCK and then use firebug to find your content. Firebug changes the source you see when content changes, so you will definitely sort it out. Hope this helps, Faifas On Fri, Sep 4, 2009 at 14:46, bhushan A

Oracle autoincrement : PROBLEM

2009-09-04 Thread Xanax
Hi, I have a BIG problem. There is no autoincrement option in Oracle like in MySQL. Apparently, with CakePHP and Oracle, people use sequences and triggers to bypass this. My problem : I can't use triggers on my database, it's forbidden by my company. And of course i don't want to replace all

CKEditor in combination with images controller

2009-09-04 Thread Marco
Hi guys, I'm wondering how I can combine CKEditor's image function with my own image controller, responsible for managing image upload and image detail data. My goal was to select from an image list provided by the image controller from inside CKEditor's image dialog. But maybe this is the wrong

Simple question !

2009-09-04 Thread Xanax
Is it possible to create a beforesave method for all the models ? I mean in a file like app_controller which controll all the controllers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups CakePHP group. To post to this

Re: Simple question !

2009-09-04 Thread Marcelo Andrade
On Fri, Sep 4, 2009 at 11:09 AM, Xanaxmammer...@gmail.com wrote: Is it possible to create a beforesave method for all the models ? I mean in a file like app_controller which controll all the controllers Yes. You can create an app_model.php with an AppModel class extending Model in you /app

Alternatives to Security Component Authentication with cgi php

2009-09-04 Thread J3ffy
I've been developing a system that does server-to-server communication using Basic HTTP Auth for authentication behind an SSL connection. The requests are created and sent with the HttpSocket class. The component that receives the requests uses the Security component to force and check

Re: Session timeout way too short

2009-09-04 Thread Martin Westin
There is a difference between Cake storage and Database storage. There is both a php temp folder and a cake temp folder. On Sep 3, 6:35 pm, euromark (munich) dereurom...@googlemail.com wrote: i see i guess the php file storage is way faster than the DB one especially if your session has

Menus best practice

2009-09-04 Thread Ernesto
hello. i have an element that contains a simple menu i can't put this menu in the layout because the layout file is shared across many apps my goal is to show the menu in every view of my app. any idea? --~--~-~--~~~---~--~~ You received this message because

Re: Problem serving video to Mac/Safari/Quicktime

2009-09-04 Thread Martin Westin
Not really the reason. My guess is that it has something to do with the new way of sanboxing plugins and/or the new dual Quicktime. So a video file that needs a 32bit codec you would have Safari spawning a plugin process for Quicktime which would spawn a 32bit process for the specific rendering

Re: Changing Acl database

2009-09-04 Thread Nate
That did it, thanks very much. Off the top of your head, is there any relatively complete documentation about the console switches available? I haven't been able to find much console info in the CakePHP.org docs. For anyone else having this problem, running the following cake command does the

Re: Simple question !

2009-09-04 Thread brian
On Fri, Sep 4, 2009 at 10:14 AM, Marcelo Andrademfandr...@gmail.com wrote: On Fri, Sep 4, 2009 at 11:09 AM, Xanaxmammer...@gmail.com wrote: Is it possible to create a beforesave method for all the models ? I mean in a file like app_controller which controll all the controllers Yes.  You

Re: Complex model associations, pagination and containable

2009-09-04 Thread brian
On Fri, Sep 4, 2009 at 4:12 AM, martinphe...@martinpetts.com wrote: Haven't I got MySQL errors because my model's aren't being contained? Yes. I've run into problems like this before and found that I needed to be explicit about the fields--specifically the foreign keys--for Containable to be

Re: Menus best practice

2009-09-04 Thread Martin Westin
You can create an empty element in all the other apps and just include the element in the layout. You can also let the current app use another layout, one which inherits the global layout. In this special layout you include the menu element (somehow). I often work like this. With one base-layout

Re: Problem serving video to Mac/Safari/Quicktime

2009-09-04 Thread Martin Westin
Nope. I really thought that setting a future expire header might work. For now, I set Configure::write('Session.checkAgent', false); for request to the problematic action. At least I am only lowering security for that small part of the app. On Sep 4, 4:41 pm, Martin Westin

Re: Anyone get the Email Component to work with gmail smtp.gmail.com?

2009-09-04 Thread LunarDraco
You need to make sure in your php.ini you have uncommented the line extension=php_openssl.dll Also here is a link that have some samples in php and good comments, be sure and read them. Get the simple php test file working first then you should be able to do it.

How to completely disable database access?

2009-09-04 Thread DavidH
Hi All I'm currently prototyping an application that's going to use a document database rather than an RDBMS. Couch DB is currently the favourite. I'm building the prototype using CakePHP's Controller / View structures with a third party PHP library installed in Vendoirs to give me access to my

Re: Complex model associations, pagination and containable

2009-09-04 Thread Miles J
No its not. Error: 1054: Unknown column 'School.city' in 'where clause' That means you dont have a column named city on your school table/ model, thats not caused by the containment. On Sep 4, 1:12 am, martinp he...@martinpetts.com wrote: Haven't I got MySQL errors because my model's aren't

Re: Cake looking for css controller?

2009-09-04 Thread Miles J
Well should of been obvious, you cant name files that way. On Sep 4, 5:01 am, Ernesto e.fanz...@gmail.com wrote: thanks grigri. the path name were correct. the problem was the layout's name content + leftbar.ctp it looks like the + was the cause :) On 4 Set, 12:28, grigri

Re: Complex model associations, pagination and containable

2009-09-04 Thread brian
On Fri, Sep 4, 2009 at 11:55 AM, Miles Jmileswjohn...@gmail.com wrote: No its not. Error: 1054: Unknown column 'School.city' in 'where clause' That means you dont have a column named city on your school table/ model, thats not caused by the containment. It *appears* that way, yes. But

Re: How to completely disable database access?

2009-09-04 Thread majna
http://www.sanisoft.com/blog/2008/08/22/using-cakephp-without-a-database/ On Sep 4, 5:53 pm, DavidH djhollingwo...@gmail.com wrote: Hi All I'm currently prototyping an application that's going to use a document database rather than an RDBMS. Couch DB is currently the favourite. I'm

Re: Extending AppModel

2009-09-04 Thread mark_story
Well if you are going to override the constructor you should do so with all the params. Otherwise certain things stop working well. As for TriadApi, you can just import TriadApi before the classes that use it. App::import('Model', 'TriadApi'); class Subscriber extends TriadApi { Like that.

Re: Complex model associations, pagination and containable

2009-09-04 Thread Miles J
But its in the where clause, so hes supplying it himself. LEFT JOIN `courses` AS `Course` ON (`CourseResult`.`course_id` = `Course`.`id`) WHERE `Course`.`course_type_id` = 1 AND `School`.`city` = 'London' AND `School`.`country_id` = '225' AND ((`CourseLevelMin`.`order` = '1') OR

Re: Simple question !

2009-09-04 Thread mig_akira
Yes, I think that it can be done by creating a file called app_models.php in the root folder of your application (like the app_controller.php) Aziz-6 wrote: Is it possible to create a beforesave method for all the models ? I mean in a file like app_controller which controll all the

Re: Simple question !

2009-09-04 Thread brian
app_model.php (singular) On Fri, Sep 4, 2009 at 2:17 PM, mig_akiramig_ak...@hotmail.com wrote: Yes, I think that it can be done by creating a file called app_models.php in the root folder of your application (like the app_controller.php) Aziz-6 wrote: Is it possible to create a

Re: Complex model associations, pagination and containable

2009-09-04 Thread Miles J
Correct me if im wrong, but are you allowed to use $conditions the way he is? On top of that, I feel like were not seeing all the queries, all of those associations cant be belongsTo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Session timeout way too short

2009-09-04 Thread euromark (munich)
apparently you were right about that garbige collector after i changed the storage from php to cake and to the /tmp/ sessions/ folder it now seems to keep alive 20 hours thx On 4 Sep., 16:30, Martin Westin martin.westin...@gmail.com wrote: There is a difference between Cake storage and

Re: $this-Model-Behaviors-detach('Translate'); causes Segmentation Fault

2009-09-04 Thread blickensdoer...@googlemail.com
hi again i tracked it down to the line if (isset($this-{$name})) { in the behavior.php if this helps anyone pr($this-{$name}) works fine regards On 4 Sep., 00:08, blickensdoer...@googlemail.com blickensdoer...@googlemail.com wrote: hi all i'm running into a very strange problem: i've

User-generated id column

2009-09-04 Thread McScreech
Hello, I am converting an existing db to a web-based app. For most of the tables I have created a standard auto-incrementing integer id column. However, two of them have a pre-existing id column in the form 'AA- DDD', where A is alpha, D is numeric and the hyphen is embedded. I am looking

Re: Paginate Routing

2009-09-04 Thread bing
Hi, Did you ever get an answer on this? I'm having the same issue. Thanks, Ben On Aug 17, 11:38 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: Ok I managed to get all my pagination up and running the way I needed. The only thing left is removing /page:3 to only display /3

RE: Paginate Routing

2009-09-04 Thread Dave Maharaj :: WidePixels.com
No I never got a response or found a solution. Any luck on your end? Dave -Original Message- From: bing [mailto:benjamin.ingm...@gmail.com] Sent: September-04-09 7:24 PM To: CakePHP Subject: Re: Paginate Routing Hi, Did you ever get an answer on this? I'm having the same issue.

Re: ACL bug when Auth::authorize = 'actions'? 1.2.4.8284

2009-09-04 Thread housebolt
Well I figured it out, it definitely was me. Apparently you can't just set a root ACO and let that be, you do actually have to create all of the ACO's INCLUDING their children. For some reason from the tutorial I was under the impression that this wasn't needed, that you could just set a root

500 Internal Server Error

2009-09-04 Thread keyser_soze83
Dear co-developers, I know this problem keeps on appearing quite a few times on the groups, but anyway, after searching for a while, I did not found a solution yet. Hopefully you can help me out here because I'm getting desperate. I've developed some site with cakephp 1.2, but on the domain

Send mail smtp

2009-09-04 Thread Benedikt R.
Hi! I get this error: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known: 0 This is my controller action: function register( ) { if ( !empty($this-data) ) { $this-Email-smtpOptions = array( 'port' = '25',

Re: Paginate Routing

2009-09-04 Thread Ben Ingmire
No, not yet. If I find it I'll ping you. Its weird as symfony has a very clear way of routing the paging. -Original Message- From: Dave Maharaj :: WidePixels.com d...@widepixels.com Date: Fri, 4 Sep 2009 19:33:06 To: cake-php@googlegroups.com Subject: RE: Paginate Routing No I

Media Plugin

2009-09-04 Thread robert matousek
I'm hoping someone can help me use the Media Plugin developed by David Persson. First of all, I used the Attachment model to save some images. When I try to render them using the MediumHelper, it generates the correct paths, but images aren't showing? Any idea why? e.g.

Users rating

2009-09-04 Thread koko
Hello, I have a webapp where users can rate other users, it's something like amazone rating system where you can rate sellers and comment on their profile page. The users table is something like: id username password and the rating table: id user_id reviewer_id note that user_id and

Ad Hoc Joins Bakery

2009-09-04 Thread Dave Maharaj :: WidePixels.com
Has anyone used the Ad-hoc Joins in Model::find() as published in the Bakery? I have it up and running but I would like to use contain. The results are pulling way to much data for the tables. $tagged = Set::extract($post, 'Tag.{n}.name'); //get all tags for this Post $relates =

Re: Users rating

2009-09-04 Thread euromark (munich)
sure check out the 3rd post for an example: http://www.cakephp-forum.com/datenbanken-mysql/mehr-als-einmal-auf-dieselbe-tabelle-verweisen-t351.html On 5 Sep., 03:08, koko koko...@gmail.com wrote: Hello, I have a webapp where users can rate other users, it's something like amazone rating

Re: Users rating

2009-09-04 Thread Khaled al-Horani
thanks exactly what I want to do. On Sep 5, 4:45 am, euromark (munich) dereurom...@googlemail.com wrote: sure check out the 3rd post for an example: http://www.cakephp-forum.com/datenbanken-mysql/mehr-als-einmal-auf-di... On 5 Sep., 03:08, koko koko...@gmail.com wrote: Hello, I have

RE: Ad Hoc Joins Bakery - SOLVED

2009-09-04 Thread Dave Maharaj :: WidePixels.com
Sorry for posting. I figured it out. $relates = $this-Post-find('matches', array( 'model' = 'Tags', 'contain' = false, 'fields' = array('Post.id', Post.title), 'scope' = array( 'Tag.name' = $tagged))); Dave -Original Message-

Re: Initial Install

2009-09-04 Thread Scott Kustes
Anyone? Does anyone know what I need to do to get this thing up and running? On Sep 3, 9:14 pm, Scott Kustes scott.kus...@gmail.com wrote: Okay, this is probably the most simple, ridiculous question you've had on this group, but here goes...I downloaded the latest version of Cake and

model method executed as sql query problem.

2009-09-04 Thread learning_cake_php
well i dont know why cake behaves like this.. i had model: class MyModel extends AppModel{ . . //then i had a method function myMethod(){ . . } } when trying to call that method in my controller: class