In a mid-size app I just upgraded from 1.1.19 to 1.2 beta, I am
running out of memory (the 8M PHP limit).
This is occuring on searches which return more than 10-15 products.
The results returned by the search are only around 300Kb, so it
doesn't seem like the search results themselves are what i
I have two models:
class Store extends AppModel
{
var $name = 'Store';
var $belongsTo = array('Storeregion');
}
class Storeregion extends AppModel
{
var $name = 'Storeregion';
var $hasMany = 'Store';
}
A region can have many stores. Here is an example:
Array
(
[
Don't use $uses, ever. It is terrible for performance.
Always access models through their associations, ie. $this->model1-
>model2->find();
If you don't have any associations to the model you want, use the
following before accessing your model:
App::import('Model', 'Product');
$tmpProduct = new
http://cake.insertdesignhere.com/posts/view/8
On Feb 2, 11:49 pm, Action <[EMAIL PROTECTED]> wrote:
> Is there any documentation on how RSS feeds are created in 1.2? I just
> need to see an example, but I can't seem to find one anywhere...
--~--~-~--~~~---~--~~
You
Is there any documentation on how RSS feeds are created in 1.2? I just
need to see an example, but I can't seem to find one anywhere...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this
Let me know if it works, i'm curious myself.
On Feb 1, 5:58 am, Paolo <[EMAIL PROTECTED]> wrote:
> Thank you very much, I'll try that.
>
> On 31 Gen, 06:29, brian_gaff <[EMAIL PROTECTED]> wrote:
>
> > Now that I think about it, it's a little harder.
>
> > Firstly, if you're storing your session
Anupom has already told you the correct way to do it; however, if you
really really want to do it like:
$this->Category->find();
Then you need to add this line to the top of your Products controller:
var $uses = array('Product', 'Category');
BRIAN
On Feb 1, 11:47 pm, Rgarg <[EMAIL PROTECTE
Try this
$this->set('data', $this->Product->Category->findAllThreaded(null, null,
'parent_id'));
$CategoryArray =
$this->Product->Category->generateList(null, 'parent_id');
$this->set('CategoryArray', $CategoryArray);
On Feb 2, 2008 1:47 PM, Rgarg <[EMAIL PROTECTED]> wrote:
I haven't had much success with the normal tools out there, with more than
stripping whitespace. I guess all those $this->set's don't really like
getting encoded.
On Feb 2, 2008 1:10 AM, rayhan <[EMAIL PROTECTED]> wrote:
>
> Dear expart,
>
>I am looking fo a source code encoder for my CakePHP
Maybe if you post some of the code, someone will have some
suggestions.
--~--~-~--~~~---~--~~
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
Neil - you're right on, put that logic in the model, that way it can
be reused if you need it elsewhere and changed in one place.
On Feb 2, 9:53 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On Feb 2, 2008 9:35 PM, Neil <[EMAIL PROTECTED]> wrote:
>
>
>
> > I want to count some data from my
thanks for the suggestions.
I tried to handle the comment validation in my Post model however this
does not work. It simply ignore all the validation rules.
When I handle validation in the Comment model everything works, it
just does not show the errors.
any other suggestions?
On Feb 2, 10:39 a
Thanks!
I figured it was in the code somewhere but I only looked in the cake
folder, rather than the app folder. Finally I can keep going on
figuring out this ACL stuff.
David
On Feb 2, 4:23 pm, "Sam Sherlock" <[EMAIL PROTECTED]> wrote:
> check inside the config/sql/
>
> for db_acl.sql
>
> run
'verufy' => array(
'rule' => array('identicalFields', 'password'),
'message' => 'Passwords must match'
)
after the validate array have this:
/*function to make sure that 2 entered fields are identical*/
function
I've found the solution to this:
You must build the models and controllers for 'parent' tables (those
that haveMany) before you build their childrens controllers.
On Feb 3, 12:08 am, "Doug @ Straw Dogs" <[EMAIL PROTECTED]>
wrote:
> On Cake 1.2 beta::
>
> When I bake a controller that has belongs
check inside the config/sql/
for db_acl.sql
run that through phpmyadmin
On 02/02/2008, david_setwise <[EMAIL PROTECTED]> wrote:
>
>
> Hi bakers,
>
> I do not have access to the console because I am working in a shared
> environment. I am sure others have this issue. Can someone please
> post t
On Cake 1.2 beta::
When I bake a controller that has belongsTo associations I get a
segmentation fault. This gets printed to the screen after asking the
creation questions. Specifically "Would you like to create the
methods for admin routing".
Any ideas? :(
--~--~-~--~~--
Hi bakers,
I do not have access to the console because I am working in a shared
environment. I am sure others have this issue. Can someone please
post the SQL to create the three ACL tables for v1.2?
Thanks, David
--~--~-~--~~~---~--~~
You received this message
On Feb 2, 4:22 pm, "Doug @ Straw Dogs" <[EMAIL PROTECTED]> wrote:
> I'm having loads of problems using bake in 1.2 beta. The above error
> ("Fatal error: Call to a member function schema() on a non-object")
> occurs when I attempt to bake a view for my tables called "apps".
>
> It has multiple
On Feb 2, 7:24 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> In a shell the SERVER_NAME environment variable isn't set, so if
> DATABASE_CONFIG relies on it then the connection won't be made.
How enlightening ;). So regarding the answer to my question (of why
you were relying on the host
instead of http://localhost try http://localhost/
On Feb 2, 6:41 am, "David H. Trang" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm currently new to CakePHP and PHP in general.
>
> I currently have Apache , PostGres, PHP set up and working correctly.
> I also have CakePHP setup and working correctly b
In a shell the SERVER_NAME environment variable isn't set, so if
DATABASE_CONFIG relies on it then the connection won't be made.
On Feb 2, 4:25 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Feb 2, 10:04 am, "[EMAIL PROTECTED]"
>
> <[EMAIL PROTECTED]> wrote:
> > My solution is to abandon the DATABASE
Make your own layout and named it default.thtml the put it in the
views/layout folder.
Hope this will solve your problem.
On Feb 2, 2008 12:25 AM, Feris Thia <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I try to add missing_layout.ctp and succeed to display the replacement
> for error messages. Th
On Feb 2, 2008 9:35 PM, Neil <[EMAIL PROTECTED]> wrote:
>
> I want to count some data from my database and then display the amount
> in my view.
> From reading the manual I would think the proper MVC was would be to
> make a function in my Model that counts the records in the field and
> then use
I want to count some data from my database and then display the amount
in my view.
>From reading the manual I would think the proper MVC was would be to
make a function in my Model that counts the records in the field and
then use the controller to send the result of that Model function to
my view
Neil -
I am new Cake user, but I was able to get validation working with
forms for different models.
By setting the error messages in the model. Here's a snip from my
User model:
'city' => array(
'required' => array(
'rule' =
This is on version 1.1 - the currently available stable download.
The pattern appears to be:
Any table of two words like "widget_types" or "incoming_calls" fails
to bake views with fields.
Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are
I'm having loads of problems using bake in 1.2 beta. The above error
("Fatal error: Call to a member function schema() on a non-object")
occurs when I attempt to bake a view for my tables called "apps".
It has multiple relationships to other tables. Mainly "hasMany"
relationships.
I've created
On Feb 2, 10:04 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> My solution is to abandon the DATABASE_CONFIG constructor logic that
> uses HTTP_SERVER. Instead I'm doing svn ignore on database.php and
> changing the values in the three different installations.
I'm curious to know what one
I have a client who has a select element and a requirement that the
user actually make a selection from the drop down list of options. I
checked the form->select part of the API and there is no 'error'
option as there is for say the input element. How do I take advantage
of the 1.2 validation capa
Nik we have been using your behavior and were getting errors when
going through
foreach($this->model->_schema->value as $key => $value) { ... }
it appeared $this->model->_schema->value is not a valid array (did not
exist for us), we removed the "->value" part and it worked just fine.
Thanks a lo
I have found similar infinite recursion problems anytime there is a
php notice thrown. I've been able to work around it by disabling the
debugger from handling phps error handling
I put
define("DISABLE_DEFAULT_ERROR_HANDLING", true);
temporarily in debugger.php until this is fixed but you could
Dear expart,
I am looking fo a source code encoder for my CakePHP application.
Please help me on this topic.
Sincerely,
Md. Rayhan Chowdhury
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" gro
Hello,
I needed to use flash files in my site, so i wrote the following
function:
function flash($path, $name, $width, $height, $scale = "exactfit",
$wmode = "transparent"){
if (is_array($path)) {
$path = Router::url($path);
} elseif ($path{0} === '/') {
I'm having problems with my index.php. I have not touched it at all
but everytime I go to http://localhost it gives me the directory of
files instead of just opening index.php for me. Is there something in
the httpd.conf that I'm forgetting to edit? I have changed so that
DocumentIndex is index.ht
Hi,
I'm currently new to CakePHP and PHP in general.
I currently have Apache , PostGres, PHP set up and working correctly.
I also have CakePHP setup and working correctly but for some reason
when I try to go to http://localhost I see my directory instead of it
going to index.php. I have changed
Hi, im new at this group and also kind of new using cakePHP, im having
a problem with an app im working on with multiple schemas.
Now, in this app there are tables relations between schemas, at first
i thought i could use a different connection for each schema, but
that didn't work.
I found in
My solution is to abandon the DATABASE_CONFIG constructor logic that
uses HTTP_SERVER. Instead I'm doing svn ignore on database.php and
changing the values in the three different installations.
On Feb 2, 2:26 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Anyone know how to do this? I'm cur
Anyone know how to do this? I'm currently determining the database
connection with a DATABASE_CONFIG constructor based on the host name
and need an explicit way to set it with the 'cake' shell startup
command since DATABASE_CONFIG won't have access to
env('HTTP_SERVER').
I envision it looking lik
39 matches
Mail list logo