Thanks for explaining. Looks like something I will need to spend some
time with soon :)
On Apr 24, 7:01 pm, brian wrote:
> On Fri, Apr 24, 2009 at 11:10 AM, Martin Westin
>
> wrote:
>
> > Views, I haven't got my head into yet but it sounds like I probably
> > should :)
>
> Views can make a big
As you say this varies greatly with each application and the hardware
setup being measured.
Very generally, I'd say that is you can stay under 100ms for most
"normal" data. If you are over 100 and not doing statistical gathering
or have a very "saturated" database or something like that you can
p
I don't use saveAll much myself but oen thing you can look into is the
phrasing that explains what it does.
I remember reading that saveAll can save multiple records of a single
model OR one record and multiple related Models. I am not sure it ca
do both at the same time the way you are trying.
I
Hi,
I tried including $persistentModel = true as suggested here :
http://www.pseudocoder.com/archives/2009/03/17/8-ways-to-speed-up-cakephp-apps/comment-page-1/
Well it did increase the speed of my app (about 200%) but I'm
receiving this error when debug != 0
Catchable fatal error: Object of cl
Well done Brian!!
I saw it, but assumed that the missing action would default to
"login", so I didn't look further!
Good detective work! Enjoy,
John
On Apr 27, 6:38 pm, brian wrote:
> $this->Auth->loginAction = array('controller' => 'members');
>
> There's no action in that array. I suspect t
If your goal is to melt down your server's processors, then an
*infinite* loop might arguably be deemed an efficient solution ;-)
Anyway, you can use a shell for this and call the shell through cron.
On Mon, Apr 27, 2009 at 10:58 PM, gianpaulo wrote:
>
> Hi,
>
> I'm thinking of using cake shell
Assuming you have a "created" field:
$this->Post->find(
'all',
array(
'order' => array(
'Post.created' => 'DESC'
),
'limit' => 5
)
);
If you don't already have one, add it to your table as datetime
DE
Hi,
I'm thinking of using cake shell to send birthday greetings everyday
at a specific time. Is this the efficient way to do this? Well I'm
planning to do an infinite loop that will check for the people who's
birthday is the current date then sends them birthday greetings
through email. I'm also
Hello everyone.
I'm very new to cakephp.
I would like to show in a page my last 5 blog posts. I made a function
viewAll that shows all posts, but I don't know how can I show only the last
5 entries.
Any help would be appreciated! Thanks!
--
View this message in context:
http://www.nabble.co
I'm saving to one main table with several kind of relations by sending
all in a single array via Ajax (jQuery). One is a nested relation,
denouncements (main table) hasMany sections (other-model) which
hasMany section_parts (another-model). Sending to saveAll in a single
array i'm being able to sa
Well, actually I did a little more testing and setting $useTable =
false to my AppModel inherit it to all my models and cause all queries
to fail.
I guess I could explicitly specify a $useTable for each of my models
but it does not seem a good approach.
Maybe all of this is due to the special hi
Thanks, it does the trick.
I didn't thought of that, or to be clearer I thought that setting a
$useTable = false to my AppModel, it would inherit to all my models.
Guess I should have tested a little more.
Thanks, anyway
On 28 avr, 00:16, Miles J wrote:
> Add this in your model.
>
> var $useTa
The problem here is you're calling paginate(). That method calls
find() internally, and it didn't have your conditions. You want to use
one or the other. What you've done is assign the result of find() to
$songs, then set the *view* var $songs to the result of paginate().
If you'd prefer to pagin
Works beautifully Brian... now if it's not much of a bother, how would
this Auth.User.id method translate to the other functions within my
songs controller, such as index, edit and view?
I tried adjusting the index function so it only shows the related
songs of the Auth User like this:
function
Thanks. It is only one feature per product.
I removed hasOne association from 'Product' table
I already have the foreign key in the 'Product' table 'feature_id' for
which I have hasOne association in the 'Feature' table.
I still get the same error:
$sql= "SELECT `Feature1`.`id`, `Fea
Just wondering what the general feel is for acceptable query times? What is
too high? What's a good range to try to stick to? I know it will differ per
application but just want to see what people use as a general practice.
Thanks,
Dave
--~--~-~--~~~---~--~~
Yo
I have a workaround using a cookie to solve the loss of the session but I
still have not implemented anything to automagically redirect the user back
to non-SSL requests. I am looking for an elegant solution if anybody out
there has one.
-- Andrew
On Mon, Apr 27, 2009 at 4:25 PM, Firas wrote:
>
Add this in your model.
var $useTable = false;
--~--~-~--~~~---~--~~
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 emai
Hello all!
Does Cake support Oracle stored procedures? I found Ticket #3163 (2
years old) in trac but did not see anything in dbo_oracle... Is
calling Oracle stored procedures that return a result set supported?
Thanks!
Shawn
Trac: https://trac.cakephp.org/ticket/3163
Oracle stored procedures
Hello,
I had today to iterate through the full list of models of my app and
instantiate them on the fly, and I were hit by a little problem. When
trying to load a model (using Controller::loadModel or
ClassRegistry::init) that is not linked to a table in the database
(like AppModel for example) I
I want to join you in asking this question.
I'm not familiar with other posts, but I think that this is related to
the fact that session cookies created under SSL are only retrieved
when the client logs back in in SSL. In other words the php session
(or cake) cookies have the "secure" parameter
That was the next step, I was just hoping someone here had seen this
problem before and had a solution already worked out, save me some
work.
On Apr 27, 11:15 am, brian wrote:
> I didn't expect that was the cause, but you never know. I just thought
> it looked a little odd.
>
> Perhaps you shoul
It looks to me like your associations should be:
Product:
var $hasOne = array(
'Feature' => array(
'className' => 'Feature',
'foreignKey' => 'product_id',
'dependent' => false
)
);
... or ...
Product:
var $hasMany = array(
You don't need to have the user ID in the form. Not unless you might
have an admin creating songs for another user. You can remove the
user_id hidden field and do this:
function add()
{
/* create var here so it's only read once but
* there's no need to set it for the view
And btw, I did find a way to give the browsers the css-files it needed
from tinyMCE, but then there were the images that're used in the css-
files which still didn't work.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
In this controller,
class TweetsController extends AppController {
var $name = 'Tweets';
var $helpers = array('Html', 'Form');
function index(){
$this->Twitter = ConnectionManager::getDataSource('twitter');
//$response = $this->Twitter->accou
Yes, I do have a user_id field in my Catalog table and this worked
perfectly once I add an extra ')' on the end. Thank you, thank you!
On Apr 27, 1:02 pm, Stu wrote:
> $catalogs = $this->Song->Catalog->find('list', array
> ('conditions'=> array('Catalog.user_id'=>$this->Session->read
> ('Auth.Us
Yeah, well that's the whole problem.
When I put tinyMCE in webroot is does work. But I need to put it
inside a plugin, and then it doesn't work.
Cause Cake won't allow css-files to be retrieved from /plugins/content/
vendors/js/...
And I don't know how to change the paths that tinyMCE uses.
--~--~
http://groups.google.com/group/cake-php/browse_thread/thread/863305f8a7267067
According to above advice I have tried below join in cakephp 1.2 but I
keep on getting below SQL error for external fields in my find('all')
call - Product.feature_id, Tag.id, etc..
SQL Error: 1054: Unknown column 'Pr
$catalogs = $this->Song->Catalog->find('list', array
('conditions'=> array('Catalog.user_id'=>$this->Session->read
('Auth.User.id')));
Just throwing it out there, I'm assuming you have a user_id field in
your Catalog table. Sorry if this doesn't applies.
Cheers
--~--~-~--~~-
$catalogs = $this->Song->Catalog->find('list', array
('Catalog.user_id'=>$this->Session->read('Auth.User.id'));
Just throwing it out there, I'm assuming you have a user_id field in
your Catalog table. Sorry if this doesn't applies.
Cheers
--~--~-~--~~~---~--~~
Yo
If you access a model, you have to use the model name which is
singular:
$usuarios = $this->Usuario->find('all');
Regards,
Michael
Pablo schrieb:
> I just installed cakephp and made my first model, controller and view.
> It seems that the controller can't find its model. Since it's a
> spanis
Try this
function index() {
//obtiene todos los ingredientes y los pasa a la vista:
$usuarios = $this->Usuario->find('all'); // wrong Model name
$this->set('usuarios', $usuarios);
}
On Apr 27, 7:44 pm, Pablo wrote:
> I just installed cakephp and made my first model,
I just installed cakephp and made my first model, controller and view.
It seems that the controller can't find its model. Since it's a
spanish name Usuarios, I tried different inflections and didnt work
out.
This is the code. It can't be simpler!
- UsuariosController.php
class U
Here is my add function for my song_conntroller:
function add() {
if (!empty($this->data)) {
$this->Song->create();
if ($this->Song->save($this->data)) {
$this->Session->setFlash(__('The Song has been
Sorry, I am assuming it is a similar method since the htlmlink for
"New Song" would need to contain the user_id for which I create a new
song record. Maybe this is just my old procedural way of thinking
hanging on here.
Am I assuming correctly that all these user id dependencies need to be
progra
Oh...I read right over that. Yes, I also placed mine in /app/webroot/
js/tiny_mce as rich...@home did.
On Apr 27, 12:12 pm, "rich...@home" wrote:
> I've got tinymce working in a cake app, but I didn't put the code in
>
> /app/plugins/content/vendors/j s/tiny_mce
>
> I put it in
>
> /app/webroot
OK, well that's different than adding the User.id to links. For what
you want to do, you need only add it to the conditions of your find.
There's no need for it to be in the link.
Ditto for editing a record: just check the session and compare it to
the user_id in your data. If it doesn't match, t
I didn't expect that was the cause, but you never know. I just thought
it looked a little odd.
Perhaps you should add a bunch of debugging statements to the behavior:
Debugger::log(...)
On Mon, Apr 27, 2009 at 12:37 PM, Arak Tai'Roth
wrote:
>
> Yea, that didn't help. I was pretty sure it wouldn
I basically want all my controller actions to be user specific once a
user is logged in. I'm getting close and these suggestions have been
very helpful.
The main task would be to assure that all related records that are
returned, found, added, etc, are tied to a specific user.id.
For instance, t
Debug Kit will make your page run slower. It adds a lot of extra code
to each page view. It adds a lot of HTML and several function calls
all over the place. However, it does not at this time interfere with
database queries.
Perhaps you should look into adding indexes on your foreign keys if
you
Yea, that didn't help. I was pretty sure it wouldn't, MeioUpload
doesn't actually require that you store filesize and mimetype, and I
have never done so because I've never needed that information.
On Apr 26, 10:47 am, brian wrote:
> Wait a sec. You have both banner and poster fields, so you have
A solution was found! (Thanks Martin)
By moving the cake core (cake/) and the application files (appname/)
to my home directory ~user/ and only have the files from appname/
webroot in ~user/public_html/ I got what I wanted.
But to make it work with the new file locations, I had to update
index.p
If I remember correctly, the ARO/ACO tables are not indexed by default
(this may have changed in later versions of cake).
On Apr 25, 10:08 pm, Miles J wrote:
> Make sure you have indexes set on your database.
--~--~-~--~~~---~--~~
You received this message because
I've got tinymce working in a cake app, but I didn't put the code in
/app/plugins/content/vendors/j s/tiny_mce
I put it in
/app/webroot/js/tiny_mce
On Apr 26, 3:49 pm, Evert wrote:
> When I create a link to tiny_mce.js the javascript file is found, no
> problems there.
> But when I initialize
The 1st param is for a string or array of field names. And the 2nd
takes an ID, which is pretty much the last word on conditions--there
can only be one. As for the contain, I suppose you'd need to unbind
whatever you don't want.
The other option is to just use find()
On Mon, Apr 27, 2009 at 11:0
Yes I went back a few saves, removed my debug statements from where I was
testing and then added it back to my app_controller and working fine.
Thanks,
Dave
-Original Message-
From: Stu [mailto:greenmushroo...@gmail.com]
Sent: April-27-09 1:08 PM
To: CakePHP
Subject: Re: Debug Ajax
$this->Auth->loginAction = array('controller' => 'members');
There's no action in that array. I suspect that Cake is treating your
register action as a login attempt. Looking at AuthComponent ...
Line 294:
$loginAction = Router::normalize($this->loginAction);
Router::normalize() will grab the m
A classic case of step retracing might solve this one:
- You said it worked before, try changing stuff back to when it did
work
- You have probably tried this, but try debugging outside your if
statement
ps: your code snips are identical, might of been intended but I still
get confused on what y
Are you using Auth? What's the route for this URL? This should work:
$html->link(
'edit profile',
array(
'controller' => 'users',
'action' => 'edit',
'user_id' => $session->read('Auth.User.id')
),
array('title' => 'wh
On Sun, Apr 26, 2009 at 5:25 PM, AGD wrote:
>
> Hi all
>
> I would like some help from you since i am recently starting to tast
> the cake.
>
> I am trying to create one page where there is an call to an API, and
> would like to store the result of that call for later processing into
> the DB.
>
Wondering if there is a way to use the same conditions, fields, contain in a
read()? So you can limit the tables returnng data?
if (empty($this->data)) {
$this->data = $this->User->read(null, $id);
}
Dave
--~--~-~--~~~---~--~~
You receiv
See my solution to an allmost identical problem:
http://groups.google.com/group/cake-php/browse_thread/thread/51aec944f860a708/89496a7d5f64542a?q=#89496a7d5f64542a
On Apr 27, 10:48 am, Telegu wrote:
> nobody can help me?
>
> On Apr 18, 4:02 pm, Telegu wrote:
>
> > yes to save my data correctl
Hello everybody,
I dont know if this helps but ...
I found that is missing some caracters on MAP array , like ã and õ
for the portuguese characters...
is there a reason for this, or cakephp development team just "forgot"
to include them.???
here is my new version...
$map = array(
Thanks for the response, but this still doesn't answer my question of
how to include this variable in a $htmlhelper link, mainly need to
know the syntax. thanks so much
On Apr 26, 10:36 pm, NegoBlack® wrote:
> I use to do this on my app_controller.php:
>
> public function beforeFilter(){
>
>
Having a nightmare of a time trying to retrieve posts by tag while
integrating wordpress.
Here is an outline of the wonderful wordpress schema:
wp_posts
ID
wp_term_relationships
object_id FK that references wp_posts.ID
term_taxonom
Can you post some of the code? It is hard to determine a solution to
your problem without seeing the code.
On Apr 26, 6:00 pm, Evert wrote:
> Please? Anybody?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePH
I have the Security component working and redirecting to my pages
using the sample code in the book.
function beforeFilter(){
$this->Security->blackHoleCallback = 'forceSSL';
$this->Security->requireSecure('login');
}
function forceSSL() {
Hi all
I would like some help from you since i am recently starting to tast
the cake.
I am trying to create one page where there is an call to an API, and
would like to store the result of that call for later processing into
the DB.
I've created one test page. In that page's controller i would
I've gotten TinyMCE working just fine in production use on a CakePHP
site, so I'm not entirely sure what the problem may be. To be honest,
I don't think it's a CakePHP issue. TinyMCE's CSS specific files are
a pain in the butt to get working - I've always had trouble with it
(and don't work with
So has anyone experienced the
cakephp auth component password field always empty problem at all ??
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to cake-php@goog
nobody can help me?
On Apr 18, 4:02 pm, Telegu wrote:
> yes to save my data correctly
>
> On Apr 18, 11:55 am, Miles J wrote:
>
> > Yes but why is your data structured that way? SaveAll()?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Did I get this right?
You are serving the website as www.mydomain.com not sharedhost.com/
~user/appname/ ?
If so, then you should do things slightly differently as the
RewriteBase will be / (root of mydomain.com).
I haven't installed in this way... ever (I think), so I don't want to
give any fur
What is missing is a property (variable) defined in the base
Controller class. Check if UsersController actually extends
AppController. Or even if your AppController (if you have one) extends
Controller.
/Martin
On Apr 26, 3:18 pm, Mike wrote:
> I've upgraded two cake apps from 1.2 beta to 1.2
Hi,
This is really strange. I can't figure this out at all.
I output converted image and video files but as soon as I output a
video I loose my session. Not so with images. Image files are often
larger than the videos (small 3sec 320x240 mp4) so it is not a timeout
of some kind.
show.ctp - does t
By adding
RewriteBase /~user/
I do get into some circular reference and the server responds with a
server configuration error. Cannot set DebugLog-level on server since
the application resides on a shared hosted environment.
- Jim
On 27 Apr, 02:54, Marcelo Andrade wrote:
> On Sun, Apr 26, 200
Is there any reason you wouldn't want to include this in your
application?
I assume that it will only gzip on browser that support it.
Why wouldn't this be just put in the core?
Sean
On Apr 27, 4:33 am, schneimi wrote:
> Hi Sridhar,
>
> I put the line in the AppController::beforeRender() and
67 matches
Mail list logo