Re: XML output from cake controller/view

2007-04-02 Thread Jeremy Pointer

digital spaghetti wrote:
> Instead of your method, check out this tutorial:
>
> http://bakery.cakephp.org/articles/view/2
>
> Its an old article, but still works perfectly in Cake 1.2
>   
I had already tried that method i.e. created an xml layout with just 
header() and print("?xml but I was still getting the space all that 
example does is move the output from the view to layout+view.
As it happens a new day brought an answer I simply removed the 
 part from the output and problem solved, I'd still like to 
know where the space is coming from though.
> Tane
>
> On 4/2/07, Jeremy Pointer <[EMAIL PROTECTED]> wrote:
>   
>> I'm trying to output an xml document but I seem to be getting a space
>> character just before > receiving the data (not mine) to cough and splutter and die.
>>
>> In my controller I am setting $this->layout=false; and my view is:
>> > header("Content-type:text/xml");
>> print ("");
>> print("");
>> foreach ($rows as $row) print("".$row['table']['field']."");
>> print("");
>> ?>
>>
>> DEBUG is 0 I also tried removing all beforeFilter and beforeRender
>> settings in app_controller and the controller that calls this with no luck.
>>
>> Any ideas why I am getting a space, is there a different/better way to
>> output XML.
>>
>> --
>> */Jeremy Pointer/*
>> [EMAIL PROTECTED] 
>>
>> 
>
> >   


-- 
*/Jeremy Pointer/*
[EMAIL PROTECTED] 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Saving in a loop

2007-04-02 Thread Dr. Tarique Sani

On 4/3/07, behrangsa <[EMAIL PROTECTED]> wrote:
> When I execute the following code, only one item gets inserted into the
> people table:
>
> for ( $counter = 0; $counter <= 4; $counter += 1) {
>  $this->data['Person']['first_name'] = 'First Name ' . $counter;
>  $this->data['Person']['last_name'] = 'Last Name ' . $counter;
>  $this->data['Person']['age'] = 50 + $counter;
>  $this->Person->save($this->data);
>   }

http://groups.google.com/group/cake-php/search?hl=en&group=cake-php&q=saving+in+loop&qt_g=Search+this+group

Do your homework if you don't want your head to be bitten off ;)

Tarique
-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Saving in a loop

2007-04-02 Thread behrangsa


Hi,

When I execute the following code, only one item gets inserted into the
people table:

for ( $counter = 0; $counter <= 4; $counter += 1) {
 $this->data['Person']['first_name'] = 'First Name ' . $counter;
 $this->data['Person']['last_name'] = 'Last Name ' . $counter;
 $this->data['Person']['age'] = 50 + $counter;
 $this->Person->save($this->data); 
  }

Any ideas why? How can I insert 5 items in a loop like above to the
database?

Regards,
Behi
-- 
View this message in context: 
http://www.nabble.com/Saving-in-a-loop-tf3509818.html#a9803735
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



New install - missing controller error

2007-04-02 Thread Dave

So I installed CakePHP on my Macbook Pro in the /Libraries/WebServer/
Document directory.  Its a standard install - no changes in document
structure.  The .htaccess files all seem to be there.  The main page
is rendered nicely and the database config seems just fine as the
output when the browser is pointed to http://localhost is


CakePHP Rapid Development

Your database configuration file is present.

Cake is able to connect to the database.


I followed a couple tutorials that basically gave the same directions
and created a simple users database and added the following files to
the setup:

/app/controllers/users_controller.php



/app/models/user.php




/app/views/newuser.php

New User Account Form
Username:
Password:
Email Address:
First Name:
Last Name:




When I point my browser to http://localhost/users/ (or any similar
URL) I get:


CakePHP Rapid Development
Missing controller

You are seeing this error because controller UsersController could not
be found.

Notice: If you want to customize this error message, create app/views/
errors/missing_controller.thtml.

Fatal: Create the class below in file : app/controllers/
users_controller.php



I checked mod_rewrite and AllowOverride syntax in /etc/httpd/
httpd.conf and have it set properly I believe.  I'd really like to use
the MVC setup to develop a business app but am having a difficult time
getting off the ground...


I am a total cake noob, but have a decent amount of php experience so
feel free to tell me to lrn2cake - just give me a clue?

TIA


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Foreign Keys and Cake Naming Conventions

2007-04-02 Thread [EMAIL PROTECTED]

It's hard to give advice without knowing what sort of a schema you
have in place. Giving a layout would help.


On Apr 2, 10:18 pm, "uk_maul" <[EMAIL PROTECTED]> wrote:
> Here is an example of what I was trying to ask:
>
> many-to-many join tables should be named:
> alphabetically_first_table_plural_alphabetically_second_table_plural
> ie: tags_users
>
> So if my table is joining to 8 other tables, with the 8 foreign keys,
> how do I get the table name? Will it just be the first fk join table
> that I will put in the name and ignore the others?
>
> Thanks
>
> On Apr 2, 7:21 pm, "uk_maul" <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I am new to CakePHP and need some help with the Cake database naming
> > conventions. Our ERD has over a 100 tables (its almost fully
> > normalized). Most tables have one or two foreign key relationships
> > with other tables, so we followed the Cake conventions fine for those
> > and named all the tables in plural and with underscores between the
> > related tables. There are a few tables however that have as many as 6
> > or 8 foreign keys. I would like to know how to follow the Cake naming
> > conventions for those tables and how can we set up the relationships
> > for those tables in the models and how it will impact the automagic
> > database functions that depend on the naming conventions.
>
> > Thanks in advance for help with this.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Foreign Keys and Cake Naming Conventions

2007-04-02 Thread uk_maul

Here is an example of what I was trying to ask:

many-to-many join tables should be named:
alphabetically_first_table_plural_alphabetically_second_table_plural
ie: tags_users

So if my table is joining to 8 other tables, with the 8 foreign keys,
how do I get the table name? Will it just be the first fk join table
that I will put in the name and ignore the others?

Thanks

On Apr 2, 7:21 pm, "uk_maul" <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am new to CakePHP and need some help with the Cake database naming
> conventions. Our ERD has over a 100 tables (its almost fully
> normalized). Most tables have one or two foreign key relationships
> with other tables, so we followed the Cake conventions fine for those
> and named all the tables in plural and with underscores between the
> related tables. There are a few tables however that have as many as 6
> or 8 foreign keys. I would like to know how to follow the Cake naming
> conventions for those tables and how can we set up the relationships
> for those tables in the models and how it will impact the automagic
> database functions that depend on the naming conventions.
>
> Thanks in advance for help with this.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: IE7 Not Updating Ajax Divs

2007-04-02 Thread bernardo

Have you tried with frequency > 0
Just a guess...

On Apr 2, 7:59 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> Well, after searching, I have found a script that you can bookmark to
> debug XHtmlRequests for IE(7).  It shows that there are no requests
> going through.  Wierd.
> Further more, I have downgraded to prototype 1.5 (the one that's
> supposed to work for everything) and nothing.  I have gone to other
> sites that update ajax fine so there has to be an error in the code on
> my side somewhere. Or possibly in Cake's code.  Didn't find anything
> on Trac yet either.
>
> Here is the script in case you're wondering.
>
> http://blog.monstuff.com/archives/000291.html
>
> On Apr 2, 2:45 pm, "Christopher E. Franklin, Sr."
>
> <[EMAIL PROTECTED]> wrote:
> > Hello.
>
> > I am having a small problem where the divs that need to be updated via
> > ajax are not being updated in IE7.  It works fine in FF.
>
> > I have searched this group and have found only one other question like
> > this but, no answers.
>
> > The wierd thing is, when I type something in a field, go to another
> > page and then hit my browser's back button, you can see what is
> > supposed to be in the div.  It's like it is only updating on a page
> > load.
>
> > Anyways, I am using cake 1.1.14.4306, PHP5, Prototype 1.15 and
> > Script.aculo.us 1.7.1
>
> > Here is the code I am using.  Remember, this works fine in FireFox
>
> > // /user/view/register.thtml
>
> > 
> > echo " > for=\"UserUsername\">User Name: > \"userRegisterField\">" . $html->input('User/username', array (
> > 'size' => 30
> > ))."";
> > echo "";
> > echo $html->tagErrorMsg('User/username', 'Username can only contain
> > Letters, Numbers, Underscores(_) and/or Dashes(-).  The username must
> > also between 3-25 characters long.');
> > echo $ajax->observeField('UserUsername', array (
> > 'url' => 'check_registration_form/username/',
> > 'update' => 'userRegisterUsername',
> > 'frequency' => 0,
> > 'loading' =>
> > "document.getElementById('userRegisterUsername').style.display =
> > 'block'",
> > 'loaded' =>
> > "document.getElementById('userRegisterUsername').style.display =
> > 'block'"
> > ));
> > 
>
> > If you would like to see more code, just post here please.
>
> > I will keep searching in the mean-time.  If I find an answer I will
> > post here again for anyone who has this problem in the future.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP + AMFPHP + Flex

2007-04-02 Thread [EMAIL PROTECTED]

gwoo - thanks for your help from before and thanks for this link.

again, i'm unsure the differences between amf0 and amf3, but I am
anxious to learn.

I hope that it will be a rather seamless integration...it seems like
it could be -- again I didn't iron things out, but did have it half
working.

I just know there is limited documentation on CakePHP and Flex ... so
here's to that.



On Apr 2, 12:13 pm, "gwoo" <[EMAIL PROTECTED]> wrote:
> Hi Tom.
>
> I am glad you got your code working with CakeAMFPHP 0.6.0, however,
> now that you fell more comfortable you should move into the present
> and use AMF3 it is much faster and cleaner communication. You can
> learn more about these discussons on the amfphp list and 
> followinghttp://5etdemi.com/blog


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Cant change httpd.conf file

2007-04-02 Thread Edawg

Hi,

  trying to get cakePHP up and running, but having problems with the
layout, it does not seem to render right, and the manual explains that
i have to edit the httpd.conf file, but i dont have access to this
file, its not allowed by my host, so i cant modify LoadModule
rewrite_module libexec/httpd/mod_rewrite.so and AddModule
mod_rewrite.c

What can I do??.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



filtering HABTM data (once more)

2007-04-02 Thread jyrgen

hi all,

in this thread

http://groups.google.com/group/cake-php/browse_thread/thread/f23b1825050ad543/014092749592de70

Andy Dawson gave valuable information for searching HABTM related
models by
creating a dummy model for the HABTM lookup table.

> $constraint['PostsTag.tag_id'] = $tagId; // or pass an array to genereate "IN 
> (1,2,3..)" in the sql.

now here i want fields to be "AND-ed" while  "IN (1,2,3..)" generates
"OR-ed" fields.

i tried this:

$conditions['ArticlesRight']['right_id'] = Array("and" => array(1,2));
with the same result.

and this:

$conditions['ArticlesRight']['right_id'] = Array("and" =>
array("ArticlesRight" => Array("right_id" => 1, "right_id" => 2)));
which doesn't make sense, because the innermost Array has identical
keys.

how do i have to construct the array in order to achieve AND logic ?

thank you,

jyrgen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



data generation

2007-04-02 Thread codecowboy

Hi,

Does anyone know if there are any data generators for MySQL?  I am
looking for a tool that will create fake data in each of my tables for
testing purposes.  The tricky part is creating it in such a way that
referential integrity is enforced.  For instance if one table has a
field that is a foreign key reference to the primary key of another
table, then the program would need to be smart enough to create one
table first, get the primary key value and create the other table
using that primary key value as the value for the field with the
foreign key reference.

Thank you,

Guy


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



mod_rewrite : trailing slash problem

2007-04-02 Thread Wellington Fan

Hello all,

I have an unusual layout of cake, but I believe I actually ahve a
mod_rewrite problem. My app works fine when requesting
'http://server/myfolder/' (tailing slash) but dies wiht a '400 --  bad
request' when i have no trailing slash.

Here are the relavant files:

DOCROOT/myfolder/.htaccess:

RewriteEngine on
RewriteRule ^$  webroot/[L]
RewriteRule (.*) webroot/$1 [L]
 

DOCROOT/myfolder/webroot/.htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]



And here's the mod_rewrite logs (level 2 - -anymore seemd like overkill)

REQUEST to '/myfolder' (DOES NOT WORK -- error 400 Bad Request):
[rid#8189034/initial] (2) init rewrite engine with requested uri
/myfolder
[rid#8189034/initial] (1) pass through /myfolder
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] rewrite
/home/DOCROOT/myfolder -> webroot//home/DOCROOT/myfolder


REQUEST to '/myfolder/' (Works! Yay!):
[rid#8189034/initial] (2) init rewrite engine with requested uri /myfolder/
[rid#8189034/initial] (1) pass through /myfolder/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] add
path-info postfix: /home/DOCROOT/myfolder -> /home/DOCROOT/myfolder/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] strip
per-dir prefix: /home/DOCROOT/myfolder/ ->
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] applying
pattern '^$' to uri ''
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] rewrite  -> webroot/
[rid#8189034/initial] (3) [per-dir /home/DOCROOT/myfolder/] add
per-dir prefix: webroot/ -> /home/DOCROOT/myfolder/webroot/
[rid#8189034/initial] (2) [per-dir /home/DOCROOT/myfolder/] strip
document_root prefix: /home/DOCROOT/myfolder/webroot/ ->
/myfolder/webroot/
[rid#8189034/initial] (1) [per-dir /home/DOCROOT/myfolder/] internal
redirect with /myfolder/webroot/ [INTERNAL REDIRECT]


Somehow I can not get my brain around how to redirecct the user on a
'myfolder' request to 'myfolder/'

I've tried lots of variants of:

RewriteRule ^$ /myfolder/[R,L]

and

RewriteRule ^myfolder$ /myfolder/[R,L]

RewriteBase /myfolder
RewriteRule ^$ /myfolder/[R,L]

etc., but have not hit upon the solution.

Any help?

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: IE7 Not Updating Ajax Divs

2007-04-02 Thread Christopher E. Franklin, Sr.

Well, after searching, I have found a script that you can bookmark to
debug XHtmlRequests for IE(7).  It shows that there are no requests
going through.  Wierd.
Further more, I have downgraded to prototype 1.5 (the one that's
supposed to work for everything) and nothing.  I have gone to other
sites that update ajax fine so there has to be an error in the code on
my side somewhere. Or possibly in Cake's code.  Didn't find anything
on Trac yet either.

Here is the script in case you're wondering.

http://blog.monstuff.com/archives/000291.html


On Apr 2, 2:45 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> Hello.
>
> I am having a small problem where the divs that need to be updated via
> ajax are not being updated in IE7.  It works fine in FF.
>
> I have searched this group and have found only one other question like
> this but, no answers.
>
> The wierd thing is, when I type something in a field, go to another
> page and then hit my browser's back button, you can see what is
> supposed to be in the div.  It's like it is only updating on a page
> load.
>
> Anyways, I am using cake 1.1.14.4306, PHP5, Prototype 1.15 and
> Script.aculo.us 1.7.1
>
> Here is the code I am using.  Remember, this works fine in FireFox
>
> // /user/view/register.thtml
>
> 
> echo " for=\"UserUsername\">User Name: \"userRegisterField\">" . $html->input('User/username', array (
> 'size' => 30
> ))."";
> echo "";
> echo $html->tagErrorMsg('User/username', 'Username can only contain
> Letters, Numbers, Underscores(_) and/or Dashes(-).  The username must
> also between 3-25 characters long.');
> echo $ajax->observeField('UserUsername', array (
> 'url' => 'check_registration_form/username/',
> 'update' => 'userRegisterUsername',
> 'frequency' => 0,
> 'loading' =>
> "document.getElementById('userRegisterUsername').style.display =
> 'block'",
> 'loaded' =>
> "document.getElementById('userRegisterUsername').style.display =
> 'block'"
> ));
> 
>
> If you would like to see more code, just post here please.
>
> I will keep searching in the mean-time.  If I find an answer I will
> post here again for anyone who has this problem in the future.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: update with save

2007-04-02 Thread rtconner

Usually I do it in my controller..

$this->Post->id = $id;

But yeah, that's about it, set the id first.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



IE7 Not Updating Ajax Divs

2007-04-02 Thread Christopher E. Franklin, Sr.

Hello.

I am having a small problem where the divs that need to be updated via
ajax are not being updated in IE7.  It works fine in FF.

I have searched this group and have found only one other question like
this but, no answers.

The wierd thing is, when I type something in a field, go to another
page and then hit my browser's back button, you can see what is
supposed to be in the div.  It's like it is only updating on a page
load.

Anyways, I am using cake 1.1.14.4306, PHP5, Prototype 1.15 and
Script.aculo.us 1.7.1

Here is the code I am using.  Remember, this works fine in FireFox

// /user/view/register.thtml


echo "User Name:" . $html->input('User/username', array (
'size' => 30
))."";
echo "";
echo $html->tagErrorMsg('User/username', 'Username can only contain
Letters, Numbers, Underscores(_) and/or Dashes(-).  The username must
also between 3-25 characters long.');
echo $ajax->observeField('UserUsername', array (
'url' => 'check_registration_form/username/',
'update' => 'userRegisterUsername',
'frequency' => 0,
'loading' =>
"document.getElementById('userRegisterUsername').style.display =
'block'",
'loaded' =>
"document.getElementById('userRegisterUsername').style.display =
'block'"
));


If you would like to see more code, just post here please.

I will keep searching in the mean-time.  If I find an answer I will
post here again for anyone who has this problem in the future.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: one to one relationship (ADD)

2007-04-02 Thread dima

Christian,

If you're worried about integrity, you may have to resort to using
transactions in your db.
Consider the InnoDB engine if you're using MySQL.

Also, you would need to implement begin(), commit() and rollback()
function for your model:
http://bakery.cakephp.org/articles/view/228

You should not encounter issues with using another person's inserted
id since the last_insert_id() takes the connection as a parameter and
a single connection cannot be used by two users simultaneously
(provided you're not doing using a persistent environment connection,
which you shouldn't do in the first place).

Finally, you can reserve an new id for each request to /persons/add.
This way, you are sure that each call to the form generates a unique
id. However, this is a complex solution which i know little about.

Hope this helps.

Dim


On Mar 28, 12:48 pm, "christianandradet" <[EMAIL PROTECTED]>
wrote:
> but if i do it the way you say maybe when two users want to insert a
> person at the same time,  is it the posibility that the judge gets the
> code of another person??, or maybe the tables are locked when
> inserting i dont know??? or maybe is there another way to do it??
> Please help me thanks
>
> > in your afterSave() of the Person model you can do something along
> > these lines:
>
> > if (isset($this->Judge) && !empty($this->data['Judge']))
> > {
> >$this->data['Judge']['person_id'] = $this->id;
> >$this->Judge->save($this->data);
>
> > }
>
> > Dimitry Z.
>
> > On Mar 26, 12:05 pm, "christianandradet" <[EMAIL PROTECTED]>
> > wrote:
>
> > > hi,
> > > i am traing to insert data with a one to one relationship, i am
> > > working with this tables:
> > >  CREATE TABLE 'people` (
> > >   `id` smallint(5) unsigned NOT NULL auto_increment,
> > >   `lastname` varchar(40) NOT NULL,
> > >   `firstname` varchar(40) NOT NULL,
> > >   PRIMARY KEY  (`id`) )
>
> > >  CREATE TABLE `judges` (
> > >   `person_id` smallint(5) unsigned NOT NULL,
> > >   `location_id` smallint(5) unsigned NOT NULL,
> > >   `flavor` enum('USDJ','USMJ') default 'USDJ' )
>
> > > in the people controller:
> > >  var $hasOne = array('judge' => array('className'=> 'judge',
> > >   'conditions'   => '',
> > >   'order'=> '',
> > >   'dependent'=>  true,
> > >   'foreignKey'   => 
> > > 'person_id'
> > > )
> > >   );
>
> > > but i don't know how to insert data in both tables at the same time,
> > > how do i configure the add method??? (i can list both tables)- Ocultar 
> > > texto de la cita -
>
> > - Mostrar texto de la cita -


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



$ajax->observeForm Updating Multiple Divs Question

2007-04-02 Thread Christopher E. Franklin, Sr.

Hello fellow Bakers,

I am writing a registration form that updates each div that
corresponds with it's respective field using observeField.

The problem I am finding is, that I am copying and pasting a ton of
code for each observeField so, when I looked at the API again, there
is a function called observeForm that sends all elements at once.

Now, my question is, if I use observeForm, can it update multiple divs
or just one?

Say I have a username field and a div id=username, a password field
and a div id=password.  I want it to update both divs.

I have tried to take out the update option in the observeField
function and it doesn't update anything despite having $ajax-
>div('username');
echo "here";
$ajax->divEnd('username');
in the view template.

Any leads or ideas would be helpful.  I am using cake 1.1.14.4603
which is the latest nightly build.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: XML output from cake controller/view

2007-04-02 Thread digital spaghetti

Instead of your method, check out this tutorial:

http://bakery.cakephp.org/articles/view/2

Its an old article, but still works perfectly in Cake 1.2

Tane

On 4/2/07, Jeremy Pointer <[EMAIL PROTECTED]> wrote:
>
> I'm trying to output an xml document but I seem to be getting a space
> character just before  receiving the data (not mine) to cough and splutter and die.
>
> In my controller I am setting $this->layout=false; and my view is:
>  header("Content-type:text/xml");
> print ("");
> print("");
> foreach ($rows as $row) print("".$row['table']['field']."");
> print("");
> ?>
>
> DEBUG is 0 I also tried removing all beforeFilter and beforeRender
> settings in app_controller and the controller that calls this with no luck.
>
> Any ideas why I am getting a space, is there a different/better way to
> output XML.
>
> --
> */Jeremy Pointer/*
> [EMAIL PROTECTED] 
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Foreign Keys and Cake Naming Conventions

2007-04-02 Thread [EMAIL PROTECTED]

http://manual.cakephp.org/appendix/conventions

Foreign keys should not affect the naming of a table. Nor would the
number of keys affect the naming of the table or of the fields.

Foreign keys, ideally, should be the name of the model + underscore +
'id'
So multiple foreign keys should not affect each other.

Maybe you forgot to tell us about some part of the scenario, but so
far everything you have stated is pretty normal, and very well covered
in the manual.

regards,
cook


On Apr 2, 11:51 am, "gwoo" <[EMAIL PROTECTED]> wrote:
> tables = plural (posts)
> jointables = alphabetic, (posts_tags)
> foreignKey = singular _id (post_id)
> model = singular (Post)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



XML output from cake controller/view

2007-04-02 Thread Jeremy Pointer

I'm trying to output an xml document but I seem to be getting a space 
character just before layout=false; and my view is:
");
print("");
foreach ($rows as $row) print("".$row['table']['field']."");
print("");
?>

DEBUG is 0 I also tried removing all beforeFilter and beforeRender 
settings in app_controller and the controller that calls this with no luck.

Any ideas why I am getting a space, is there a different/better way to 
output XML.

-- 
*/Jeremy Pointer/*
[EMAIL PROTECTED] 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Use off-the-shelf (bloated) open source product, or develop with cake?

2007-04-02 Thread digital spaghetti

I totally agree.  At my company I am lucky to have a lot of creative
freedom with my project.  When I took over, they already had a custom
CMS built on ColdFusion which is buggy as hell, and some sites are
just plain HTML docs that I have to manually update.

At first, I started down the Drupal route, but quickly encountered
issues with modules that I required not being finished, or coded and
documented enough to fix.  I was relying upon other people to finish
their work.

On the other hand, with CakePHP it is going to take me longer to
create our CMS (plus the wasted time on Drupal) however, I can taylor
it to our needs and requirements, as and when needed.  Plus I know the
code like the back of my hand now so I know where to look when there
is a bug.

The good thing is its also similar in some ways to the current CMS so
there is no need to fully retrain other staff in its use, and it can
be used consistantly over all the sites I manage (currently 7) so I
can apply bug fixes and new features easily.

Tane


On 4/2/07, mparic <[EMAIL PROTECTED]> wrote:
>
> It shouldn't be about "bloat" vs. "lean"; it's about your business
> model and what value are you delivering to your clients. If you are
> providing stand-alone applications like a CMS or bulletin board, then
> use Drupal or phpBB; you are not delivering any additional value by
> making a custom application with Cake but are charging much more. On
> the other hand, you can develop a program that includes just the CMS
> functionality they need but also provides other automated tools (auto
> email those documents to an online customer managment system) that
> could not be provided with an off-the-shelf solution. That way your
> client has fewer programs to learn (and you have to train/support) and
> gets a solution that's tailored to them, providing real value and
> justifying the larger cost of a custom solution.
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: update with save

2007-04-02 Thread digital spaghetti

It's actually very easy.  You can use the exact same form view as your
add method, however you need to make sure that this id of the data is
included.  For example, if its.a post do this:

create('Post'));?>
input('id'));?>

Cakephp will now recognbise this is an edit form and not an add form.

Tane


On 4/2/07, christianandradet <[EMAIL PROTECTED]> wrote:
>
> hi, how do i tell cakephp that i want to make an update not an insert,
> could you explain me the difference please. I do not know how this
> works.
> Thanks
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



update with save

2007-04-02 Thread christianandradet

hi, how do i tell cakephp that i want to make an update not an insert,
could you explain me the difference please. I do not know how this
works.
Thanks


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Data not showing up.

2007-04-02 Thread Danielle Tilley





Thank-you that fixed my problem.  

Mandy wrote:

  Danielle -

Assuming that debug is set to >=1 on your dev environment and =0 on
production and you facing issues on prod after making the db change, I
would do the following -
Delete all the model cache. When you make a DB change, send it to
production but debug is set to 0, it happened to me that the table
definitions were not loaded automatically. So, I deleted the model
cache and it worked fine.

Give it a shot.

Thanks,
Mandy.
http://mandysingh.blogspot.com/

On Apr 2, 12:24 pm, Danielle Tilley <[EMAIL PROTECTED]>
wrote:
  
  
I have run into a strange problem.

I have data in a database table which appears correctly when debug is
set to 1 or higher but disappears when debug is set to 0.  (Making the
problem very hard to track down)

The only thing i did that may be affecting this is I modified the table
the model is using via an Alter Table command.

Any Ideas what is going on.  All of the rest of my models are working
correctly.

I am using
CAKE 1.1.10.3825
MySQL 4.1.19
php 4.3.1

Thanks
Danielle

  
  



  



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]  For more options, visit this group at http://groups.google.com/group/cake-php?hl=en  -~--~~~~--~~--~--~---





Re: bake problem

2007-04-02 Thread gwoo

also, make sure you have the latest nightly. There was a bug in the
release.
@Ron
yeah there is a new version being worked on and we will try to do
better at catching user errors.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



bake patch for 1.2's validations

2007-04-02 Thread R. Rajesh Jeba Anbiah

Just tried myself for the 1.2's new validation stuffs and thought of
branching it, but couldn't and so posting here. Also, uploaded at


@to-do: Output the validation rules to form tags' classes like  possibly in JSON (?) so that unobtrusive JavaScript
validations would be easier (?)



Index: libs/model/model.php

===

--- libs/model/model.php(revision 4738)

+++ libs/model/model.php(working copy)

@@ -1685,6 +1685,9 @@

'rule' => 'blank',
'on' => null
), $validator);
+   if (isset($validator[0]['message'])) {  //weird fix
+   $validator['message'] = 
$validator[0]['message'];
+   }

if (empty($validator['on']) || ($validator['on'] == 
'create' && !
$this->exists()) || ($validator['on'] == 'update' && $this->exists()))
{
if (empty($data[$fieldName]) && 
$validator['allowEmpty'] ==
false) {
@@ -2095,4 +2098,4 @@

Overloadable::overload('Model');
 }

-?>

\ No newline at end of file

+?>
Index: scripts/bake.php

===

--- scripts/bake.php(revision 4738)

+++ scripts/bake.php(working copy)

@@ -438,8 +438,19 @@

if (array_search($useTable, $this->__tables) !== false &&
(low($wannaDoValidation) == 'y' || low($wannaDoValidation) == 'yes'))
{
foreach($modelFields as $field) {
$this->stdout('');
+
$prompt = 'Name: ' . $field['name'] . "\n";
$prompt .= 'Type: ' . $field['type'] . "\n";
+   $prompt .= 'Is allow empty (optional)? '."\n";
+   if($field['null'] == 1 || $field['name'] == 
$primaryKey ||
$field['name'] == 'created' || $field['name'] == 'modified') {
+   $allowEmpty = $this->getInput($prompt, 
array('y','n'), 'y');
+   } else {
+   $allowEmpty = $this->getInput($prompt, 
array('y','n'), 'n');
+   }
+   $allowEmpty = (low($allowEmpty)=='y'); //force 
to bool
+
+   $prompt = 'Name: ' . $field['name'] . "\n";
+   $prompt .= 'Type: ' . $field['type'] . "\n";
$prompt .=
'---'."\n";
$prompt .= 'Please select one of the following 
validation
options:'."\n";
$prompt .=
'---'."\n";
@@ -448,10 +459,51 @@

$prompt .= "3- VALID_NUMBER\n";
$prompt .= "4- VALID_YEAR\n";
$prompt .= "5- Do not do any validation on this 
field.\n\n";
+   $prompt .= "6- alphaNumeric\n";
+   $prompt .= "7- between n1, n2\n";
+   $prompt .= "8- blank (space, tab, and other 
whitespace)\n";
+   $prompt .= "9- cc\n";
+   $prompt .= "10- comparison\n";
+   $prompt .= "11- date\n";
+   $prompt .= "12- decimal\n";
+   $prompt .= "13- email\n";
+   $prompt .= "14- ip\n";
+   $prompt .= "15- minLength\n";
+   $prompt .= "16- maxLength\n";
+   $prompt .= "17- money\n";
+   $prompt .= "18- numeric\n";
+   $prompt .= "19- phone\n";
+   $prompt .= "20- postal\n";
+   $prompt .= "21- ssn\n";
+   $prompt .= "22- url\n";
$prompt .= "... or enter in a valid regex 
validation string.\n
\n";

+   //auto detect rules..
if($field['null'] == 1 || $field['name'] == 
$primaryKey ||
$field['name'] == 'created' || $field['name'] == 'modified') {
$validation = $this->getInput($prompt, 
null, '5');
+   } else if (strpos(low($field['name']), 
'username')!==false) { //
PHP 4 dirty for stripos
+   $validation = $this->getInput($prompt, 
null, '6'); //
alphaNumeric
+   } else if (strpos(low($field['name']), 
'cc')!==false ||
+  

Re: Use off-the-shelf (bloated) open source product, or develop with cake?

2007-04-02 Thread mparic

It shouldn't be about "bloat" vs. "lean"; it's about your business
model and what value are you delivering to your clients. If you are
providing stand-alone applications like a CMS or bulletin board, then
use Drupal or phpBB; you are not delivering any additional value by
making a custom application with Cake but are charging much more. On
the other hand, you can develop a program that includes just the CMS
functionality they need but also provides other automated tools (auto
email those documents to an online customer managment system) that
could not be provided with an off-the-shelf solution. That way your
client has fewer programs to learn (and you have to train/support) and
gets a solution that's tailored to them, providing real value and
justifying the larger cost of a custom solution.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: FLEX 2 Integration Issues

2007-04-02 Thread gwoo

Again, Tom, I am happy that it works for you, but promoting the "old"
way of doing things is not what we do around here. We need to focus on
what the best technology is and not offer up solutions that may not be
the "best". The best is the latest, most relevant technology. You can
easily get AMF3 going with the svn version of cakeamfphp. Please, give
it a try and update your tutorial.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP + AMFPHP + Flex

2007-04-02 Thread gwoo

Hi Tom.

I am glad you got your code working with CakeAMFPHP 0.6.0, however,
now that you fell more comfortable you should move into the present
and use AMF3 it is much faster and cleaner communication. You can
learn more about these discussons on the amfphp list and following
http://5etdemi.com/blog


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Foreign Keys and Cake Naming Conventions

2007-04-02 Thread gwoo

tables = plural (posts)
jointables = alphabetic, (posts_tags)
foreignKey = singular _id (post_id)
model = singular (Post)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Installing CakePHP on Windows

2007-04-02 Thread behrangsa


Hi,

I figured out what was causing the error: A misplaced .htaccess file. Now
everything works fine.

Regards,
Behi


Ronald Chaplin wrote:
> 
> Hello,
> 
> I use a downloadable solution called WAMP. It is a self extracting package
> that installs Apache PHP5 Mysql4 and some nice tools. As far as I can tell
> from your listing, you should connect to port 80, not 8080. Do you have
> another service running besides Apache like IIS that would be taking
> control
> of port 80? I would highly suggest using WAMP
> http://www.wampserver.com/en/
> 
> I also put each cake project I'm working on in a separate folder as this
> is
> the simplest.
> 
> On 4/1/07, Behi <[EMAIL PROTECTED]> wrote:
>>
>>
>> Hi all,
>>
>> I've installed Apache 2.0.59 and PHP 5.2.1 successfully on Windows.
>> I've extracted Cake 1.1.13 to the htdocs directory. But whenever I
>> point my browser to http://localhost:8080/cake/ instead of seeing
>> Cake's default homepage, I see the directory listing. Any ideas what's
>> probably wrong with my configuration? The contents of my httpd.conf
>> file is attached to the end of this post.
>>
>> Thanks in advance,
>> Behi
>>
>> (Note: I am an absolute Apache/PHP newbie!)
>>
>> #
>> # Based upon the NCSA server configuration files originally by Rob
>> McCool.
>> #
>> # This is the main Apache server configuration file.  It contains the
>> # configuration directives that give the server its instructions.
>> # See http://httpd.apache.org/docs/2.0/> for detailed information
>> about
>> # the directives.
>> #
>> # Do NOT simply read the instructions in here without understanding
>> # what they do.  They're here only as hints or reminders.  If you are
>> unsure
>> # consult the online docs. You have been warned.
>> #
>> # The configuration directives are grouped into three basic sections:
>> #  1. Directives that control the operation of the Apache server
>> process as a
>> # whole (the 'global environment').
>> #  2. Directives that define the parameters of the 'main' or 'default'
>> server,
>> # which responds to requests that aren't handled by a virtual
>> host.
>> # These directives also provide default values for the settings
>> # of all virtual hosts.
>> #  3. Settings for virtual hosts, which allow Web requests to be sent
>> to
>> # different IP addresses or hostnames and have them handled by the
>> # same Apache server process.
>> #
>> # Configuration and logfile names: If the filenames you specify for
>> many
>> # of the server's control files begin with "/" (or "drive:/" for
>> Win32), the
>> # server will use that explicit path.  If the filenames do *not* begin
>> # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
>> # with ServerRoot set to "C:/Apache/Apache2" will be interpreted by
>> the
>> # server as "C:/Apache/Apache2/logs/foo.log".
>> #
>> # NOTE: Where filenames are specified, you must use forward slashes
>> # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
>> # If a drive letter is omitted, the drive on which Apache.exe is
>> located
>> # will be used by default.  It is recommended that you always supply
>> # an explicit drive letter in absolute paths, however, to avoid
>> # confusion.
>> #
>>
>> ### Section 1: Global Environment
>> #
>> # The directives in this section affect the overall operation of
>> Apache,
>> # such as the number of concurrent requests it can handle or where it
>> # can find its configuration files.
>> #
>>
>> #
>> # ServerRoot: The top of the directory tree under which the server's
>> # configuration, error, and log files are kept.
>> #
>> # NOTE!  If you intend to place this on an NFS (or otherwise network)
>> # mounted filesystem then please read the LockFile documentation
>> (available
>> # at http://httpd.apache.org/docs/2.0/mod/
>> mpm_common.html#lockfile>);
>> # you will save yourself a lot of trouble.
>> #
>> # Do NOT add a slash at the end of the directory path.
>> #
>> ServerRoot "C:/Apache/Apache2"
>>
>> #
>> # ScoreBoardFile: File used to store internal server process
>> information.
>> # If unspecified (the default), the scoreboard will be stored in an
>> # anonymous shared memory segment, and will be unavailable to third-
>> party
>> # applications.
>> # If specified, ensure that no two invocations of Apache share the
>> same
>> # scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
>> #
>> #ScoreBoardFile logs/apache_runtime_status
>>
>> #
>> # PidFile: The file in which the server should record its process
>> # identification number when it starts.
>> #
>> PidFile logs/httpd.pid
>>
>> #
>> # Timeout: The number of seconds before receives and sends time out.
>> #
>> Timeout 300
>>
>> #
>> # KeepAlive: Whether or not to allow persistent connections (more than
>> # one request per connection). Set to "Off" to deactivate.
>> #
>> KeepAlive On
>>
>> #
>> # MaxKeepAliveRequests: The maximum number of requests to allow
>> # during a persistent connection. Set to 0 to allow an 

Foreign Keys and Cake Naming Conventions

2007-04-02 Thread uk_maul

Hi

I am new to CakePHP and need some help with the Cake database naming
conventions. Our ERD has over a 100 tables (its almost fully
normalized). Most tables have one or two foreign key relationships
with other tables, so we followed the Cake conventions fine for those
and named all the tables in plural and with underscores between the
related tables. There are a few tables however that have as many as 6
or 8 foreign keys. I would like to know how to follow the Cake naming
conventions for those tables and how can we set up the relationships
for those tables in the models and how it will impact the automagic
database functions that depend on the naming conventions.

Thanks in advance for help with this.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: window.onload and ajax

2007-04-02 Thread gerbenzomp

I believe it's the same problem as described about TinyMCE:
http://bakery.cakephp.org/articles/view/140 -> "In response to point
2"

But I can't see that solution fit with my example, because it's
TinyMCE-specific.

On 2 apr, 15:10, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
> > does it help you ?
> >http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...
>
> I'm not sure... I don't think I'm looking for a remote call on onload
> of the entire page, I just need a way to initialize the uploader after
> a user presses an $ajax->link.
>
> So I have a /posts/index/, and if a user presses the $ajax->link, a
> div on the page is updated to display the uploader on that page (/
> files/upload/).
>
> The javascript configuration of the uploader is by default triggered
> by window.onload, but because this time it's an ajax call, there is no
> window.onload behaviour I can use to initialize the uploader.
>
> I've tried Mandy's example, but for some reason the function in
> init.js isn't triggered.
>
> When I do something like this:
> 
> alert('loaded');
> 
>
> I DO see the alert after the ajax call is done.
>
> Strange...
>
> On 2 apr, 12:29, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> > does it help you ?
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...
>
> > On Apr 2, 7:11 am, "Mandy" <[EMAIL PROTECTED]> wrote:
>
> > > You can just give a call to the function at the bottom of your ajax'd
> > > response like this -
>
> > > 
> > > init_uploader();
> > > 
>
> > > Just make sure evalScripts is set to 'true' while doing the ajax call
> > > - it is used for evaluating the script received in an ajax response.
>
> > > Thanks,
> > > Mandy.http://mandysingh.blogspot.com
>
> > > On Apr 1, 8:03 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > > > I just built my own swfupload script using the new article in the
> > > > bakery:
>
> > > >http://bakery.cakephp.org/articles/view/296
>
> > > > It's a great article, and the uploader works fantastically!
> > > > Everybody's talking about "ajax upload", but this is the first good
> > > > implementation I've seen.
>
> > > > One question though:
>
> > > > The uploader is in my posts/add/ view, which I load into another view
> > > > through ajax (only after the user presses the "add" button). In the
> > > > article the uploader is initialized at window.onload using this line:
>
> > > > window.onload = init_uploader;
>
> > > > But of course this doesn't work with ajax.
>
> > > > How can I initialize the uploader once the ajax-call is made?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: window.onload and ajax

2007-04-02 Thread gerbenzomp

> does it help you ?
> http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...

I'm not sure... I don't think I'm looking for a remote call on onload
of the entire page, I just need a way to initialize the uploader after
a user presses an $ajax->link.

So I have a /posts/index/, and if a user presses the $ajax->link, a
div on the page is updated to display the uploader on that page (/
files/upload/).

The javascript configuration of the uploader is by default triggered
by window.onload, but because this time it's an ajax call, there is no
window.onload behaviour I can use to initialize the uploader.

I've tried Mandy's example, but for some reason the function in
init.js isn't triggered.

When I do something like this:

alert('loaded');


I DO see the alert after the ajax call is done.

Strange...



On 2 apr, 12:29, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> does it help you ?
>
> http://groups.google.com/group/cake-php/browse_thread/thread/1742022f...
>
> On Apr 2, 7:11 am, "Mandy" <[EMAIL PROTECTED]> wrote:
>
> > You can just give a call to the function at the bottom of your ajax'd
> > response like this -
>
> > 
> > init_uploader();
> > 
>
> > Just make sure evalScripts is set to 'true' while doing the ajax call
> > - it is used for evaluating the script received in an ajax response.
>
> > Thanks,
> > Mandy.http://mandysingh.blogspot.com
>
> > On Apr 1, 8:03 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > > I just built my own swfupload script using the new article in the
> > > bakery:
>
> > >http://bakery.cakephp.org/articles/view/296
>
> > > It's a great article, and the uploader works fantastically!
> > > Everybody's talking about "ajax upload", but this is the first good
> > > implementation I've seen.
>
> > > One question though:
>
> > > The uploader is in my posts/add/ view, which I load into another view
> > > through ajax (only after the user presses the "add" button). In the
> > > article the uploader is initialized at window.onload using this line:
>
> > > window.onload = init_uploader;
>
> > > But of course this doesn't work with ajax.
>
> > > How can I initialize the uploader once the ajax-call is made?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bake problem

2007-04-02 Thread Ronald Chaplin
I have also found that if you don't use the naming conventions properly,
that bake.php will decide that it's broken. Make sure that the controller
you are trying to build views for uses the proper naming conventions. This
has made all the difference for me on a few occasions.

On a side note, this one of the things that I think should be changed in
future bake releases. Instead of failing, simply post an error message and
tell what the problem is.

On 4/2/07, John <[EMAIL PROTECTED]> wrote:
>
>
> Hi
>
> Are you sure you've baked all the controllers and models yet? it could
> be that the view is trying to refer to something that doesn't exist -
> that's my experience of where a lot of bake errors come from.
>
> For best results, I've found you need to bake models, then
> controllers, then views last, but that if I'm doing something
> complicated I've often needed to give it a few goes - good job it's
> fast!
>
> On Apr 1, 9:49 pm, "christianandradet" <[EMAIL PROTECTED]>
> wrote:
> > hi i'am trying to generate my application with "cakephp bake", i can
> > generate models and controllers but when i try to generate a view this
> > error message apears, and i do not know to fix it.
> >
> > Fatal error: Class 'Controller' not found in C:\www\cake\cake
> > \app_controller.php  on line 40
> >
> > How do i fix it??? please help!! Thanks
>
>
> >
>


-- 
Thanks,
Ron Chaplin
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
T73 Software & Design
www.t73-softdesign.com
We'll make all of your wildest
e-Commerce dreams come true!

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp

> One thing that might be relevant and becomes interesting in 1.2 is the
> ability to cache elements (which I alluded to covertly in my previous
> message); so instead of putting effort into the component/controller
> side of things, you /could/ put requestAction or other logic in your
> element and cache the result.

If I understand you correctly, this means in 1.2 using requestAction
within elements won't affect loading times so dramatically? That's
good news!

But it is probably still good practice to keep our systems light ;)

One more question about the mini-contollers method in combination with
plugins:

I've put my component in:

app/plugins/plugin_name/controllers/components/component_name.php

The model I want to load from the component resides in plugins/models/
model_name.php but has a different name than the main plugin.

When I use loadmodel('model_name'); Cake doesn't find the model I'm
looking for, and when I use loadPluginModels('model_name'); it seems
to find the plugin's app_model, not the model in the "models" folder
(which has a different name from the plugin's app_model, because I
want to be able to have several models in one plugin folder).

How can I acces that model from within the component?

thx for the great job you did on the mini-contollers, I really use
them a lot!

Gerben.

On 2 apr, 14:01, "AD7six" <[EMAIL PROTECTED]> wrote:
> On Apr 2, 1:40 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > The problem seemed to be that I cannot pass the variable $this->name
> > through requestaction.
>
> It would probably get overwritten if you put it in the params as
> 'name', but you could have passed it either
>
> in the url
> echo $this->requestAction ('/url/stuff/camefrom:'.$this->name.'.'.
> $this->action..
>
> or as a a differently named parameter.
> echo $this->requestAction ('/url/stuff', array('camefrom'=>'.$this-
>
> >name.'.'.$this->action..
> > So that's another reason (apart from loading
> > times) to use your 'mini-controllers' approach in this case. Thnx,
> > it's working now!
>
> Cool.
>
>
>
> > Is your mini-controllers method ever going to be a standard part of
> > Cake? Because if requestAction is so heavy this is a great workaround!
>
> I wouldn't expect so, it's not really adding to cake but using it.
> Also I don't know if it duplicates something that is planned or
> already present. But who knows.
>
> One thing that might be relevant and becomes interesting in 1.2 is the
> ability to cache elements (which I alluded to covertly in my previous
> message); so instead of putting effort into the component/controller
> side of things, you /could/ put requestAction or other logic in your
> element and cache the result.
> it works like this echo $this->element('elementname',array('cache'=>'1
> week',other=>sfuff,if=>necessary));
>
> Anyway, glad you found a solution,
>
> cheers,
>
> AD


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling set to "database"

2007-04-02 Thread jyrgen

thank you majna !!

this solved the problem, finally.

after i issued your settings all old session entries have
been deleted.
after that i switched back to a 1% probability, should be ok.

i would suggest to include the gc_divisor setting into the cake
session lib, in order to get equal results on different machines.

> ini_set("session.gc_divisor",100);

jyrgen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determine current action using different method than $this->name

2007-04-02 Thread AD7six



On Apr 2, 1:40 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
> The problem seemed to be that I cannot pass the variable $this->name
> through requestaction.

It would probably get overwritten if you put it in the params as
'name', but you could have passed it either

in the url
echo $this->requestAction ('/url/stuff/camefrom:'.$this->name.'.'.
$this->action..

or as a a differently named parameter.
echo $this->requestAction ('/url/stuff', array('camefrom'=>'.$this-
>name.'.'.$this->action..


> So that's another reason (apart from loading
> times) to use your 'mini-controllers' approach in this case. Thnx,
> it's working now!

Cool.

>
> Is your mini-controllers method ever going to be a standard part of
> Cake? Because if requestAction is so heavy this is a great workaround!

I wouldn't expect so, it's not really adding to cake but using it.
Also I don't know if it duplicates something that is planned or
already present. But who knows.

One thing that might be relevant and becomes interesting in 1.2 is the
ability to cache elements (which I alluded to covertly in my previous
message); so instead of putting effort into the component/controller
side of things, you /could/ put requestAction or other logic in your
element and cache the result.
it works like this echo $this->element('elementname',array('cache'=>'1
week',other=>sfuff,if=>necessary));

Anyway, glad you found a solution,

cheers,

AD


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp

The problem seemed to be that I cannot pass the variable $this->name
through requestaction. So that's another reason (apart from loading
times) to use your 'mini-controllers' approach in this case. Thnx,
it's working now!

Is your mini-controllers method ever going to be a standard part of
Cake? Because if requestAction is so heavy this is a great workaround!



On 2 apr, 12:30, "AD7six" <[EMAIL PROTECTED]> wrote:
> On Apr 2, 12:19 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > I tried both your examples, but the problem seems to be that I use the
> > requestaction within default.thtml, and it seems there's no data
> > available about the parent action...
>
> > Is there some other way, because now I use the $_GET['url'] method,
> > which is just very dirty and unreliable.
>
> a layout is processed by an instance of the class view (as is a
> 'view') and $this->name and $this-action will be available for you to
> use; aswell as other bits of info which you'll see with pr($this);
> die; in the layout. When in the layout there is no parent action, as
> you don't get a layout using requestAction.
>
> You may find though that using requestAction on every page (does this
> change at all?) will add significantly (approx 30% min.) to your page
> load times. You are probably better off simply using a component to
> get whatever this plugin is processing, and an element to display it.
> If the data doesn't change the component and/or element can refer to a
> cached source of info.
>
> HTH,
>
> AD


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling set to "database"

2007-04-02 Thread majna

Try:

ini_set("session.gc_probability",100);
ini_set("session.gc_divisor",100);
ini_set("session.gc_maxlifetime",10);




On Apr 2, 1:33 pm, "majna" <[EMAIL PROTECTED]> wrote:
> gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that
> the GC process starts on each request.
>
> from:http://hr.php.net/manual/en/ref.session.php
>
> On Apr 2, 11:58 am, "jyrgen" <[EMAIL PROTECTED]> wrote:
>
> > Thanks !
> > Sure i could add some debugging to _gc, though i guess
> > it won't show anything, because the method is never called.
>
> > in the meantime i have checked php.ini files of both servers,
> > these are the session directives:
>
> > -> my local server (sessions working)
>
> > session.entropy_length  0   0
> > session.gc_divisor  100 100
> > session.gc_maxlifetime  14401440
> > session.gc_probability  0
>
> > -> remote server (where sessions remain the database)
>
> > session.entropy_length  16  16
> > session.gc_divisor  10001000
> > session.gc_maxlifetime  14401440
> > session.gc_probability  0
>
> > the only remarkable difference is the dc_divisor...
> > hm... any ideas ?
>
> > jyrgen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling set to "database"

2007-04-02 Thread majna

gc_probability/gc_divisor, e.g. 1/100 means there is a 1% chance that
the GC process starts on each request.

from: http://hr.php.net/manual/en/ref.session.php

On Apr 2, 11:58 am, "jyrgen" <[EMAIL PROTECTED]> wrote:
> Thanks !
> Sure i could add some debugging to _gc, though i guess
> it won't show anything, because the method is never called.
>
> in the meantime i have checked php.ini files of both servers,
> these are the session directives:
>
> -> my local server (sessions working)
>
> session.entropy_length  0   0
> session.gc_divisor  100 100
> session.gc_maxlifetime  14401440
> session.gc_probability  0
>
> -> remote server (where sessions remain the database)
>
> session.entropy_length  16  16
> session.gc_divisor  10001000
> session.gc_maxlifetime  14401440
> session.gc_probability  0
>
> the only remarkable difference is the dc_divisor...
> hm... any ideas ?
>
> jyrgen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Cake 1.2. - FormHelper::dateTime ... bug when field invalidates

2007-04-02 Thread Preloader

Hello Mariano, hello nate,

thank you for your replies. Got the latest version, it works now.

Thank you very much, Christoph



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determine current action using different method than $this->name

2007-04-02 Thread AD7six



On Apr 2, 12:19 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
> I tried both your examples, but the problem seems to be that I use the
> requestaction within default.thtml, and it seems there's no data
> available about the parent action...
>
> Is there some other way, because now I use the $_GET['url'] method,
> which is just very dirty and unreliable.

a layout is processed by an instance of the class view (as is a
'view') and $this->name and $this-action will be available for you to
use; aswell as other bits of info which you'll see with pr($this);
die; in the layout. When in the layout there is no parent action, as
you don't get a layout using requestAction.

You may find though that using requestAction on every page (does this
change at all?) will add significantly (approx 30% min.) to your page
load times. You are probably better off simply using a component to
get whatever this plugin is processing, and an element to display it.
If the data doesn't change the component and/or element can refer to a
cached source of info.

HTH,

AD


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: window.onload and ajax

2007-04-02 Thread [EMAIL PROTECTED]

does it help you ?


http://groups.google.com/group/cake-php/browse_thread/thread/1742022fdd0d0fbe/82c9b56d3249cc5e?lnk=gst&q=wluigi&rnum=9&hl=en#82c9b56d3249cc5e


On Apr 2, 7:11 am, "Mandy" <[EMAIL PROTECTED]> wrote:
> You can just give a call to the function at the bottom of your ajax'd
> response like this -
>
> 
> init_uploader();
> 
>
> Just make sure evalScripts is set to 'true' while doing the ajax call
> - it is used for evaluating the script received in an ajax response.
>
> Thanks,
> Mandy.http://mandysingh.blogspot.com
>
> On Apr 1, 8:03 pm, "gerbenzomp" <[EMAIL PROTECTED]> wrote:
>
> > I just built my own swfupload script using the new article in the
> > bakery:
>
> >http://bakery.cakephp.org/articles/view/296
>
> > It's a great article, and the uploader works fantastically!
> > Everybody's talking about "ajax upload", but this is the first good
> > implementation I've seen.
>
> > One question though:
>
> > The uploader is in my posts/add/ view, which I load into another view
> > through ajax (only after the user presses the "add" button). In the
> > article the uploader is initialized at window.onload using this line:
>
> > window.onload = init_uploader;
>
> > But of course this doesn't work with ajax.
>
> > How can I initialize the uploader once the ajax-call is made?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Determine current action using different method than $this->name

2007-04-02 Thread gerbenzomp

I tried both your examples, but the problem seems to be that I use the
requestaction within default.thtml, and it seems there's no data
available about the parent action...

Is there some other way, because now I use the $_GET['url'] method,
which is just very dirty and unreliable.

On 2 apr, 08:23, "jitka" <[EMAIL PROTECTED]> wrote:
> No 'standard' way how to determine action where requestAction was
> called from (except for $_GET['url'] which is not 'clean usage of
> cake' as You obviously do not need to use $_GET directly in cake).
>
> But: You can pass some parameter to requestAction like
>
> $a = $this->requestAction('/some/url', array('parent_action' =>
> 'whatever');
>
> and then (inside of called method)
>
> if (!empty($this->params['requested'])) look for content of $this-
>
> >params['parent_action']


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: session handling set to "database"

2007-04-02 Thread jyrgen

Thanks !
Sure i could add some debugging to _gc, though i guess
it won't show anything, because the method is never called.

in the meantime i have checked php.ini files of both servers,
these are the session directives:

-> my local server (sessions working)

session.entropy_length  0   0
session.gc_divisor  100 100
session.gc_maxlifetime  14401440
session.gc_probability  0

-> remote server (where sessions remain the database)

session.entropy_length  16  16
session.gc_divisor  10001000
session.gc_maxlifetime  14401440
session.gc_probability  0

the only remarkable difference is the dc_divisor...
hm... any ideas ?

jyrgen


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: lost in validation

2007-04-02 Thread Dr. Tarique Sani

On 4/2/07, Dia <[EMAIL PROTECTED]> wrote:
>
> is it possible ? is it a bad approach of the way to validate ?... any
> suggestion :)

I am not sure but if you are trying to pass data to model to sanitize
it then I would say it is a bad idea - sanitize your data in
controller *before* you pass it to the model

HTH
Tarique

-- 
=
PHP for E-Biz: http://sanisoft.com
Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org
=

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: lost in validation

2007-04-02 Thread Dia

may be question would be more clear like this :

how do you transmit $data from controller to model, then modify these
datas with, for example, "sanitize->sql", then send back datas to
controller ?

is it possible ? is it a bad approach of the way to validate ?... any
suggestion :)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Data not showing up.

2007-04-02 Thread Mandy

Danielle -

Assuming that debug is set to >=1 on your dev environment and =0 on
production and you facing issues on prod after making the db change, I
would do the following -
Delete all the model cache. When you make a DB change, send it to
production but debug is set to 0, it happened to me that the table
definitions were not loaded automatically. So, I deleted the model
cache and it worked fine.

Give it a shot.

Thanks,
Mandy.
http://mandysingh.blogspot.com/

On Apr 2, 12:24 pm, Danielle Tilley <[EMAIL PROTECTED]>
wrote:
> I have run into a strange problem.
>
> I have data in a database table which appears correctly when debug is
> set to 1 or higher but disappears when debug is set to 0.  (Making the
> problem very hard to track down)
>
> The only thing i did that may be affecting this is I modified the table
> the model is using via an Alter Table command.
>
> Any Ideas what is going on.  All of the rest of my models are working
> correctly.
>
> I am using
> CAKE 1.1.10.3825
> MySQL 4.1.19
> php 4.3.1
>
> Thanks
> Danielle


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bake problem

2007-04-02 Thread John

Hi

Are you sure you've baked all the controllers and models yet? it could
be that the view is trying to refer to something that doesn't exist -
that's my experience of where a lot of bake errors come from.

For best results, I've found you need to bake models, then
controllers, then views last, but that if I'm doing something
complicated I've often needed to give it a few goes - good job it's
fast!

On Apr 1, 9:49 pm, "christianandradet" <[EMAIL PROTECTED]>
wrote:
> hi i'am trying to generate my application with "cakephp bake", i can
> generate models and controllers but when i try to generate a view this
> error message apears, and i do not know to fix it.
>
> Fatal error: Class 'Controller' not found in C:\www\cake\cake
> \app_controller.php  on line 40
>
> How do i fix it??? please help!! Thanks


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: lost in validation

2007-04-02 Thread Dia

up


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Data not showing up.

2007-04-02 Thread Danielle Tilley

I have run into a strange problem. 

I have data in a database table which appears correctly when debug is 
set to 1 or higher but disappears when debug is set to 0.  (Making the 
problem very hard to track down)

The only thing i did that may be affecting this is I modified the table 
the model is using via an Alter Table command.

Any Ideas what is going on.  All of the rest of my models are working 
correctly.

I am using
CAKE 1.1.10.3825
MySQL 4.1.19
php 4.3.1

Thanks
Danielle

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---