Re: doubt

2010-03-11 Thread thiru malai
See this
http://coding.derkeiler.com/Archive/PHP/comp.lang.php/2008-05/msg01238.html

On Thu, Mar 11, 2010 at 1:14 PM, selvam dilli  wrote:

> hi
> i have a doubt in php
>
> /*php
> $a=10.43;
> echo gettype($a);
> var_dump($a);
> ?>
>
> */
> the output for gettype( $a) is double
> an for var_dump is float.
>
>  how does php treats float and double.
> what is the difference between float and double in php.
>
> regards
> selvam
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: unable to fetch value dynamically

2010-03-11 Thread adeveloper guy
hi,

i tried putting that as well. but thatz also not working

dev

On Fri, Mar 12, 2010 at 11:31 AM, WebRenovator  wrote:

> Hi
>
> Thats a php issue. if you put variables in single quotes, it won't
> resolve the variable. You'll need to put it in double quotes for php
> to replace the variable with the name. :)
>
> On Mar 12, 2:11 am, adeveloper guy  wrote:
> > hi,
> >
> > i have a simple form with a text box. user types some value in the
> > text box and i want that to be searched from the db
> >
> > i want to know the correct way of putting that typed in value and use
> > in LIKE command in my query
> >
> > this is what i have done ...
> >
> > var $paginate = array(
> > 'conditions' => array('Book.name like' => '%$this->data[Books]
> > [name]%'),
> > 'limit' => 2,
> > 'order' => array(
> > 'Book.name' => 'asc'
> > )
> > );
> >
> > the problem is, i m not getting $this->data[Books][name] being
> > replaced by the actual value .. it is taking this whole string as is
> > and hence not working
> >
> > need guidance.
> >
> > thanks in advance
> >
> > Dev
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: unable to fetch value dynamically

2010-03-11 Thread WebRenovator
Hi

Thats a php issue. if you put variables in single quotes, it won't
resolve the variable. You'll need to put it in double quotes for php
to replace the variable with the name. :)

On Mar 12, 2:11 am, adeveloper guy  wrote:
> hi,
>
> i have a simple form with a text box. user types some value in the
> text box and i want that to be searched from the db
>
> i want to know the correct way of putting that typed in value and use
> in LIKE command in my query
>
> this is what i have done ...
>
> var $paginate = array(
>         'conditions' => array('Book.name like' => '%$this->data[Books]
> [name]%'),
>                 'limit' => 2,
>         'order' => array(
>             'Book.name' => 'asc'
>         )
>     );
>
> the problem is, i m not getting $this->data[Books][name] being
> replaced by the actual value .. it is taking this whole string as is
> and hence not working
>
> need guidance.
>
> thanks in advance
>
> Dev

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Concept of seamless registration

2010-03-11 Thread jacmoe
Are you sure you are not reinventing wheels?
Why not use OpenID, or similar?

There's a OpenID component for Cakephp here:
http://code.42dh.com/openid/

It is supposed to be pretty secure, and you get what you want: no
registering, no need to remember any password (but one), etc.

If I were you, I'd go for that. ;)

On Mar 11, 5:15 am, Yura Linnyk  wrote:
> Hello fellow bakers,
>
> I've just baked a simple web-app,http://WhenDidYouLast.com, where I
> implemented a proof of concept I had been thinking for a while - a
> passwordless seamless registration, where you don't have to register
> and don't have to remember you password, just enter your email, check
> your inbox for authorizing link and voila, you are logged in.
>
> Now I'd like to ask an advise of the community. Do you see any
> security pitfalls in the idea? Is it not convenient? or lame in any
> way? :) Personally when I get registered at a next web-app I catch
> myself thinking about why wouldn't they let me in this simple way and
> not make me think of a password, save it somewhere etc. and just have
> me visit my inbox. Unless it is my bank's account, of couse, or a
> larger scale app. And most of web-apps allow me to reset my password
> with my email anyway. A couple of websites I am registered at, send me
> auto-login link when i get a new PM, but still require me to remember
> password if I'm just visiting.
>
> So as far as we're talking about a web-app where I don't need any
> personal information about you as a user, recognizing and authorizing
> by email looks like something worth going with. Though I can imagine a
> user concerned about not sharing his email who would choose to
> register an account with login and password if it allows him to skip
> entering email.
> What do you think?
>
> The app is baked with Cake 1.3 rc1, Authsome (aptly named, so to
> speak!) and Blueprint. Quite simple, I'll be adding some features
> later :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: CakePHP + WAMP + Eclipse?

2010-03-11 Thread jacmoe
It should be pretty much the same - what's the problem? :)

I usually just create a new 'www' directory and extract a fresh Cake
into it, and start hacking.
Of course, I've renamed the old www directory.
For quick baking, I prefer that way, instead of messing around with
multi app configuration.
I don't think you need to setup anything else, except mysql (which is
part of the wamp package).
I use HeidiSQL for that, instead of phpmyadmin (because I renamed the
original www directory).

It would be great if you could write a bit about what problems you are
experiencing.

Cheers

On Mar 11, 8:42 pm, adel32179  wrote:
> Regards from Peru ... This a not *.ctp issue ... I'm new with CakePHP
> and I don't know how to set up Eclipse to work with CakePHP using Wamp
> you have the clue? this 
> tutorial:http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-wi...
> works with XAMPP but doesn't say anything  about working with WAMP
> Server ... please help me.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Call to undefined function mysql_query()

2010-03-11 Thread marcoR-IT
Que tal,
Im's just starting with CakePHP.
When I try to create some element with the "BAKE" command (M, V, C)
the following message is displayed:
"Fatal error: Call to undefined function mysql_query() in /var/www/
html/vircom/cake/libs/model/datasources/dbo/dbo_mysql.php on line 588"

database controller: "mysql"
CakePHP version: "CakePHP v1.3.0-RC1"
(The same occurs with version 1.2.6.)

Another application created "manually" with code, into CakePHP is
working without problems, so I think the problem may not be associated
with MySQL controller or the MySQL connection.

Thanks in advance for your help

Best regards,
Marco

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Start with 1.2 or 1.3?

2010-03-11 Thread jacmoe
I am not so sure..
Cake 1.3 is really great, and I use it myself.
But: most of - well, almost all of it, actually - the tutorials/hints/
information/blogposts are about Cake 1.2.
I am having a really hard time finding Cake 1.3 specific stuff.
I wouldn't have stood a chance if I were to start off with Cakephp 1.3
as a newbie right now.
That's going to change, of course, once Cake 1.3 becomes stable.

That said, if you are not using any Ajax or fancy stuff, you can start
off with Cake 1.3 - but know that you need to translate most of your
Google results from 1.2 to 1.3 - the migration guide is actually quite
good.

Your choice - but don't say I didn't warn you. :)

On Mar 12, 2:50 am, nurvzy  wrote:
> I recommend using 1.3 for any new project if for no other reason but
> the new and improved bake.  1.3 bake will make your life development
> easier -- I promise.  I've been using it since it was in alpha.  I
> have since converted all my client's sites to 1.3 and have had zero
> issues.  The new features are great!
>
> Hope that helps,
> Nick
>
> On Mar 11, 5:00 pm, jonathan  wrote:
>
> > Hi All,
>
> > Just a general question on which version would be best to start a new
> > project with - 1.2 or jump right over to 1.3?
>
> > Over the past 4 years or so, I have created some pretty large
> > enterprise systems in 1.1 and they are humming along nicely.  I'll be
> > starting some new stuff soon, so I'd like to get into the new versions
> > rather than remain old school. In all honesty, 1.1 was a pleasure to
> > work with and I'm really looking forward to seeing all that I've been
> > missing.
>
> > Thank you for your input and my undying gratitude to any and all who
> > help CakePHP be all that it is.
>
> > Sincerely,
> > Jonathan
>
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Start with 1.2 or 1.3?

2010-03-11 Thread nurvzy
I recommend using 1.3 for any new project if for no other reason but
the new and improved bake.  1.3 bake will make your life development
easier -- I promise.  I've been using it since it was in alpha.  I
have since converted all my client's sites to 1.3 and have had zero
issues.  The new features are great!

Hope that helps,
Nick

On Mar 11, 5:00 pm, jonathan  wrote:
> Hi All,
>
> Just a general question on which version would be best to start a new
> project with - 1.2 or jump right over to 1.3?
>
> Over the past 4 years or so, I have created some pretty large
> enterprise systems in 1.1 and they are humming along nicely.  I'll be
> starting some new stuff soon, so I'd like to get into the new versions
> rather than remain old school. In all honesty, 1.1 was a pleasure to
> work with and I'm really looking forward to seeing all that I've been
> missing.
>
> Thank you for your input and my undying gratitude to any and all who
> help CakePHP be all that it is.
>
> Sincerely,
> Jonathan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: city list

2010-03-11 Thread adeveloper guy
Thanks to both of you guys.
it works now :)

Dev

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


unable to fetch value dynamically

2010-03-11 Thread adeveloper guy
hi,

i have a simple form with a text box. user types some value in the
text box and i want that to be searched from the db

i want to know the correct way of putting that typed in value and use
in LIKE command in my query

this is what i have done ...

var $paginate = array(
'conditions' => array('Book.name like' => '%$this->data[Books]
[name]%'),
'limit' => 2,
'order' => array(
'Book.name' => 'asc'
)
);

the problem is, i m not getting $this->data[Books][name] being
replaced by the actual value .. it is taking this whole string as is
and hence not working

need guidance.

thanks in advance

Dev

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Start with 1.2 or 1.3?

2010-03-11 Thread jonathan
Hi All,

Just a general question on which version would be best to start a new
project with - 1.2 or jump right over to 1.3?

Over the past 4 years or so, I have created some pretty large
enterprise systems in 1.1 and they are humming along nicely.  I'll be
starting some new stuff soon, so I'd like to get into the new versions
rather than remain old school. In all honesty, 1.1 was a pleasure to
work with and I'm really looking forward to seeing all that I've been
missing.

Thank you for your input and my undying gratitude to any and all who
help CakePHP be all that it is.

Sincerely,
Jonathan

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to save data in an associative model without deleting the old related records.

2010-03-11 Thread nurvzy
@WebbedIT
'unique' => false does indeed stop cake from running a deleteAll on
the join table before inserting new records.  The benefit of this is
it makes adding additional 'tags' much easier.  Consider the
following: If all you want to do is add a new link between two models,
if unique is set to true you first have to grab all the currently
linked ids and then append your new id to that list and re-save.  If
unique is set to false, all you'll have to do is pass in the new tag
id and all your previous records are preserved (a constant time
operation rather than an N time).

At a web interface level it doesn't make much sense to set unique to
false because maintaining database integrity will be a bitch. The
benefit of a HABTM relationship in CakePHP is the join table and model
is suppose to be invisible to you as the developer. Turning unique =>
false is pretty much saying "I'll handle the join table integrity
myself cake".  It's now up to the developer to maintain database
integrity.

That's how I like to think of it anyway,
Nick


I create a blog and assign some tags to it.
On Mar 10, 2:02 am, WebbedIT  wrote:
> @Weather
> It is standard practice on a HABTM join table to delete all existing
> records then run a new insert, this is the most efficient way to do it
> as requires fewer SQL calls and PHP loops, plus it ensures there is no
> duplication of selected options which would cause problems at a later
> date when updating selections.
>
> Why is this a problem to you?
>
> @nurvzy
> Does 'unique' => 'false' really stop cake running a deleteAll on the
> join table before inserting the new records?
>
> And would you want to allow duplicate records in your join table?
> What would you do with those duplicate records as there is no standard
> way to use a form to de-select an option if it has been chosen twice?
>
> HTH
>
> Paul.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Expandable Behaviour Data not available when record obtained via habtm

2010-03-11 Thread #2Will
Thanks Jamie,

Good to know it wasn't because I stuffed up or there was a proper fix
that is practicable to apply.

I have just spun through the after find code from expandable like you
said,

foreach ($content['Article'] as $i => $item) {
  foreach ($item['ContentField'] as $field) {
  $content['Article'][$i][$field['key']] = $field['val'];
 }
}

in my controller.  worse things happen at sea,

Thanks. Will.

On Mar 12, 4:25 am, Jamie  wrote:
> Hi Will,
>
> This isn't a bug with the behavior, but a 'feature' of CakePHP.
> Basically, behavior and model callback methods only run for the main
> model of a find query. So behavior methods and regular callbacks
> (beforeFind, etc.) for any associated models - HABTM, hasMany, hasOne
> - are ignored.
>
> There's a ticket for this in the CakePHP Lighthouse project that has
> some good information on why this is the way it 
> is:http://cakephp.lighthouseapp.com/projects/42648/tickets/95-afterfind-...
>
> Basically, the problem runs quite deep and isn't really fixable
> without a large-scale change to the Model class. To fix the issue in
> your case, you'll have to either run a separate query to fetch the
> related Article records, or use the Expandable code after the fact to
> convert the fields manually.
>
> - Jamie
>
> On Mar 10, 11:52 pm, "#2Will"  wrote:
>
> > Hi,
> > I have a model with the expandable behaviour from debuggable, and its
> > working great to add meta data to my content rows.
>
> > When I add related content via a habtm relationship, the expanded
> > fields arn't available.
>
> > Has anyone else found this problem, and maybe an easy fix?
>
> > so my contents table has this:
>
> > var $hasAndBelongsToMany = array(
> >                 'Article' => array(
> >                         'className' => 'Content',
> >                         'joinTable' => 'articles_editions',
> >                         'foreignKey' => 'edition_id',
> >                         'associationForeignKey' => 'article_id',
> >                         'unique' => true,
> >                         'order' => 'ArticlesEdition.id',
> >                 )
> >         );
>
> > which brings the related "articles" contents but without the meta
> > fields brough in by expandable.
>
> > Thanks for any help,
>
> > Will

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Exporting large amount of data from cake application

2010-03-11 Thread barduck

Jorge,

Yes, reading one record at a time is exactly what I am looking for.

But I must admit that I don't understand how the code in the article
is able to achieve this.

Looking in the code I see the FactModel performs:
$raw_facts = $this->query($query);

which if I understand correctly, will still retrieve the entire result
set from the database and covert it into an array in memory before
returning it to the caller. Or am I missing something?

Thanks



On Mar 11, 5:39 pm, Jorge Horacio Cué Cantú 
wrote:
> OK,
>
> Sorry I didn explain myself well enough,
>
> Te point is, one problem wuth Cake for large resultset from queries is that
> cake is retrieving all data into memory at once; the dataset described in
> the article allows you to retrieve *one record at a time* from the dataset,
> then instead of writing a report as in the article, export the data into an
> XML, Excel or warever you need to do.
>
> It just an idea but, who knows? You may end with an interesting exporter
> pluging.
>
> Regards
>
> On Wed, Mar 10, 2010 at 4:22 AM, barduck  wrote:
> > That's an interesting article that contains some useful information.
> > However, I don't think it directly applies to my problem.
>
> > I think that the techniques described in the article are best suited
> > for situations when you have large amounts of complex data that you
> > need to be able to display different views of in a flexible manner.
> > The extracted data is stored back into the database and it is
> > presented to the user in the traditional ways of using find() and
> > passing the info to the [buffered] views.
>
> > In my case, the data I need to export is already simplified and the
> > query is optimized. I don't need to further simplify it or store it
> > back to the DB. My problem is how to stream this data directly to the
> > client. If I use find() on the entire data, I run into memory issues
> > (mostly because everything is buffered in memory until the data is
> > ready and the overhead of passing the arrays back and forth). If I
> > split the query into multiple pages and call find on subsets of the
> > data, the request becomes too slow (the times of the paged queries add
> > up pretty quickly).
>
> > I need to execute the query and then iterate over the raw result set
> > and stream/flush the data. I know I can do this all manually but I was
> > hoping I could leverage cake's models and query building abilities
> > instead of doing it all from scratch.
>
> > Regards
> > - barduck
>
> > On Mar 9, 5:49 pm, Jorge Horacio Cué Cantú 
> > wrote:
> > > Hello,
>
> > > Why don't You take a look at the article "Star schema (OLAP) setup for
> > > reporting" at the backery.
> > > It might be used for exporting instead reporting.
>
> > > The link to the article is
>
> > >http://bakery.cakephp.org/articles/view/starschema-olap-setup-for-rep...
>
> > > Please let us know your insights.
> > > Regards.
>
> > > On Mon, Mar 8, 2010 at 1:45 PM, barduck  wrote:
>
> > > > Hi,
>
> > > > In my cake application (1.2, apache, mysql), I need to export a large
> > > > amount of data (tens of thousands of records or more) in XML format.
> > > > The query itself is heavy but nothing the application/database
> > > > shouldn't handle reasonably (it takes ~1-2 seconds to complete the
> > > > query itself).
>
> > > > I first tried the naive way of just calling find() and passing the
> > > > result to an XML view. This, of course, chokes the application pretty
> > > > quickly and PHP runs out of memory.
>
> > > > Next I tried "paging" the query internally within one call in my
> > > > controller, rending each chuck and flushing the output buffer
> > > > manually. This worked better but it is taking way too long since I now
> > > > have dozens of queries instead of one, each taking over a second to
> > > > complete.
>
> > > > Now I know there must be a way to achieve this since running the same
> > > > query in phpmyadmin and exporting the result as XML works very well. I
> > > > guess that in this case I need to somehow bypass some of cake
> > > > mechanisms, iterate over the result set myself and steam the data to
> > > > the client.
>
> > > > But I still want to use some of cake's strengths when possible so I
> > > > figured I need to do something like this.
>
> > > > * use cake for the request: routes, controller/action, parse input
> > > > parameters
> > > > * use cake models to generate the find query
> > > > * obtain the SQL query from cake
> > > > * get the active mysql database connection from cake
> > > > * execute the query on the raw connection
> > > > * iterate over the result set, generate the XML elements, sending
> > > > chucks of data to the client and flushing as needed.
>
> > > > (when the above works I may save the XML to intermediate file for
> > > > caching and redirect to that file, using cake's cache to control
> > > > expiration).
>
> > > > Does the above make sense or is there any better way to achieve my
> > > > goal?
>
> > > > How do 

debugger _outputformat

2010-03-11 Thread bram
I would really be interested to know how to set the private property
_outputformat of the debugger.
When doing a lot of ajax stuff, it would be nice to send debugging
info to the log file instead of the browser. It usually doesn't fit in
the layout (small divs for example), rendering it mostly unreadable /
unaccessible.

In this line: http://api.cakephp.org/view_source/debugger/#l-492 the
debuggers' output is routed to 'html'. According to cases of the
switch statement, other valid values for _outputformat could be:
'js','text'/'txt' or 'log'.

Mmmm when carefully inspecting the switch structure, it looks like
the value of _outputformat is ignored, since the first expression is
'default' followed by 'js'. All other cases will be ignored
independent of the value of _outputformat.

Is this a bug or a creative way to disable all but the 'js' option?

Cheers,

Bram

ps: see also:
http://groups.google.com/group/cake-php/browse_thread/thread/33a060378621b83c/05dfde6ad7ebfed2?hl=en&lnk=gst&q=debug+output+to+log#05dfde6ad7ebfed2

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: model name collision in plugin

2010-03-11 Thread anl hp
you're right, I read the book but I forgot almost everything about naming
conventions, thanks a lot


--
anl


On Thu, Mar 11, 2010 at 8:34 PM, John Andersen wrote:

> According to the CakePHP book at
> http://book.cakephp.org/view/117/Plugin-Models
> you should name your model in the plugin by prefixing it with the
> plugin name.
> Take a look and hope this helps you on the way,
>John
>
> On Mar 11, 3:33 pm, anler  wrote:
> > hi folks, I have a model in a plugin called Section, but also have a
> > model in the app with the same name, the problem strikes when I try to
> > do the following from a helper:
> >
> > ClassRegistry::init('Plugin.Section')
> >
> > I'm getting the App Section model instead of the plugin model
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Pagination question

2010-03-11 Thread Brian Allemana

Hello everyone,

My first post to this list. I've been digging the conversation here.  
Glad to know there's a healthy support community around Cake.


I have a situation where I have a somewhat elaborate routing scheme  
for fetching a list of products. I'd like to be able to paginate this  
list and have indeed got everything working that I need on the actual  
pagination processing. What's missing is the ability to pass the page  
number to my Products controller. None of my intuitive attempts at  
making this work have succeeded. I'm on Cake 1.2.


Example: Let's say I want a list of all products of size Junior and  
category Apparel. The URL would look something like:


http://mysite.com/ps-junior/c-apparel

My route will then hand off the appropriate args to my controller.  
However, if I add a page number, viz:


http://mysite.com/ps-junior/c-apparel/page:2

I still get only the first page. So...is there a way to set the page  
number, say, from within the controller? I can't access the  
$paginator object (I think), so maybe I can set a value within the  
$paginate property of the controller?


Here's my route declaration for reference:

// routes for product listing views -- flexible enough to handle  
leaving out any args

Router::connect(
		'/:type/:category/:product_size_category/:product_size/:color/:gender/ 
:vendor/:date/:page',

array(
			'controller' => 'products', 'action' => 'index', 'type' => null,  
'category' => null,
			'product_size_category' => null, 'product_size' => null, 'color'  
=> null,

'gender' => null, 'vendor' => null, 'date' => null, 'page' 
=> null
),
array(
			'pass' => array('type', 'category', 'product_size_category',  
'product_size',

'color', 'gender', 
'vendor', 'date', 'page'),
'type' => 'designers|whats-new|sale',
'category' => 'c-[a-zA-Z0-9&%\{\}_-]+',
'product_size_category' => 'psc-[a-zA-Z0-9\{\}_-]+',
'product_size' => 'ps-[a-zA-Z0-9\{\}_-]+',
'color' => 'cl-[a-zA-Z0-9\{\}_-]+',
'gender' => 'for-[a-zA-Z0-9_-]+',
'vendor' => 'v-[a-zA-Z0-9\{\}_-]+',
'date' => '\d\d\d\d-\d\d-\d\d',
'page' => 'page:\d+'
)
);

Can anyone shed some light?

Many thanks,
-Brian

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


CakePHP + WAMP + Eclipse?

2010-03-11 Thread adel32179
Regards from Peru ... This a not *.ctp issue ... I'm new with CakePHP
and I don't know how to set up Eclipse to work with CakePHP using Wamp
you have the clue? this tutorial:
http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-with-cake:
works with XAMPP but doesn't say anything  about working with WAMP
Server ... please help me.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: model name collision in plugin

2010-03-11 Thread John Andersen
According to the CakePHP book at
http://book.cakephp.org/view/117/Plugin-Models
you should name your model in the plugin by prefixing it with the
plugin name.
Take a look and hope this helps you on the way,
   John

On Mar 11, 3:33 pm, anler  wrote:
> hi folks, I have a model in a plugin called Section, but also have a
> model in the app with the same name, the problem strikes when I try to
> do the following from a helper:
>
> ClassRegistry::init('Plugin.Section')
>
> I'm getting the App Section model instead of the plugin model

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have an ORM problem

2010-03-11 Thread Mónico Briseño
Martin. I got it. Thanks.

This is the output of debug($books)

Array
(
[0] => Array
(
[Book] => Array
(
[id] => 3
[isbn] => 123456789
[title] => C programming
[description] => C programming
[author_id] => 1
)

)

)


Cheers

-- 
M.S. Mónico Briseño Cortés
Instructional Technologist  Univ. Houston
Moodle Teacher Certificate
NTCM member

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have an ORM problem

2010-03-11 Thread Martin Duris
in index.ctp try to write


or at least - print_r($books); - so we will know, is in fields - array

2010/3/11 Mónico Briseño :
> Paul, Structure of two tables
>
> CREATE TABLE `authors` (
>     `id` int( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
>     `name` varchar( 127 ) NOT NULL ,
>     `email` varchar( 127 ) NOT NULL ,
>     `website` varchar( 127 ) NOT NULL
>     );
>
>
> CREATE TABLE `books` (
>     `id` int( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
>     `isbn` varchar( 13 ) NOT NULL ,
>  `title` varchar( 64 ) NOT NULL ,
>     `description` text NOT NULL ,
>     `author_id` int( 11 ) NOT NULL
>     )
>
>
> How can I get the output  from echo debug($books)?
>
> TIA
>
> --
> M.S. Mónico Briseño Cortés
> Instructional Technologist  Univ. Houston
> Moodle Teacher Certificate
> NTCM member
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: cake php XML parser timing out after 30 seconds (not max_execution_time or max_input_time limit)

2010-03-11 Thread cricket
On Mar 10, 4:05 pm, cartosys  wrote:
> code:
>
>         $link = 'http://some.xml.feed.xml';
>         $parsed_xml = new XML($link);
>         $parsed_xml = Set::reverse($parsed_xml);
>
> The XML feed at hand is one that took over a minute to load via
> browser.  cakephp's XML returned an empty array after Set::reverse,
> and always after ~30 seconds (timed with a timer).

Have you tried loading the same xml file locally? I'd give that a try
as it might narrow down the problem.

By locally, I mean from the filesystem, not through your local
webserver. The idea being to check if it's ok without using
HTTPSocket.


> Which is where the parser time's out after 30 seconds.  This can't be
> fixed by raising any php.ini timout values which I set to 10 minutes.
>
> max_execution_time = 600
> max_input_time = 600

It's better to leave your global settings at something reasonable and
do this in your app where you need it:

set_time_limit(0);

That removes the limit altogether for the duration (however long that
may be :-) of the script.


> So my only solution now is to break the rules and modify cake/lib/
> socket.php  with the following line of code just above the above
> mentioned fread line which works:
>
> stream_set_timeout ($this->connection, 600);
>
> ...
>
> If anybody knows of a better workaround (like setting
> stream_set_timeout elsewhere in cake or php.ini), that would rock.
>
> xml parser cakephp ubuntu 9.10

I think you could just do that in your controller (or wherever this
code is). Put it with the set_time_limit(0) I mentioned.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Concept of seamless registration

2010-03-11 Thread Zaky Katalan-Ezra
You know your users nature and it may be simpler to them.
To me it seems more complicated to ask for a link then wait for it and just
then posting what ever I need to your site.
I use several email addresses if I wouldn't remember what was the address I
used for the last time I entered your site and give you another address you
loose the connection between my posts.
Again if it's not important in your design then it's not an issue.
Don't forget that your user can create a user aaccount with user name and
password and then set is browser to remember the password for good.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Introducing VaM Cart - CakePHP Shopping Cart

2010-03-11 Thread Sam Sherlock
pure plugin
http://github.com/ProLoser/CakePHP-Cart

I have'nt tried it out yet but mean to. VaM does look good but being able to
plug in a cart into an app would be so nice
 
- S



On 11 March 2010 15:36, milx  wrote:

> Pah! It uses an American flag to represent the "English" language in
> the demo... I won't use it!
>
> Oh wait.. I could change it to British. Maybe it ain't so bad after
> all.
>
>
>
>
>
>
> On Mar 11, 12:31 pm, "Tiago N. Sampaio"  wrote:
> > Great job.
> > I was searching for a advanced example, and you give me xD.
> >
> > Thank you very much!
> >
> > Obs: Like others said, GPL is too bad to use.
> > If you realy want to your project be free, use a realy open licence like
> > BSD.
> >
> > Em Qua, 2010-03-10 às 10:25 -0800, VaM escreveu:
> >
> >
> >
> > > VaM Cart - Free, Open Source CakePHP Based Shopping Cart.
> >
> > > Official Site -http://vamcart.com/Online Demo -
> http://vamcart.com/demo/
> > > Admin:http://vamcart.com/demo/admin/
> > > Login: admin
> > > Password: password
> >
> > > * Easy Installation.
> > > * CSS, JS minify and compress.
> > > * SEO - Search Engine Optimization.
> > > * Unlimited Categories, Products.
> > > * CakePHP, MVC, Smarty.
> > > * Multi Language, Multi Currency.
> > > * Templatable.
> > > * Open Source.
> > > * Automatic Image Resize.
> > > * Product Reviews.
> > > * Coupons...
> >
> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
> others with their CakePHP related questions.
> >
> > > You received this message because you are subscribed to the Google
> Groups "CakePHP" group.
> > > To post to this group, send email to cake-php@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > cake-php+unsubscr...@googlegroups.comFor
> > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
> >
> >
> >
> >  signature.asc
> > < 1KViewDownload
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Expandable Behaviour Data not available when record obtained via habtm

2010-03-11 Thread Jamie
Hi Will,

This isn't a bug with the behavior, but a 'feature' of CakePHP.
Basically, behavior and model callback methods only run for the main
model of a find query. So behavior methods and regular callbacks
(beforeFind, etc.) for any associated models - HABTM, hasMany, hasOne
- are ignored.

There's a ticket for this in the CakePHP Lighthouse project that has
some good information on why this is the way it is:
http://cakephp.lighthouseapp.com/projects/42648/tickets/95-afterfind-and-beforefind-callbacks-not-working-on-associated-models-was-translate-behavior-should-translate-associated-model-data

Basically, the problem runs quite deep and isn't really fixable
without a large-scale change to the Model class. To fix the issue in
your case, you'll have to either run a separate query to fetch the
related Article records, or use the Expandable code after the fact to
convert the fields manually.

- Jamie

On Mar 10, 11:52 pm, "#2Will"  wrote:
> Hi,
> I have a model with the expandable behaviour from debuggable, and its
> working great to add meta data to my content rows.
>
> When I add related content via a habtm relationship, the expanded
> fields arn't available.
>
> Has anyone else found this problem, and maybe an easy fix?
>
> so my contents table has this:
>
> var $hasAndBelongsToMany = array(
>                 'Article' => array(
>                         'className' => 'Content',
>                         'joinTable' => 'articles_editions',
>                         'foreignKey' => 'edition_id',
>                         'associationForeignKey' => 'article_id',
>                         'unique' => true,
>                         'order' => 'ArticlesEdition.id',
>                 )
>         );
>
> which brings the related "articles" contents but without the meta
> fields brough in by expandable.
>
> Thanks for any help,
>
> Will

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-11 Thread Dr. Loboto
If your production runs with debug = 2 it may be big SQL log and new
allocation to show it. But I'm not sure.

On Mar 11, 2:55 pm, mark  wrote:
> On 6 Mar, 21:58, mark  wrote:
>
>
>
>
>
> > Hi,
>
> > I have a cakephp app that has started to throw a Fatal Memory
> > allocation error. Strangely it only happens on the production server
> > (Cpanel, php 5.2.12) but not on either dev machines (php 5.2.11). This
> > is with CakePHP version 1.2.4.8284.
>
> > It has only started recently, nothing in the script changed so I
> > suspect it is a change to the hosting server, but I haven't traced it
> > yet.
>
> > The error comes right at the end of the script, after the  so
> > looks like it might be related to cleanup.
> > They all look like this, although some of the numbers change slightly:
>
> >         Fatal error: Allowed memory size of 67108864 bytes exhausted
> > (tried to allocate 432212624 bytes) in Unknown on line 0
>
> > The server has a hard memory_limit of 64MB, so the memory_limit 128MB
> > in app/webroot/test.php is ignored.
>
> > I have no idea how to track this down and would be grateful for some
> > suggestions.
>
> > What I find very strange is that CakePHP should be trying to allocate
> > 432MB as it is cleaning up and closing down. Seems very odd to me.
> > Just increasing memory_limit is not possible (hard limit on server)
> > and cannot be right as that would just cover something that surely
> > shouldn't be happening.
>
> > Thanks for your help
>
> > Mark
>
> No suggestions so far on this. Would more/other information be useful?
>
> Thanks
>
> Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: doubt

2010-03-11 Thread John Andersen
Don't doubt :) search for the reason! For example at:
http://lv.php.net/manual/en/function.gettype.php
where it is written that:

 Possibles values for the returned string are:
...
* "double" (for historical reasons "double" is returned in case of a
float, and not simply "float")
...
So that is the reason, whe gettype returns a different type!
Enjoy,
   John

On Mar 11, 9:44 am, selvam dilli  wrote:
> hi
> i have a doubt in php
>
> /*php
> $a=10.43;
> echo gettype($a);
> var_dump($a);
> ?>
>
> */
> the output for gettype( $a) is double
> an for var_dump is float.
>
>  how does php treats float and double.
> what is the difference between float and double in php.
>
> regards
> selvam

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Exporting large amount of data from cake application

2010-03-11 Thread Jorge Horacio Cué Cantú
OK,

Sorry I didn explain myself well enough,

Te point is, one problem wuth Cake for large resultset from queries is that
cake is retrieving all data into memory at once; the dataset described in
the article allows you to retrieve *one record at a time* from the dataset,
then instead of writing a report as in the article, export the data into an
XML, Excel or warever you need to do.

It just an idea but, who knows? You may end with an interesting exporter
pluging.

Regards

On Wed, Mar 10, 2010 at 4:22 AM, barduck  wrote:

> That's an interesting article that contains some useful information.
> However, I don't think it directly applies to my problem.
>
> I think that the techniques described in the article are best suited
> for situations when you have large amounts of complex data that you
> need to be able to display different views of in a flexible manner.
> The extracted data is stored back into the database and it is
> presented to the user in the traditional ways of using find() and
> passing the info to the [buffered] views.
>
> In my case, the data I need to export is already simplified and the
> query is optimized. I don't need to further simplify it or store it
> back to the DB. My problem is how to stream this data directly to the
> client. If I use find() on the entire data, I run into memory issues
> (mostly because everything is buffered in memory until the data is
> ready and the overhead of passing the arrays back and forth). If I
> split the query into multiple pages and call find on subsets of the
> data, the request becomes too slow (the times of the paged queries add
> up pretty quickly).
>
> I need to execute the query and then iterate over the raw result set
> and stream/flush the data. I know I can do this all manually but I was
> hoping I could leverage cake's models and query building abilities
> instead of doing it all from scratch.
>
> Regards
> - barduck
>
> On Mar 9, 5:49 pm, Jorge Horacio Cué Cantú 
> wrote:
> > Hello,
> >
> > Why don't You take a look at the article "Star schema (OLAP) setup for
> > reporting" at the backery.
> > It might be used for exporting instead reporting.
> >
> > The link to the article is
> >
> > http://bakery.cakephp.org/articles/view/starschema-olap-setup-for-rep...
> >
> > Please let us know your insights.
> > Regards.
> >
> > On Mon, Mar 8, 2010 at 1:45 PM, barduck  wrote:
> >
> > > Hi,
> >
> > > In my cake application (1.2, apache, mysql), I need to export a large
> > > amount of data (tens of thousands of records or more) in XML format.
> > > The query itself is heavy but nothing the application/database
> > > shouldn't handle reasonably (it takes ~1-2 seconds to complete the
> > > query itself).
> >
> > > I first tried the naive way of just calling find() and passing the
> > > result to an XML view. This, of course, chokes the application pretty
> > > quickly and PHP runs out of memory.
> >
> > > Next I tried "paging" the query internally within one call in my
> > > controller, rending each chuck and flushing the output buffer
> > > manually. This worked better but it is taking way too long since I now
> > > have dozens of queries instead of one, each taking over a second to
> > > complete.
> >
> > > Now I know there must be a way to achieve this since running the same
> > > query in phpmyadmin and exporting the result as XML works very well. I
> > > guess that in this case I need to somehow bypass some of cake
> > > mechanisms, iterate over the result set myself and steam the data to
> > > the client.
> >
> > > But I still want to use some of cake's strengths when possible so I
> > > figured I need to do something like this.
> >
> > > * use cake for the request: routes, controller/action, parse input
> > > parameters
> > > * use cake models to generate the find query
> > > * obtain the SQL query from cake
> > > * get the active mysql database connection from cake
> > > * execute the query on the raw connection
> > > * iterate over the result set, generate the XML elements, sending
> > > chucks of data to the client and flushing as needed.
> >
> > > (when the above works I may save the XML to intermediate file for
> > > caching and redirect to that file, using cake's cache to control
> > > expiration).
> >
> > > Does the above make sense or is there any better way to achieve my
> > > goal?
> >
> > > How do I get the raw SQL query for my models without executing it?
> > > How do I get the database connection?
> >
> > > Any help is appreciated.
> >
> > > Thanks!
> >
> > > - barduck
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out t

Re: Introducing VaM Cart - CakePHP Shopping Cart

2010-03-11 Thread milx
Pah! It uses an American flag to represent the "English" language in
the demo... I won't use it!

Oh wait.. I could change it to British. Maybe it ain't so bad after
all.






On Mar 11, 12:31 pm, "Tiago N. Sampaio"  wrote:
> Great job.
> I was searching for a advanced example, and you give me xD.
>
> Thank you very much!
>
> Obs: Like others said, GPL is too bad to use.
> If you realy want to your project be free, use a realy open licence like
> BSD.
>
> Em Qua, 2010-03-10 às 10:25 -0800, VaM escreveu:
>
>
>
> > VaM Cart - Free, Open Source CakePHP Based Shopping Cart.
>
> > Official Site -http://vamcart.com/Online Demo -http://vamcart.com/demo/
> > Admin:http://vamcart.com/demo/admin/
> > Login: admin
> > Password: password
>
> > * Easy Installation.
> > * CSS, JS minify and compress.
> > * SEO - Search Engine Optimization.
> > * Unlimited Categories, Products.
> > * CakePHP, MVC, Smarty.
> > * Multi Language, Multi Currency.
> > * Templatable.
> > * Open Source.
> > * Automatic Image Resize.
> > * Product Reviews.
> > * Coupons...
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others 
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups 
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscr...@googlegroups.com For more options, visit this group 
> > athttp://groups.google.com/group/cake-php?hl=en
>
>
>
>  signature.asc
> < 1KViewDownload

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Another cakephp success story

2010-03-11 Thread welzie
Thanks for testing and the great comments/ideas.

@WebbedIT
Did you find any difficulties in using postgresql with cakephp?
-I was actually using MySQL and then switched mid project.   Had no
trouble at all.
Switched to postgresql to use constraints.  Maybe I didn't have to?

Did you used bake command ?
-At the beginning I did.  After that I would just copy and modify
views/controllers/models.

@John
1) When search is not finding anything, don't assume that I would like
to add the host, I may have entered the wrong URL, so I would like to
stay in search!
-Great idea.  Don't know why I didn't think of that first.

2) Do not use Please contribute for adding new hosts, use the same
term as elsewhere Add host! Contribute sounds more like you are asking
for a contribution to keep the site going :)
-Another good idea.

3) Don't understand why login requires the use of recaptcha, can you
clarify?
-No big reason besides extra security against robot login attempts.
Or should I not worry about stuff like that?

4) Add markers, so I know which fields are required when rating a
host.
-Will do.  That is a basic I forgot to add.

5) I am running 1024x768 so the host matrix extends outside the
display view. Maybe your stars could be smaller?
-That was already on my list.  Just need to fire up photoshop and do
it


On Mar 10, 3:27 am, John Andersen  wrote:
> Congratulations :)
>
> Now hereby my comments:
> 1) When search is not finding anything, don't assume that I would like
> to add the host, I may have entered the wrong URL, so I would like to
> stay in search!
> 2) Do not use Please contribute for adding new hosts, use the same
> term as elsewhere Add host! Contribute sounds more like you are asking
> for a contribution to keep the site going :)
> 3) Don't understand why login requires the use of recaptcha, can you
> clarify?
> 4) Add markers, so I know which fields are required when rating a
> host.
> 5) I am running 1024x768 so the host matrix extends outside the
> display view. Maybe your stars could be smaller?
>
> Looking forward to hear you story of how it went from the start to the
> realization (going online) :)
> Enjoy,
>    John
>
> On Mar 10, 5:50 am, welzie  wrote:
>
> > I recently finishedhttp://www.host-rater.com.  As the name points out
> > it's a site for rating web hosts.  This was my first cakephp
> > application.  The site is still in beta, please try it out and let me
> > know what you think.
>
> > The funnest part for me was creating a helper to display the star
> > ratings.  I need to get some documentation together and contribute
> > that helper.  With the helper creating star fields became one line in
> > the views: starRatingInput('cost_rating'); ?>
>
> > Used
> > --CakePHP 1.2.1
> > --Postgresql
> > --Recaptha helper and component
> > --Homegrown
> >   --star rating helper
> >   --authentication and authorization component
>
> > Favorite things about cakephp which I learned while doing this project
> > --ability to encapsulate functionality with components and helpers
> > --the out of the box view template system is great and easy to use
> > --pagination works out of the box, can be a little tricky if you need
> > advanced sorting
> > --CoC really applies to cakephp.  You only need to write code when u
> > need unique 
> > functionalityhttp://en.wikipedia.org/wiki/Convention_over_configuration
>
> > Again please test the site out and let me know what you think.  btw
> > the site looks pretty bad in IE6 at the moment so be 
> > warned.http://www.host-rater.com

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
labels and divs can be disabled by passing "false" in the options
array
have a look in the manual


On 11 Mrz., 14:36, SeeVik  wrote:
> Thank you all for helping me out. I know how to customize $form-
>
> >input() to my liking now.
>
> Thanks for your help.
> ShiVik
>
> On Mar 11, 9:48 pm, nurvzy  wrote:
>
> > As Euromark suggested, you should be using $form->input().  You can
> > really customize how you want $form->input to return output now.  You
> > can turn labels off with $form->input('Model.field', array('label' =>
> > false));
>
> > If you insist on using those form helper elements you'll need to use
> > $form->error('Model.field') to output the error message.  Here is the
> > API for $form->error():
>
> >http://api.cakephp.org/class/form-helper#method-FormHelpererror
>
> > Hope that helps,
> > Nick
>
> > On Mar 11, 5:37 am, SeeVik  wrote:
>
> > > If I use $form->input() then I will also have to use the label for the
> > > input field it will display, which I don't want to, since I want my
> > > label in some specific CSS style.
>
> > > Can't the error message be displayed using $form->text() and other
> > > such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> > > in cakephp 1.2 it has been deprecated. So what's the new way of doing
> > > it?
>
> > > Thanks and Regards
> > > ShiVik
>
> > > On Mar 11, 8:32 pm, euromark  wrote:
>
> > > > always use $form->input()
> > > > this will make a lot for u automatically
>
> > > > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > > > Hello all
>
> > > > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > > > messages for the data validation of a form. I created the form like
> > > > > this
>
> > > > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > > > text( 'text' ); ?>
> > > > > text( 'value' ); ?>
> > > > > end( 'Submit' ); ?>
>
> > > > > In my model Post.php
>
> > > > > I have defined $validate like this
>
> > > > > $validate = array(
> > > > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > > needed' ),
> > > > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > > needed' )
> > > > > );
>
> > > > > In my PostsController.php I did the validation like this...
>
> > > > > function index() {
> > > > >  if( $this->data ) {
> > > > >    $this->Post->set( $this->data );
> > > > >    if( $this->Post->validates() ) {
> > > > >       // some action here
> > > > >    }
> > > > >    else {
> > > > >    // other action here
> > > > >    }
> > > > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > > > So when I see the variable "check" in my view, I can see the messages
> > > > > I defined in my model. But I cannot see the error message below my
> > > > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > > > Thanks and Regards
> > > > > ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


doubt

2010-03-11 Thread selvam dilli
hi
i have a doubt in php

/*php
$a=10.43;
echo gettype($a);
var_dump($a);
?>

*/
the output for gettype( $a) is double
an for var_dump is float.

 how does php treats float and double.
what is the difference between float and double in php.

regards
selvam

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: How to save data in an associative model without deleting the old related records.

2010-03-11 Thread Weather Forecaster
@WebbedIT

I need to keep the old records as I am in them to store additional
information.
In tabel ShopsMainService i write down the price of services. and I
get

id | shop_id | service_id | price

And when I change the data, I lose the field price

On Mar 10, 11:02 am, WebbedIT  wrote:
> @Weather
>
> Why is this a problem to you?
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: I have an ORM problem

2010-03-11 Thread Mónico Briseño
Paul, Structure of two tables

CREATE TABLE `authors` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` varchar( 127 ) NOT NULL ,
`email` varchar( 127 ) NOT NULL ,
`website` varchar( 127 ) NOT NULL
);


CREATE TABLE `books` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`isbn` varchar( 13 ) NOT NULL ,
 `title` varchar( 64 ) NOT NULL ,
`description` text NOT NULL ,
`author_id` int( 11 ) NOT NULL
)


How can I get the output  from echo debug($books)?

TIA

-- 
M.S. Mónico Briseño Cortés
Instructional Technologist  Univ. Houston
Moodle Teacher Certificate
NTCM member

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
Thank you all for helping me out. I know how to customize $form-
>input() to my liking now.

Thanks for your help.
ShiVik

On Mar 11, 9:48 pm, nurvzy  wrote:
> As Euromark suggested, you should be using $form->input().  You can
> really customize how you want $form->input to return output now.  You
> can turn labels off with $form->input('Model.field', array('label' =>
> false));
>
> If you insist on using those form helper elements you'll need to use
> $form->error('Model.field') to output the error message.  Here is the
> API for $form->error():
>
> http://api.cakephp.org/class/form-helper#method-FormHelpererror
>
> Hope that helps,
> Nick
>
> On Mar 11, 5:37 am, SeeVik  wrote:
>
>
>
> > If I use $form->input() then I will also have to use the label for the
> > input field it will display, which I don't want to, since I want my
> > label in some specific CSS style.
>
> > Can't the error message be displayed using $form->text() and other
> > such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> > in cakephp 1.2 it has been deprecated. So what's the new way of doing
> > it?
>
> > Thanks and Regards
> > ShiVik
>
> > On Mar 11, 8:32 pm, euromark  wrote:
>
> > > always use $form->input()
> > > this will make a lot for u automatically
>
> > > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > > Hello all
>
> > > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > > messages for the data validation of a form. I created the form like
> > > > this
>
> > > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > > text( 'text' ); ?>
> > > > text( 'value' ); ?>
> > > > end( 'Submit' ); ?>
>
> > > > In my model Post.php
>
> > > > I have defined $validate like this
>
> > > > $validate = array(
> > > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > needed' ),
> > > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > > needed' )
> > > > );
>
> > > > In my PostsController.php I did the validation like this...
>
> > > > function index() {
> > > >  if( $this->data ) {
> > > >    $this->Post->set( $this->data );
> > > >    if( $this->Post->validates() ) {
> > > >       // some action here
> > > >    }
> > > >    else {
> > > >    // other action here
> > > >    }
> > > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > > So when I see the variable "check" in my view, I can see the messages
> > > > I defined in my model. But I cannot see the error message below my
> > > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > > Thanks and Regards
> > > > ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


model name collision in plugin

2010-03-11 Thread anler
hi folks, I have a model in a plugin called Section, but also have a
model in the app with the same name, the problem strikes when I try to
do the following from a helper:

ClassRegistry::init('Plugin.Section')

I'm getting the App Section model instead of the plugin model

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread nurvzy
As Euromark suggested, you should be using $form->input().  You can
really customize how you want $form->input to return output now.  You
can turn labels off with $form->input('Model.field', array('label' =>
false));

If you insist on using those form helper elements you'll need to use
$form->error('Model.field') to output the error message.  Here is the
API for $form->error():

http://api.cakephp.org/class/form-helper#method-FormHelpererror

Hope that helps,
Nick

On Mar 11, 5:37 am, SeeVik  wrote:
> If I use $form->input() then I will also have to use the label for the
> input field it will display, which I don't want to, since I want my
> label in some specific CSS style.
>
> Can't the error message be displayed using $form->text() and other
> such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
> in cakephp 1.2 it has been deprecated. So what's the new way of doing
> it?
>
> Thanks and Regards
> ShiVik
>
> On Mar 11, 8:32 pm, euromark  wrote:
>
>
>
> > always use $form->input()
> > this will make a lot for u automatically
>
> > On 11 Mrz., 11:19, SeeVik  wrote:
>
> > > Hello all
>
> > > I am using cakephp 1.2 and I am having problem in displaying the error
> > > messages for the data validation of a form. I created the form like
> > > this
>
> > > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > > text( 'text' ); ?>
> > > text( 'value' ); ?>
> > > end( 'Submit' ); ?>
>
> > > In my model Post.php
>
> > > I have defined $validate like this
>
> > > $validate = array(
> > >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > needed' ),
> > >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > > needed' )
> > > );
>
> > > In my PostsController.php I did the validation like this...
>
> > > function index() {
> > >  if( $this->data ) {
> > >    $this->Post->set( $this->data );
> > >    if( $this->Post->validates() ) {
> > >       // some action here
> > >    }
> > >    else {
> > >    // other action here
> > >    }
> > >    $this->set( 'check', $this->Post->validationErrors );
>
> > > So when I see the variable "check" in my view, I can see the messages
> > > I defined in my model. But I cannot see the error message below my
> > > text fields in the view. Why is that? What am I doing wrong over here?
>
> > > Thanks and Regards
> > > ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
If I use $form->input() then I will also have to use the label for the
input field it will display, which I don't want to, since I want my
label in some specific CSS style.

Can't the error message be displayed using $form->text() and other
such helpers? In cakephp 1.1 it was $html->tagErrorMsg but I know that
in cakephp 1.2 it has been deprecated. So what's the new way of doing
it?

Thanks and Regards
ShiVik

On Mar 11, 8:32 pm, euromark  wrote:
> always use $form->input()
> this will make a lot for u automatically
>
> On 11 Mrz., 11:19, SeeVik  wrote:
>
>
>
> > Hello all
>
> > I am using cakephp 1.2 and I am having problem in displaying the error
> > messages for the data validation of a form. I created the form like
> > this
>
> > create( 'Posts', array( 'action' => 'index' ) ); ?>
> > text( 'text' ); ?>
> > text( 'value' ); ?>
> > end( 'Submit' ); ?>
>
> > In my model Post.php
>
> > I have defined $validate like this
>
> > $validate = array(
> >  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > needed' ),
> >  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> > needed' )
> > );
>
> > In my PostsController.php I did the validation like this...
>
> > function index() {
> >  if( $this->data ) {
> >    $this->Post->set( $this->data );
> >    if( $this->Post->validates() ) {
> >       // some action here
> >    }
> >    else {
> >    // other action here
> >    }
> >    $this->set( 'check', $this->Post->validationErrors );
>
> > So when I see the variable "check" in my view, I can see the messages
> > I defined in my model. But I cannot see the error message below my
> > text fields in the view. Why is that? What am I doing wrong over here?
>
> > Thanks and Regards
> > ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Introducing VaM Cart - CakePHP Shopping Cart

2010-03-11 Thread Tiago N. Sampaio
Great job.
I was searching for a advanced example, and you give me xD.

Thank you very much!

Obs: Like others said, GPL is too bad to use.
If you realy want to your project be free, use a realy open licence like
BSD.


Em Qua, 2010-03-10 às 10:25 -0800, VaM escreveu:
> VaM Cart - Free, Open Source CakePHP Based Shopping Cart.
> 
> Official Site - http://vamcart.com/ Online Demo - http://vamcart.com/demo/
> Admin: http://vamcart.com/demo/admin/
> Login: admin
> Password: password
> 
> * Easy Installation.
> * CSS, JS minify and compress.
> * SEO - Search Engine Optimization.
> * Unlimited Categories, Products.
> * CakePHP, MVC, Smarty.
> * Multi Language, Multi Currency.
> * Templatable.
> * Open Source.
> * Automatic Image Resize.
> * Product Reviews.
> * Coupons...
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en


signature.asc
Description: Esta é uma parte de mensagem assinada digitalmente


Re: Concept of seamless registration

2010-03-11 Thread Yura Linnyk
Authorizing link work once only and are limited in time.
Brute force won't success on tokens of this length, esp. as I set a
limit for accessing them.
An attacker with a similar success could try to find token of a valid
cookie at any website.
And why would you forward your authorizing link? It's like emailing
your password to someone else.

Anything I miss?


On Mar 11, 7:28 am, Zaky Katalan-Ezra  wrote:
> You give access to whom ever have the link from the email.
> If I forward this mail to some one else you  still recognize him as me.
> If you use authorizing links like 
> thishttp://WhenDidYouLast.com/OIHOIUE9009OI8KHHHEF/
> to identify your users it's possible to scan for url's like this ad probably
> find one that work.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Data Validation Errors not displaying!!!

2010-03-11 Thread euromark
always use $form->input()
this will make a lot for u automatically


On 11 Mrz., 11:19, SeeVik  wrote:
> Hello all
>
> I am using cakephp 1.2 and I am having problem in displaying the error
> messages for the data validation of a form. I created the form like
> this
>
> create( 'Posts', array( 'action' => 'index' ) ); ?>
> text( 'text' ); ?>
> text( 'value' ); ?>
> end( 'Submit' ); ?>
>
> In my model Post.php
>
> I have defined $validate like this
>
> $validate = array(
>  'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
> needed' ),
>  'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
> needed' )
> );
>
> In my PostsController.php I did the validation like this...
>
> function index() {
>  if( $this->data ) {
>    $this->Post->set( $this->data );
>    if( $this->Post->validates() ) {
>       // some action here
>    }
>    else {
>    // other action here
>    }
>    $this->set( 'check', $this->Post->validationErrors );
>
> So when I see the variable "check" in my view, I can see the messages
> I defined in my model. But I cannot see the error message below my
> text fields in the view. Why is that? What am I doing wrong over here?
>
> Thanks and Regards
> ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Data Validation Errors not displaying!!!

2010-03-11 Thread SeeVik
Hello all

I am using cakephp 1.2 and I am having problem in displaying the error
messages for the data validation of a form. I created the form like
this

create( 'Posts', array( 'action' => 'index' ) ); ?>
text( 'text' ); ?>
text( 'value' ); ?>
end( 'Submit' ); ?>

In my model Post.php

I have defined $validate like this

$validate = array(
 'text' => array( 'rule' => 'notEmpty', 'message' => 'This is
needed' ),
 'value' => array( 'rule' => 'notEmpty', 'message' => 'This is
needed' )
);

In my PostsController.php I did the validation like this...


function index() {
 if( $this->data ) {
   $this->Post->set( $this->data );
   if( $this->Post->validates() ) {
  // some action here
   }
   else {
   // other action here
   }
   $this->set( 'check', $this->Post->validationErrors );

So when I see the variable "check" in my view, I can see the messages
I defined in my model. But I cannot see the error message below my
text fields in the view. Why is that? What am I doing wrong over here?

Thanks and Regards
ShiVik

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Searchable behavior on two models

2010-03-11 Thread Delberto
Sorry, here is the link -->
http://code.google.com/p/searchable-behaviour-for-cakephp/issues/detail?id=19


On Mar 10, 4:16 pm, Foroct  wrote:
> Well it looks like this behaviour can't successfully index two
> different models. Moving back to an old fashioned 'find'.
>
> Thanks all.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Searchable behavior on two models

2010-03-11 Thread Delberto
If you are talking about saving to more than one model with a saveAll
there is a patch here. I haven't tried it myself but you can check it
out

On Mar 10, 4:16 pm, Foroct  wrote:
> Well it looks like this behaviour can't successfully index two
> different models. Moving back to an old fashioned 'find'.
>
> Thanks all.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-11 Thread mark
On 6 Mar, 21:58, mark  wrote:
> Hi,
>
> I have a cakephp app that has started to throw a Fatal Memory
> allocation error. Strangely it only happens on the production server
> (Cpanel, php 5.2.12) but not on either dev machines (php 5.2.11). This
> is with CakePHP version 1.2.4.8284.
>
> It has only started recently, nothing in the script changed so I
> suspect it is a change to the hosting server, but I haven't traced it
> yet.
>
> The error comes right at the end of the script, after the  so
> looks like it might be related to cleanup.
> They all look like this, although some of the numbers change slightly:
>
>         Fatal error: Allowed memory size of 67108864 bytes exhausted
> (tried to allocate 432212624 bytes) in Unknown on line 0
>
> The server has a hard memory_limit of 64MB, so the memory_limit 128MB
> in app/webroot/test.php is ignored.
>
> I have no idea how to track this down and would be grateful for some
> suggestions.
>
> What I find very strange is that CakePHP should be trying to allocate
> 432MB as it is cleaning up and closing down. Seems very odd to me.
> Just increasing memory_limit is not possible (hard limit on server)
> and cannot be right as that would just cover something that surely
> shouldn't be happening.
>
> Thanks for your help
>
> Mark

No suggestions so far on this. Would more/other information be useful?

Thanks

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en