When getting a form from a user, it should be double checked in the
user's action logic.
A user could easily manipulate a form field to submit a new field to
the server, like id="4294967294", and stuck the users table. The user
could guess, of course, other field names, or see other forms/views
an
Point your heads up towards PHP6, leave standards but not too far.
Sometimes very stupid things can be done in the quest for standards..
On Jun 7, 5:14 am, Nate <[EMAIL PROTECTED]> wrote:
> So, we all love the simplicity and magic that Cake gives us. It's
> wonderful that we've even been able to
"Fear is the path to the dark side. Fear leads to anger. Anger leads
to hate. Hate leads to suffering."
Not that I'm hinting anything :D
On May 30, 12:13 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Thu, May 29, 2008 at 4:56 PM, [EMAIL PROTECTED]
>
> <[EMAIL PROTECTED]> wrote:
>
> > The
any experience with godaddy anyone?
i had some, wonder what was yours.
On Mar 26, 3:53 pm, Zoltan <[EMAIL PROTECTED]> wrote:
> Just wondering if anyone has a hosting company they'd recommend.
> I've personally hosted a few sites on DreamHost, speed is ok, but
> getting Cake sites up and running i
Use a normal editor..
http://www.scintilla.org is a good one.
There's an encoding called "UTF-Cookie", which doesn't save the BOM.
On Mar 24, 4:37 pm, MonkeyGirl <[EMAIL PROTECTED]> wrote:
> Hi.
>
> I'm probably missing something simple here, but a few weeks ago, my
> Cake app seemed to spontan
That attitude is the exact difference between ExtJS which is more
community-driven and Zend, which is cold and company-driven.
ExtJS succeeds because the community-force behind it drives it
forward, because people make tons of plugins. Because they don't need
a "bakery", they have a simple forum w
ickets, and
> belongs to one item.
>
> do bind: Deal hasMany Ticket, Deal belongsTo Item.
>
> HTH,
> - Dardo Sordi.
>
> On Jan 21, 2008 7:16 AM, phpjoy <[EMAIL PROTECTED]> wrote:
>
>
>
> > for some kind of reason, this didn't work:
> >
item.", then why you bind:
>
> $this->Ticket->bindModel(array('belongsTo' => array('Deal'
> =>array('foreignKey' => 'deal_id';
> $this->Ticket->bindModel(array('belongsTo' => array('Item'
&g
7;belongsTo' => array('Item' =>
> array('foreignKey' => 'item_id';
>
> it's a copy and paste error.
>
> HTH,
> - Dardo Sordi.
>
> On Jan 18, 2008 9:39 PM, phpjoy <[EMAIL PROTECTED]> wrote:
>
>
>
> > I wo
I wonder how I could make a simple query to work through bind(), and
not use a custom query.
I'm binding two models for a model:
$this->Ticket->bindModel(array('belongsTo' => array('Deal' =>
array('foreignKey' => 'deal_id';
$this->Ticket->bindModel(array('belongsTo' => array('Item' =>
array('
nate, someone could want to use other hashing methods and not the
default one.
i vote for enabling :)
and adding the last crypt component to cake :D
On Jan 18, 6:18 am, nate <[EMAIL PROTECTED]> wrote:
> No. Disabling password hashing is Evil with a capital "E". That's
> why I don't let you do
http://groups.google.com/group/cake-php/browse_thread/thread/610bc62336c1cb4b/2724fab26d98b9af?lnk=gst&q=validation+between#2724fab26d98b9af
working on a solution :)
phpjoy wrote:
> Hey all,
>
> I'm having some (probably stupid) validation error. The 'address'
Hey all,
I'm having some (probably stupid) validation error. The 'address'
field always invalidates, regardless of the number of chars.
I ought to add that it happens *only* on "update" (edit), the adding
works perfectly!
var $validate = array(
'firstname' => array('rule'
roller' => 'sections',
'action' => 'index', 'prefix' => Configure::read('Routing.admin')));
My old file was without the 'prefix' key. That fixed the problem. Any
ideas why?
On Nov 30, 12:59 pm, AD7six <[EMAIL PROTECTED]>
I'm experiencing a VERY weird auth problem, which is a very big
security risk for my application.
When I try to access a page in the admin section directly, I'm being
redirected to the login page.
When I try to do the same via an XHR call, the page is loaded!
Example:
When I try to access the UR
i overlooked that one, thank you
On Nov 9, 1:20 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 9, 9:46 am, phpjoy <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hey,
>
> > I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1.
>
> > My admin routing stoppe
Hey,
I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1.
My admin routing stopped working:
My old routing is: (in routes.php)
Router::connect('/admin/', array('controller' => 'backend_home',
'action'=> 'home', 'admin'=>1));
core.php:
Configure::write('Routing.admin', 'admin');
inside the contro
in my index.ctp I have the following code:
sort('Title', 'title');?>
sort('Layout Name', 'LayoutWidget.name');?
>
When I try to sort the table in the column 'title' it works like a
charm.
When I try to sort the Layout Name column, it works just for 'asc'.
When I want to click it again, the direct
Hey,
I have a weird slowness problem on my machine.
I use MySQL 5, PHP 5.2x. It's the xampp server installation.
I have a very weird problem, my cake page loads up super-slow.
I have a new computer, E6750 2g mem. 1 page takes about 3 seconds to
load.
On my old machine (2 ghz p4), everytime I lo
this->params['pass']
['direction'];
$this->paginate['options']['controller']='sections';
$this->paginate['options']['action']='view';
$this->paginate['options'][]=$this->
I have a URL calling a controller, and that controller is calling
ANOTHER controller by requestAction.
This is the URL I have:
http://localhost/admin/sections/view/175/page:1/sort:file/direction:asc
I send the parameters to the new controller, and everything but the
direction works fine.
When I
I remember I read somewhere that the HTML helper (and maybe pagination
one) are automatically loaded when CakePHP starts unless it's being
specifically told not to.
How can I remove the auto-loaded helpers?
Are there more stuff that are auto-loaded I should know about? :+)
--~--~-~--~--
Alrights, here are my errors:
1) I tried associating two models instead of 1.
2) Your remark on building web applications fast really helped me. I
waste about 5-10% of my time now optimizing these things, and now I
realize I shouldn't [maybe far later].
Again optimization..:
LoadModel takes more
I call for a model with bindmodel. Then I bind another model to that
model.
$this->controller->$model->Section->Layout->bindModel
Section binds Layout, and Layout binds TemplateLayout.
With recursive is set to 2 on the model Section, I get all the results
I need. The problem Is that I get extra f
Where can I find the differences between medium/high security in 1.2?
Auth started acting crazy with external links until I set the security
to medium instead of high..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
i'd go for a 4$ host (CHEAP) or install mysql/apache on your own
computer with the "xampp" server.
free hosts i saw are crap..
On Aug 10, 4:24 pm, tuiBR <[EMAIL PROTECTED]> wrote:
> Please,
>
> somebody knows webserver free that run cakephp ?
>
> tranks!
--~--~-~--~~~---
Just making sure.. :-)
Thank you.
By the way, I really enjoy your blog. It's a great piece of work.
On Aug 10, 2:05 pm, "Geoff Ford" <[EMAIL PROTECTED]> wrote:
> Nope size is not an issue here :)
>
> Geoff
>
> On 8/10/07, phpjoy <[EMAIL PROTECTED]>
the user.
Then I noticed that no sessionKey was set.. So I set the session's
key.
$this->Auth->sessionKey = 'AdminUser';
Now it works. I thought Cake does that for me. :-)
thanks a lot for your precious help!
On Aug 10, 1:53 pm, "Dr. Tarique Sani" <[EMAIL
everything.
i tried:
$this->Auth->authorize = '*';
and:
$this->Auth->authorize = 'controller';
both in the users controller and in the "production controller".
On Aug 10, 7:18 am, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> On
salt hashes, seed rnd() and the like to
> improve security.
>
> Geoff
> --http://lemoncake.wordpress.com
>
> On Aug 10, 2:39 pm, phpjoy <[EMAIL PROTECTED]> wrote:
>
> > After messing around a bit with the Auth component, I got to
> > "CAKE_SESSION_STRI
I setup the Auth component, and it's working great for the validation
stage.
If no session is found, it redirects to /admin/login/ just as it
should.
$this->Auth->userModel = 'AdminUser';
$this->Auth->loginAction='/' .CAKE_ADMIN .'/login/';
After I get validated (Goes to Users controller and Log
After messing around a bit with the Auth component, I got to
"CAKE_SESSION_STRING" for security usages.
I wonder which value it should hold.
I just put in random chars? is it an md5 value? other type of hashed
value? Should it have a number of chars?
--~--~-~--~~~---
Let's say I have a big site application, should I do these kind of
error checking after component/model loading:
loadComponent('AdminSiteTree');
if(!class_exists('AdminSiteTreeComponent'))
$this->cakeError('internalError', null);
What do you say? What do you do in your projects?
--~--~
le.
--
yossi
On Aug 7, 3:47 pm, "Pablo Viojo" <[EMAIL PROTECTED]> wrote:
> Dear phpjoy,
>
> What do you mean with id=1? better use an autoincrement field.
>
> And please sign your messages (at least a nickname)
>
> --
> Pablo Viojo
> [EMAIL PROTECTED]://pvioj
21 am, Geoff Ford <[EMAIL PROTECTED]> wrote:
> Put an id in - cake needs it to write the update statement. It
> doesn't have to be 'id', just use var $primaryKey = 'some field';
>
> Geoff
> --http://lemoncake.wordpress.com
>
> On Aug 7, 12:
i also wonder, where does this redirect happen in cake?
dispatcher? before?
class/method would be great :)
On Aug 7, 8:51 am, phpjoy <[EMAIL PROTECTED]> wrote:
> i have a table in my database that doesn't need an id, it's only 1 row
> stored in the DB.
>
> i want to e
i have a table in my database that doesn't need an id, it's only 1 row
stored in the DB.
i want to edit that row, and whenever i try to edit it -> i get thrown
to add.
http://localhost/admin/config/edit
redirects to
http://localhost/admin/config/add
and gives me this error:
Missing Method in Conf
no need to work hard:
google.com: php.net modules apache
http://il.php.net/apache [this was the first sub-result] (PHP: Apache-
specific Functions - Manual)
http://il.php.net/manual/en/function.apache-get-modules.php (after
reading the page..)
On Aug 2, 5:00 pm, "Sascha Fröhlich" <[EMAIL PROTEC
Are you sure summer 2008 is good for 1.2?
I assume that in summer 2008 there will be 2.0 alpha.. Which leads to
a beta soon after!
Which means you might want to release a the book for the 2.0 beta?
Not that I have any idea of the CakePHP timeline dates.. but you might
wanna consult the foundation
i think that he ment to use the bindmodel() instead of loading a new
model..
user->profile->func();
instead of
loadModel('user');
loadModel('profile');
i wondered what's the performance difference.
On Jul 30, 1:30 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> On Jul 29, 4:45 pm, housebolt <[EMAIL
housebolt, how slow is $uses?
i should treat 'loadModel()' with the same care ['stay away as much as
you can']?
how slow does it make the production software?
On Jul 29, 8:45 am, housebolt <[EMAIL PROTECTED]> wrote:
> It probably is your server. I ran a couple of apps on a godaddy shared
> serve
slap me and call me silly!
i actually left this and got back to the ticket a few days ago. my
mind DELETED the "=true".. i actually looked at the API before, twice.
silly me :)
thanks for pointing me!
On Jul 25, 4:29 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 25, 12:21
doesn't work.. i didn't get what's the second
parameter (unless it's the 'true' after the array..).
On Jul 19, 8:29 am, AD7six <[EMAIL PROTECTED]> wrote:
> On Jul 19, 6:17 am, phpjoy <[EMAIL PROTECTED]> wrote:
>
> > nobody has an idea how to make t
nobody has an idea how to make the pagination work with bindmodel
instead of static models?
On Jul 18, 12:06 am, phpjoy <[EMAIL PROTECTED]> wrote:
> https://trac.cakephp.org/ticket/2201
>
> regarding this trac ticket:
> Controller::paginate() bug with un/binding [patch includ
https://trac.cakephp.org/ticket/2201
regarding this trac ticket:
Controller::paginate() bug with un/binding [patch included]
it's not a bug, so how can i get the paginator to work with bindmodel
(or that's not possible?)
it works great if i use var $belongsTo in the model instead of
bindmodel.
that's great to know, "errors always use the default layouts". :)
didn't see it in the manual..
thanks a tons for the solution.
On Jul 16, 7:52 pm, rtconner <[EMAIL PROTECTED]> wrote:
> Ah.. phpjoy, I had the same problem. There is no easy solution so far
> a
no ideas?
it's a bug? the normal behavior is loading a default layout?
On Jul 14, 6:32 pm, phpjoy <[EMAIL PROTECTED]> wrote:
> it seems like it won't load a custom layout for me.
>
> at first, i didn't have in app/views/layouts the file "default.ctp",
&g
it seems like it won't load a custom layout for me.
at first, i didn't have in app/views/layouts the file "default.ctp",
and it loaded the default cakephp layout.
so i added default.ctp to my layouts directory, and it loaded it.
however i want a custom layout for my errors [from default.ctp], an
i figured out it's either apache or cakephp.. so wanted to make sure
it's not cake.
i'll setup a DB on a linux machine in the next few days to test it
out..
thanks
On Jul 7, 2:18 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> Felix had a similar issue last year
>
> http://www.thinkingphp.org/2006/11
i have a problem with an image i use.
i upload the image, and it's alright on the file system. perfect.
when i load up the image from the server, it's corrupted.
the file on the DISK is perfectly fine.
it's just displayed wrong through apache.. it's completely weird!
for example, after the upl
did you try:
$this->ModelName->recursive = 0;
in the model?
On Jul 1, 5:13 pm, Mech7 <[EMAIL PROTECTED]> wrote:
> UnbindModel does also not seem to work :(
>
> // Remove HABTM on tags and categories
> $this->Article->unbindModel(array('hasAndBelongsToMany' =>
> arr
when i try to validate a form's field that doesn't exist in the
database i get this error.
the validation works for fields that are in the database.
var $validate = array(
'imagedata' => array('No image uploaded.' => VALID_NOT_EMPTY),
);
that's the validation line
rge($allow, array('\\', ':') );
}
$clean = new Sanitize();
$messages = $clean->paranoid($messages, $allow);
that means no international chars can be put inside a message..
On Jun 29, 10:56 am, phpjoy <[EMAIL PROTECTED]> wrote:
&
hey,
if i try to use cakeError with an international char, it simply
ignores the information.
for example:
$this->cakeError('error', array(array('name' => 'PageNotFound',
'code'=>'404', 'message'=>'displayedmessage', 'base'=>$this->base)));
works like a charm..
while..
$this->cakeError('error'
> > array(array('rule' => 'ValidFunc', 'message'=>'message'))
> > > > > );
>
> > > > > On Jun 28, 5:32 am, francky06l <[EMAIL PROTECTED]> wrote:
>
> > > > > > I guess you can'
ahoy,
i have the following validation in a model:
var $validate = array(
'directory' => array('rule' => 'ValidFunc',
'message'=>'message')
);
function ValidFunc($value) {
$newvalue = 'new' .$value;
$value = $newvalue;
case 1: /*message=1*/ return false;
c
ugh the code is faster than loading
a function through requestAction?
On Jun 19, 12:03 pm, kabturek <[EMAIL PROTECTED]> wrote:
> yo can always try class_exists() ;)http://php.net/class_exists
>
> greets,
>
> On Jun 19, 11:22 am, phpjoy <[EMAIL PROTECTED]> wrote:
>
yep, that's exactly what i was asking.
thanks a lot!
so easy that i missed that. :-)
On Jun 19, 12:55 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Are you asking how you can have multiple assocations to the same
> foreign model? In that case just use unique association keys, ie:
>
> var $belongsTo
hey,
i have a table with 2 fields in it: muser and cuser.
cuser is the user that created the object, and muser is the user that
modified the object in the last time.
both should be loaded for the same object, for example:
$object['mAdminUser']['username']
$object['cAdminUser']['username']
or
$obj
be cool, and share your knowledge.
>
> BAKE ON!
>
> blog:http://www.MarianoIglesias.com.ar
>
> -Mensaje original-
> De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
> de phpjoy
> Enviado el: Lunes, 18 de Junio de 2007 11:06 a.m.
> Para: Cake PHP
> Asunto:
you gave an intresting idea.. maybe i'll simply loadcontroller and
then run the action and then call the view render myself from the
function.
i'll try and report back!
if that doesn't work i'll goto the router itself [something i try
avoid doing].
On Jun 18, 1:51 pm, Grant Cox <[EMAIL PROTECTED
what's the cakephp way to check whether a controller exists or not?
$this->set('product', $this->requestAction('/admin/product/',
array('return')));
if the controller isn't there, it shows an error message.
i haven't tried taking it to debug 0, i thought of using a function to
check.
thanks
-
yeah, that's obvious. i read the api and setup the select to work, i
just wonder why the bake didn't do that on his own..
thanks for youur answer.
On Jun 15, 4:12 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
> You have to set the $s from your controller
>
&g
hey,
i recently migrated to cake1.2, and i baked a project.
in the edit form, i had the following line:
$form->input('published', array('options' => $s));
the problem is that it doesn't work. it doesn't recognize $s.
Notice (8): Undefined variable: s [CORE\app\views\sections
\admin_edit.ctp, li
great to hear! i'd love to see a better gui for the bakery.. slimmer
gui, that is.
what's a "mock up"? :)
On Jun 3, 7:42 pm, gwoo <[EMAIL PROTECTED]> wrote:
> Suggestions are more than welcome. If you have an idea for better gui,
> put together a mock up and submit it as an enhancement to
> trac
hey all!
i have a little bakery GUI suggestion. for months i enter the bakery
and think "gee! that's quite annoying finding everything in the
bakery!", so i decided to share that now.
i really liked the old wiki gui, it was quite simple and easy to
access all of the tutorials there.
now when i w
i'm working with php5.
and nope, it still doesn't work..
function startup(&$controller) {
$this->controller = &$controller;
}
and in the component's function:
var_dump($this->controller);
either shows a bool TRUE if i set it up, or a null if i don't set it
up.
i
i think i'm missing something in my component, .. i can't seem to
access the controller from the component.
here's the component's code:
class PlacesComponent extends Object {
var $controller = true;
function startup(&$controller) {
$this->controller = $controlle
hey all,
is there a class in CakePHP for exporting/importing SQL calls?
backing up a server, etc?
exporting SQL to XML and XML to SQL?
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To p
27;ll see that accessing category.name and layout.name is just an array
away from the main result.
Still having problem? Print out to us the result of the steps above...
On 12/26/06, phpjoy <[EMAIL PROTECTED]> wrote:
>
>
> I have a controller, and I want to fetch information from tables
I have a controller, and I want to fetch information from tables.
With scaffold, it works wonderfully.. However I wanna load the
information smartly for my app.
These are my tables:
section:
id
name
field1
field2
layout_id
category_id
category:
id
name
field3
field4
field5
field6
layout:
id
na
great, gonna use this one!
for some kinda reason, i didn't take into consideration that you can
use var $components = array( 'Session' ); in a component..
sigh! :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "
the echo was for fast-debugging,
usually i use the $_GET, i should switch to
$this->params['url']['section'] for standarization.. right?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
I have this code for my app, and I need to put it in a few controllers.
I wonder where I can put it, so I could call it from the controllers.
loadModel('Section');
$Section =& new Section;
$this->Section =& new Section;
$this->Section->id = $this->params['url']['section'];
$section = $this->Sec
hey guys,
i need to check whether an ID exists in another model or not.
i wonder which is the correct way to do that:
1) calling a request action, or
2) loading the model itself and making the operation.
1)
if($this->requestAction('/admin/sections/exists/' .$_GET['section'])) {
echo 'E
if i have a created field and a modified field, will both of them be
updated everytime?
for example:
add()/edit() - DB fields modified and created will be changed.
or:
add() - only the field "created" will be changed.
edit() - only the field "modified" will be changed.
and can you control it s
i know you have to use something in addition for the native HTML, but i
wondered whether cakephp provides that or not..
i thought of adding an onclick, and javascript at the start of the file
- as i normally do.
--~--~-~--~~~---~--~~
You received this message be
hey guys,
how do you limit and check the textareas?
do you make javascripts for that?
kinda new to cakephp.
yossi
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cake PHP" group.
To post to this group, send ema
78 matches
Mail list logo