Re: autocomplete options ?

2006-10-20 Thread Steniskis
Here is the code : div id=options_vehicules table tr td VĂ©hicule ?php echo $ajax-autoComplete('Vehicule/listedesvehicules','/tournees/refresh_vehicules', array('size'='20','minChars'='4', 'update'='misajour_vehicules', 'afterUpdate'=pick_vehicule)); ? div class=misajour_vehicules

Re: Using Exceptions in Cake

2006-10-20 Thread Evan
exceptions are only available in php5. they wouldn't work with php4. cake was primarily made to support php4, so i don't think they're gonna implement exceptions here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: autocomplete options ?

2006-10-20 Thread leo.cacheux
The $ajax-autoComplete method create the div element itself, so you don't need it in your page and in the 'update' field. An error can also come from your '/tournees/refresh_vehicules' controller method or view. --~--~-~--~~~---~--~~ You received this message

Helpers and Components

2006-10-20 Thread davide
Sometime ago, I developed my own helpers for formatting date. Everything is ok, but now I need those function even in the controller level. So I thought about components. Everything is still fine. Now I wouldn't like to duplicate the code, I would like something like using the components code from

Moving methods to AppModel

2006-10-20 Thread Sonic Baker
Hi,I have a model method which I'd like to use in two different models. If I move it into AppModel it'll get loaded for every model which I could be inefficient (IIRC). So as far as I can see I have 3 further choices. 1. Include the Model in the $uses[] array of the controller I want to call the

Password protect scaffolding pages

2006-10-20 Thread xhenxhe
I have some scaffolding that is useful to me, but I'd like some form of password authentication. For example, I have mydomain.com/users/ which is simple a scaffold page that I would like to protect with a password. But I would like users to be able to see mydomain.com/users/add without

Re: Moving methods to AppModel

2006-10-20 Thread [EMAIL PROTECTED]
2. Make an intermediate model; inherit this from AppModel and Inherit the two models from this. that was the first thing i thought about too. and i think it's the cleanest, best, most-OO way ;-) --~--~-~--~~~---~--~~ You received this message because you are

Re: Moving methods to AppModel

2006-10-20 Thread Sonic Baker
On 10/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 2. Make an intermediate model; inherit this from AppModel and Inherit the two models from this.that was the first thing i thought about too.and i think it's thecleanest, best, most-OO way ;-) Hi Deiter,Thanks for your advice. I was reading

Re: Moving methods to AppModel

2006-10-20 Thread Marcelo de Moraes Serpa
Well, don't take composite over inheritance too serious. There are times where inheritance is the best way, no doubt.On 10/20/06, Sonic Baker [EMAIL PROTECTED] wrote: On 10/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: 2. Make an intermediate model; inherit this from AppModel and Inherit

RE: Helpers and Components

2006-10-20 Thread Christian Winther
You could make your methods static and access them with ClassName::yourMethod aswell as $className-yourMethod /Christian -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of davide Sent: 20. oktober 2006 11:49 To: Cake PHP ML Subject: Helpers and

Re: Helpers and Components

2006-10-20 Thread leo.cacheux
You forgot to call view in the helper : class MyHelper... function dumb(param1, param2){ return $this-view-controller-MyComponent-dumb(param1, param2); } ... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Helpers and Components

2006-10-20 Thread davide
leo.cacheux wrote: You forgot to call view in the helper : class MyHelper... function dumb(param1, param2){ return $this-view-controller-MyComponent-dumb(param1, param2); } Cool, it works! Now the question is: is this the better way to implement the feature? Otherwise, what

Scaffolding and MS SQL Server Express Edition

2006-10-20 Thread Marko Djukic
Hi! I've only just started using CakePHP and I tried using its scaffolding feature. I've created a simple database with two tables according to the conventions in MS SQL Server Express. I tried scaffolding on one table (table name testcodes, columns: id, code, description, created, modifed).

How to manage large amount of data ?

2006-10-20 Thread leo.cacheux
Hi all, I have a (quite big) request in my Cake application. When I call it one time, it works fine, but I have to call it many times in a loop to fill many arrays, and I get this error : Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 1024 bytes) in

How to keep same session when redirect to sub-domain ?

2006-10-20 Thread Na
Hi all, I have a main site where users login and a lot of sub-site where I want to keep data session of the user when he goto their. So, how to keep same session when redirect to sub-domain ? --~--~-~--~~~---~--~~ You received this message because you are

Re: autocomplete options ?

2006-10-20 Thread Steniskis
Thank again Leo, I'll keep you informed through this thread. Sten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from

Re: List of reference site?

2006-10-20 Thread Elchtest
oops, missed that ... thank you J.F. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to

Re: How to keep same session when redirect to sub-domain ?

2006-10-20 Thread Chris Hartjes
On 10/20/06, Na [EMAIL PROTECTED] wrote: Hi all, I have a main site where users login and a lot of sub-site where I want to keep data session of the user when he goto their. So, how to keep same session when redirect to sub-domain ? As far as I know there are no limitations on sessions

Re: Getting CakePHP installed

2006-10-20 Thread felipenasc
try the simplest thing first: VirtualHost * ServerName localhost DocumentRoot C:\YOUR_PATH\www\cakephp\app /VirtualHost make sure your cake folder is in the same level of your app folder: C:\YOUR_PATH\www\cakephp\ +-- app +-- cake Follow the docs, it is quite simple if you try the

Re: Moving methods to AppModel

2006-10-20 Thread Sonic Baker
Hi Marcelo,Thanks for your input. Taken on board.Cheers,Sonic --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this

Re: How to manage large amount of data ?

2006-10-20 Thread Chris Hartjes
On 10/20/06, leo.cacheux [EMAIL PROTECTED] wrote: Hi all, I have a (quite big) request in my Cake application. When I call it one time, it works fine, but I have to call it many times in a loop to fill many arrays, and I get this error : Fatal error: Allowed memory size of 8388608 bytes

Re: How to keep same session when redirect to sub-domain ?

2006-10-20 Thread leo.cacheux
I might be wrong, but if the session id is stored in a cookie, it can't be used on another subdomain. I suppose that using session id in a GET request should work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: How to manage large amount of data ?

2006-10-20 Thread leo.cacheux
After looking at dbo_source.php, the error is from PHP which cannot allow a too big array. Is it possible to render the view in many times so I would be able to free memory between each request ? --~--~-~--~~~---~--~~ You received this message because you are

Re: How to keep same session when redirect to sub-domain ?

2006-10-20 Thread Chris Hartjes
On 10/20/06, leo.cacheux [EMAIL PROTECTED] wrote: I might be wrong, but if the session id is stored in a cookie, it can't be used on another subdomain. I suppose that using session id in a GET request should work. That's not the case. I used to work for a company that has a huge adult

Re: How to manage large amount of data ?

2006-10-20 Thread Chris Hartjes
On 10/20/06, leo.cacheux [EMAIL PROTECTED] wrote: After looking at dbo_source.php, the error is from PHP which cannot allow a too big array. Is it possible to render the view in many times so I would be able to free memory between each request ? I don't quite follow your thinking here. The

Many Models One View

2006-10-20 Thread Syl
G'day all - What would be the best way to manipulate info from many tables using one view. Here's what I'm working onI've got three types of keywords: Category, Subcategory and Help Categories. All three have their own models, controllers and views. However, my users want to be able to

Re: Many Models One View

2006-10-20 Thread Chris Hartjes
On 10/20/06, Syl [EMAIL PROTECTED] wrote: G'day all - What would be the best way to manipulate info from many tables using one view. Here's what I'm working onI've got three types of keywords: Category, Subcategory and Help Categories. All three have their own models, controllers

Dynamic Menu

2006-10-20 Thread jogo
Hi all! I'm thinking about to create a dynamic menu (user based). The menu has its elements stored in a DB. Each user has his own menu elements. This is my idea: Using XML. User logged in - call DB and retrieve his own menu elements - write XML file - apply XLST to show the menu I don't know

A different way to create ACL database

2006-10-20 Thread x0rster
Hi, I'm trying to create the database tables needed for ACL with the acl.php script I didn't have command line access to my webserver so I tried to do a php script doing $res=shell_exec(php ./cake/scripts/acl.php initdb); echo $res; But nothing happens ! I've tried many other things whithout

Re: A different way to create ACL database

2006-10-20 Thread AD7six
Hi x0rster, You can just run the sql directly: https://trac.cakephp.org/browser/branches/1.1.x.x/app/config/sql/db_acl.sql HTH, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to

Re: How to manage large amount of data ?

2006-10-20 Thread Gil Vidals
This is a PHP error that can be resolved by changing a setting within php.ini. The setting has to be changed to increase the memory or to -1, which means infinite memory. Unfortunately, I don't recall the exact setting. memory_limit = -1 Gil Vidals On 10/20/06, leo.cacheux [EMAIL PROTECTED]

Re: How to manage large amount of data ?

2006-10-20 Thread Chris Hartjes
On 10/20/06, Gil Vidals [EMAIL PROTECTED] wrote: This is a PHP error that can be resolved by changing a setting within php.ini. The setting has to be changed to increase the memory or to -1, which means infinite memory. Unfortunately, I don't recall the exact setting. memory_limit = -1

Re: Many Models One View

2006-10-20 Thread Syl
Hey Chris Thanks for your reply. Could you be a little more specific ? I've read the association stuff in the manual, but it does not speak about having unrelated models using a single controller. Or at least not that I can see - I'm new to cake and php. Are you talking about creating a

Re: Re: How to manage large amount of data ?

2006-10-20 Thread Samuel DeVore
you can also unset the arrays, as you write to the end of the files. The garbage collection should help you. You might need to directly interact with the msysql calls so you can release those connections as well, I'm not sure how long cake holds them, also you might benifit from not using

Re: A different way to create ACL database

2006-10-20 Thread irfan baig
possibly php is not installed to be available via the shell/commandline on your webserver, or to your user On 10/20/06, x0rster [EMAIL PROTECTED] wrote: Thanks you AD7six, I didn't saw the sql file Does anybody knows why I can't get a php cli script working from a shell exec ? A command

Re: A different way to create ACL database

2006-10-20 Thread x0rster
If I do just php I get : X-Powered-By: PHP/4.4.4 Content-type: text/html and I get the same with php cake/scripts/acl.php help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this

Re: Many Models One View

2006-10-20 Thread Chris Hartjes
On 10/20/06, Syl [EMAIL PROTECTED] wrote: Hey Chris Thanks for your reply. Could you be a little more specific ? I've read the association stuff in the manual, but it does not speak about having unrelated models using a single controller. Or at least not that I can see - I'm new to cake

Re: Refactoring Views

2006-10-20 Thread Sonic Baker
Hi Matt,Thank you for your reply.I was just using the forms generated form Bake as an example to illustrate the types of duplication I mean.That meta-framework of yours sounds wonderful. Is it hard on resources? If you weren't using it, how would you answer my questions above?Cheers,Sonic

Re: Refactoring Views

2006-10-20 Thread Matt Adams
Sonic Baker wrote: I was just using the forms generated form Bake as an example to illustrate the types of duplication I mean. That meta-framework of yours sounds wonderful. Is it hard on resources? Not particularly. Running in production mode it takes about 1 second to render each

RE: Refactoring Views

2006-10-20 Thread Christian Winther
To be brief, what I've done is create a meta-framework that works hand-in-hand with Cake (using Cake itself and a small number of external scripts and processes) that is able to generate all of my views for me using a series of reusable elements and helpers. This meta-framework knows when

Re: How to manage large amount of data ?

2006-10-20 Thread leo.cacheux
It works fine when I change the php.ini settings, unfortunately, the software I'm working on will be executed on a mutualised server, and I don't know if this file will be accessible. I tried to use unset to free memory but it didn't worked. Thanks for your help.

setting id to null in active record before doing a save within loops

2006-10-20 Thread Gil Vidals
Why is it necessary, when adding multiple records in a while or for loop to set the active record's id to null??? $this-Model-id = 'null'; $this-Model-save(...) If the active record's id is *not* set to null, only the first record is inserted and the rest simply do an update to the

Re: setting id to null in active record before doing a save within loops

2006-10-20 Thread scott lewis
On 20-Oct-2006, at 14:48, Gil Vidals wrote: Why is it necessary, when adding multiple records in a while or for loop to set the active record's id to null??? $this-Model-id = 'null'; $this-Model-save(...) If the active record's id is *not* set to null, only the first record is

dateTimeOptionTag Select

2006-10-20 Thread Jeff
I'm trying to select a specific date to show up as the default using the dateTimeOptionTag. Does anyone know how to use the selection field in the html helper? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake

Re: dateTimeOptionTag Select

2006-10-20 Thread Jeff
I've tried the 18-12-2006 format.. but I'm only getting the correct month to be selected. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to

Re: dateTimeOptionTag Select

2006-10-20 Thread Darian Anthony Patrick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 -MM-DD hh:mm I believe Jeff. Jeff wrote: I've tried the 18-12-2006 format.. but I'm only getting the correct month to be selected. - -- Darian Anthony Patrick [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2

Re: How to keep same session when redirect to sub-domain ?

2006-10-20 Thread [EMAIL PROTECTED]
Na wrote: Hi all, I have a main site where users login and a lot of sub-site where I want to keep data session of the user when he goto their. So, how to keep same session when redirect to sub-domain ? If you are using php to handle cake sessions you should be able to get around subdomain

Re: How to keep same session when redirect to sub-domain ?

2006-10-20 Thread Jon Bennett
Add your domain prefixed with a . and don't forget to restart your webserver afterwards. eg: hmm, I reckon this can be done with INI_SET, perhaps either directly in the session.php class, or within your app bootstrap.php file: ini_set('session.cookie_domain', ' .foo.com'); hth j -- jon

Flash 8 upload w/ Cake results in corrupted files

2006-10-20 Thread Brad Daily
(PHP 5.1.6, Apache 1.3, Cake 1.1.8.3544) We are in the process of porting an existing PHP app to cake, and have ran into an odd problem with file uploads (for images) using Flash 8. The image appears to upload correctly, to the correct directory, but when you try to open the file, it is

Re: Getting CakePHP installed

2006-10-20 Thread Jamie Fishback
I figured out what was going on with the first part, now I'm getting a whole new set of errors. Here's what I have now: Warning: session_start(): open(C:/InstantRails\tmp\\sess_31689e87ae77a949e7b83d5ad6b0e419, O_RDWR) failed: No such file or directory (2) in

Re: Refactoring Views

2006-10-20 Thread Grant Cox
I'd be interested in seeing it too. Personally I make a _addedit($id) action in my controller, and a _addedit.thtml element (in with the normal view files). These have the common parts of add and edit in them. I'm not sure if this will stay this way once I start serious work on the application

Problem with Helpers inside element

2006-10-20 Thread Ismael S. Kafeltz
I have the same problem with this person here: http://groups.google.com/group/cake-php/browse_thread/thread/1a8220651a9741ca/3c1473208724bdb7?lnk=gstq=helperrnum=21#3c1473208724bdb7 Nobody helped... The problem with helper is within a function, outside is works normally... Even if i try to put