Your problem is likely the cause of one of your .htaccess files not
set correctly. You probably need a rewrite base. If I get your setup
correctly (and I am not at all sure I do) you have the Apache document
root set to var/www and everything else if in sub-folders of that.
I can't really figure
http://www.mysqlperformanceblog.com/
I hope you have seen this blog? They have had a number of post lately
about indexes and always post about optimization in one way or the
other (funny enough).
If you have added indexes which did not improve much you may be
defining them wrong for the query
Hi John, thanks for your answer. I take your second advice and it
worked.
--~--~-~--~~~---~--~~
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
I was doing a test to see how my app runs under ssl and found that
Auth redirects me out of ssl. All other links and redirects appear to
work which is why I ask for help. It is surely some detail I have
missed since it can't be a bug in Auth or Router. Does anyone know
what I might be doing
http://www.mysqlperformanceblog.com/
very interesting. From reading
http://www.mysqlperformanceblog.com/2009/09/19/multi-column-indexes-vs-index-merge/
it would appear that for join tables, indexes with both keys would be
best, rather than a single key per column.
Good tip for the day that :)
Hi all,
the following problem manifests itself in both cake 1.2.4 and 1.2.5.
I have a requirement to pass an ID into the index action of a
controller that uses the cake paginator.
The url would look something like this http://server/path/controller/
index/135.
I can generate the url easily for
On further investigation, the following bit of code fixes this issue.
Please put it in the next release.
File cake/libs/view/helpers/paginator.php line 318 change from:
$url = array_merge(array('page' = $paging['page'] + ($which ==
'Prev' ? $step * -1 : $step)), $url);
to:
if (
The directory is app/controllers , not app/controller :)
On Tue, Sep 22, 2009 at 1:58 PM, Selva manickaraja mavle...@gmail.comwrote:
Hi,
I just got CakePhp up and running. To learn the functionality I created
sample php code. I followed the instruction in the book that I bought few
days
The class name should be ItemsController controller NOT ItemController
On Tue, Sep 22, 2009 at 7:58 AM, Selva manickaraja mavle...@gmail.comwrote:
Hi,
I just got CakePhp up and running. To learn the functionality I created
sample php code. I followed the instruction in the book that I bought
Hi,
I'm using the Ajax Helper for some fields in my app and it works
flawlessly from the backend side. The only problem is Internet
Explorer where the popup DIV is displayed totally dispositioned,
several pixels to the right and lower than it's displayed in Firefox,
Opera and any other browser.
If you are running your CakePHP app under Nginx, this might interest
you.
Cake relies on the php environment variable HTTPS (as in $_SERVER
['HTTPS']) for SSL to be considered by RequestHandler and
SecurityComponent.
This is a problem for anyone running nginx. HTTPS is not mentioned as
a
Is it possible to use multiple po files?
I have not started with localization yet, so I was wondering if it was
possible.
What we need is a general translation file, then one that contains all
the errors and another one that contains all the help text.
So my question is can I switch files
Of course you can!
__('textString'); // Uses default.po
__d('errors', 'textString'); // Uses errors.po
__d('help', 'textString'); // Uses help.po
On Sep 22, 8:00 am, Crazy crazy...@gmail.com wrote:
Is it possible to use multiple po files?
I have not started with localization yet, so I was
App::objects('model');
On Sep 21, 5:41 pm, brian bally.z...@gmail.com wrote:
I'd like to get--from a shell--the names of all models that are in
app/models dir (NOT Cake's models). I realise that I could scan the
dir and use Inflector and App:import(), but is there already some way
to do
Why don't you just set the component?
$this-Menu-data = $this-data;
Or within the component, grab the data from the controller.
function setup($Controller) {
$this-data = $Controller-data;
}
--~--~-~--~~~---~--~~
You received this message because you are
On 22 sep, 17:57, Selva manickaraja mavle...@gmail.com wrote:
Hi Guys,
Sorry, made a typo in the email. I did put the file in the correct directory
app/controllers and the class name is ItemsController. I'm attaching
screenshots of path to both class file and the class defined in each
Hi John, thanks for your answer. I've taken your second advice and it
worked.
--~--~-~--~~~---~--~~
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
Correct also your model class to Item, not Items! Singular in models,
plural in controllers.
Enjoy,
John
[snip]
2. Wrote a script called item.php and placed it in app\models directory to
define a class called Items.
[/snip]
--~--~-~--~~~---~--~~
You received
Ok, I tore my hair out over this for a while and then figured out an
easy solution. I just wanted to share it for others who run into the
same problem. And maybe somebody has an even better solution that I
overlooked.
Problem: Control accessibility to certain parts of a view or layout
using
hei list!
I was wondering if the i18n table is still state of the art for about
30 000 entrys (cities) in a model (=180 000 entrys in i18n).
Or is there a better solution like using a table prefix for different
languages (de_cities, en_cities,)?
thankYouVeryMuch
chris!
Hi
I was wondering if any of you could help me, I have been trying to
follow the tutorial in the book...
http://book.cakephp.org/view/641/Simple-Acl-controlled-Application
But I've run into some problems and its pecking my head lol. Is there
any chance one of you has a working copy of the
On Tue, Sep 22, 2009 at 12:33 PM, Miles J mileswjohn...@gmail.com wrote:
App::objects('model');
Nope. I think that's from an old version. You did jog my memory,
though. It's Configure::listObjects('model'). Thanks.
--~--~-~--~~~---~--~~
You received this
Use this in your view:
if ($session-read('Auth.User.whatever'))
{
...
Use debug($session-read('Auth')) to see what it looks like.
On Tue, Sep 22, 2009 at 12:19 PM, walkerfx st...@walkerfx.com wrote:
Ok, I tore my hair out over this for a while and then figured out an
easy solution. I just
Hmm... Maybe nobody can't understand me, but i show You:
My table 'tags' fields: id, name, foreign_key, model, created,
modified (table simlar to 'i18n'), and i want adding tags with some
content (add event, add post, add article, etc.) - this is simple, but
I want automatically fill in the
I'm trying to follow the structure of CakePHP but I don't know where
to put a utility function that I would like to call to filter certain
fields in more than one Model.
The utility function filters most HTML tags, but allows some safe ones
like b etc. and replaces newlines with br.
I want to
If calling from beforeSave(), the best place might be AppModel. If you
don't already have one of those, copy the file at
cake/libs/models/app_model.php to your app directory (not app/models)
and modify that. You would then call the function from within your own
model as $this-yourFunction(...).
Thank you, Brian. Sounds like an excellent suggestion! (Why didn't I
think of that?)
On Sep 22, 4:54 pm, brian bally.z...@gmail.com wrote:
If calling from beforeSave(), the best place might be AppModel. If you
don't already have one of those, copy the file at
cake/libs/models/app_model.php to
Use TagBehavior. It does exactly that.
http://bakery.cakephp.org/articles/view/simple-tagging-behavior
On Tue, Sep 22, 2009 at 4:28 PM, kicaj ki...@kdev.pl wrote:
Hmm... Maybe nobody can't understand me, but i show You:
My table 'tags' fields: id, name, foreign_key, model, created,
Hi everybody, this ones been doing my head in for some time now, hope
you can help me out, im sure its very simple but i just cant get it
working. Firstly the table structure is like this:
CREATE TABLE pil (
id int(11) unsigned NOT NULL auto_increment primary key,
user_id int(11)
The first param for find() should be one of 'first', 'all', 'list', etc.
But, if all you want is a single value, use field():
function newpil() {
$pilid = $this-Pil-field(
'pilid',
array(
'Pil.user_id' =
Well no its actually not, Configure::listObjects('model') calls
App::objects('model') internally though.
But I forget which one will be deprecated :P
On Sep 22, 12:45 pm, brian bally.z...@gmail.com wrote:
On Tue, Sep 22, 2009 at 12:33 PM, Miles J mileswjohn...@gmail.com wrote:
Hi kdubya,
I'm trying to follow the structure of CakePHP but I don't know where
to put a utility function that I would like to call to filter certain
fields in more than one Model.
The utility function filters most HTML tags, but allows some safe ones
like b etc. and replaces newlines with
Thanks for the response. Basically its a bit like a shopping cart. I
need a primary key just to keep each entry into the Product Inquiry
List seperate, for example some of the lines i have in the database at
the moment are:
ID | User ID |Pilid|pcode| quantity | ...
13
I've been working on trying to optimize my code for a client before we
decide to throw more hardware at the problem. One thing that I have
noticed is the way that COUNT(*) queries are generated for pagination
where the controller FIND method includes a JOIN table. For example
here's one of the
You can unbind the referenced table before you run your query and it will
not be included...
http://book.cakephp.org/view/78/Associations-Linking-Models-Together
http://book.cakephp.org/view/78/Associations-Linking-Models-Together
// This fetches Leaders, and their associated Followers
Thanks for the reply Dave. I should have been more clear. I still need
the JOIN to happen on the data returned but the JOIN should not happen
on the paginator's COUNT(*) query. Seems to be adding overhead that is
not necessary since the left join will not affect the count returned
by that query.
Not sure how you would edit the query for that, but you can create
your own paginationCount() method and rewrite the conditions and call
the parent.
http://book.cakephp.org/view/249/Custom-Query-Pagination
--~--~-~--~~~---~--~~
You received this message because
Thanks Miles. I was avoiding having to do that but I guess that's the
only approach right now.
I'm actually in the middle of testing if this is a Cake issue or
something weird in my custom App Model. I will report back if the same
issue occurs in a default Cake install. If that's the case, maybe
On 09/22/2009 07:30 PM, Steppio wrote:
Thanks for the response. Basically its a bit like a shopping cart. I
need a primary key just to keep each entry into the Product Inquiry
List seperate, for example some of the lines i have in the database at
the moment are:
ID | User ID |
I am trying to use an element inside a foreach loop.
I have the same code in 3 places and figured it would be easier to put the
duplicated code into an element and just render the 1 where needed.
I put the element inside the foreach because the $award is is different how
it is obtained, its not
That's because the element relies on $viewVars. $award is outside the
element's scope because you created it in your view. At least, I
believe that's the case. Do this instead:
echo $this-element('users/block_awards', array('award' = $award));
That should pass your var to the element.
On Tue,
Right on thanks.
Found it too after doing a little digging in the cookbook.
Thanks again,
Dave
-Original Message-
From: brian [mailto:bally.z...@gmail.com]
Sent: September-22-09 10:44 PM
To: cake-php@googlegroups.com
Subject: Re: Element question
That's because the element relies
Yes, I had corrected that all the first time I sent the email. According to
the book tutorial, I should be getting the view. But I am still stuck with
the error message Missing Controller. Could it be environment setup? Please
advice
Thank you.
On Wed, Sep 23, 2009 at 1:17 AM, John Andersen
Thanks for the response. As you say, the setup was overly
complicated, and going back to square one certainly helped. I had
followed advice (as I read it, anyway) from the an article on the
bakery and moved webroot/index down a level into app, which just
confused the situation even if it was
Hi everyone!
I had a running simple application in wich you were able to see images
in an image gallery. The problem started when I tried to add a Thumb
image. I changed the model in my database by adding a new column
'thumb_url' so I could save the thumb address of an image. The thing
is that I
Hello everyone!
I'm having a problem here.
I have a table Pages, which belongsTo Categories. I'm using an ordenable
behaviour, and so both pages and categories have a field called index.
Problem is, in my pages_controller, i wrote this:
var $paginate = array ('order' = 'index');
And as
Well, problem solved...don't know if I did it the right way, though...
Since the variable I was trying to use in my component was an array of data
from a table, I had to import the model in the component using:
$Category = ClassRegistry::init('Category');
So I set the array
Did you try like:
var $paginate = array ('order' = 'Pages.index');
Andras Kende
On Sep 23, 2009, at 12:33 AM, mig_akira wrote:
Hello everyone!
I'm having a problem here.
I have a table Pages, which belongsTo Categories. I'm using an
ordenable
behaviour, and so both pages and
This is the error I get:
Missing Database Table
Error: Database table to_users for model ToUser was not found.
Here's the code that prompts it:
?php
class Mail extends AppModel {
var $actsAs = array('Containable');
var $name = 'Mail';
var $validate = array(
Try changing this line:
$this-data['new']['thumb_url'] = $thumb_url;).
into:
$this-data['YourModelNameHere']['thumb_url'] = $thumb_url;).
In case it doesn't change anything, please provide more information,
code (controller and model), table definitionsetc. so we have a chance
of
check your model User what is the table name that you have define in it.
--~--~-~--~~~---~--~~
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
Try this:
var $paginate = array ('order' = 'Page.index');
Lapinski
mig_akira wrote:
Hello everyone!
I'm having a problem here.
I have a table Pages, which belongsTo Categories. I'm using an ordenable
behaviour, and so both pages and categories have a field called index.
52 matches
Mail list logo