You should be aware that this doesn't protect the files themselves in
any way. If a user knows, or can guess, the name of a file that exists
within that directory they can still browse directly to it.
On Feb 22, 8:23 am, "bingo" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Thanks for all your reply. I th
Hello,
how to make *all* possible errors to render to the only view error404?
I mean errors like:
*missing controller
*missing action
and so on... It's 15 different error pages. I want only one.
Thank you.
--~--~-~--~~~---~--~~
You received this message because
lol, mine seem to and I think thats a little hard headed to think that
no one will ever use an id of 0. It was a simple fix to. just changed
bake.php to error check ids with !isset($id) instead of !$db
On Mar 7, 8:42 pm, "Walker Hamilton" <[EMAIL PROTECTED]> wrote:
> > Should I report it?
>
> no
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> some quotes: "I hardly understand this decision of the Cake Software
> Fondation." or even "Grrr I would like to kick the ass of the "someone
> who didn't like the idea...""
Hmmm.. may be I am a bit thick skinned but I would categorize bot
> Should I report it?
no.
no db I know of defaults to starting an auto_inc field with 0
--~--~-~--~~~---~--~~
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.c
I have found a flaw with bake.php when building controllers. If you
view a page it runs
if(!$id) {
$this->flash('Invalid Pg Controllers Pg Action',
array('action'=>'index'));
}
This mean that is the id is 0 it will show the error.
I am using version cake_1.2.0.4451alpha
On 3/8/07, squidliberty <[EMAIL PROTECTED]> wrote:
> How should I be handling this? My best solution was to create a
> fixSafeChar() function to convert the hyphens back. But this seems
> pretty crude.
Thats what I have done as well...
However, the problem is usually in the URLs and emails - a b
Hey Y'all,
We're putting together an official CakePHP FAQ. So add your
recommended frequently asked questions (and answers) here:
https://trac.cakephp.org/ticket/1576
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
thanks Grant, are what wanted to know
--~--~-~--~~~---~--~~
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 from this group, send email to [E
maybe this patch is causing the problem
http://bakery.cakephp.org/articles/view/56
(hosting admin url on subdomains)
j
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send
Idea is simple:
Use $this->query() to make custom sql queries. Don't mess with
findAll() if you need something complex with grouping, having, cases
and so on.
On 7 мар, 23:49, "Aldo" <[EMAIL PROTECTED]> wrote:
> Just to clarify, I added the debugger message:
>
> Generated query from cake:
--
SQLite support is only available for PHP5, and you have to make sure
PHP is installed with it. See here: http://php.net/sqlite
On Mar 7, 6:13 pm, "AzenAlex" <[EMAIL PROTECTED]> wrote:
> Does cakephp support SQLite? I'm getting the impression it does
> however i've had no luck using it. my databa
STOP SPAMMING Please. We got 4 messages with the same content, and different
subject. One time is enough.
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share you
Does cakephp support SQLite? I'm getting the impression it does
however i've had no luck using it. my database.php is set up as
follows:
var $default = array('driver'=>'sqlite',
'connect'=>'sqlite_open',
'database'=>'test.db');
and i'm ge
True..
Although.. if i were to display 10 users on my front page, cake needs
31 queries.. all that can be done with just one query.
Not to mention that i also have a "Photos" table.. that ads 10 more
queries. So 41 vs. 1.. that is quite a big difference :)
I think i'll try to use some hacks in a
Does cakephp support SQLite? I'm getting the impression it does
however i've had no luck using it. my database.php is set up as
follows:
var $default = array('driver'=>'sqlite',
'connect'=>'sqlite_open',
'database'=>'test.db');
and i'm ge
I have several areas of my site where it is necessary to sanitize
large amounts of user form data. cleanArray() makes this process a
breeze - however, I have found that it replaces hyphens ('-') with the
htmlentity equivalent ('-'). This is a big problem for email
addresses, which may contain hyph
I've worked a bit more on my problem since my last post. I am now able
to save my entry, get its ID and then call $this->Entry->Screenshot-
>save($this->data); Then I use the beforeSave callback in my
Screenshot model to check and move the file. If that succeeds I allow
the data to be saved to the
Hi woody,
after you mentioned i looked into the named parameter option. Till now
I was using the order to get parameters. However the problem still
persist. I don't see how it can solve the problem. The problem is that
using the bookmarklet, the user is directed to a web form..but if he
is not re
Nice one Woody, I hadn't thought of named params (have not used them in
Cake myself, so it never occurred to me). I just saw them mentioned in
another post before which is the first time I have come across them.
That sounds like the solution to this problem all right.
Regards,
Langdon
the_w
Since that ticket has been marked as an Enhancement, it will be
implemented by the developers when they are ready to do so. This may
not be in the next month, the next release, or even at all. You have
attached the diff to the ticket, and that's really all you can do. In
the meantime, just have
I believe you can set cookies based on the URL path, i.e a cookie for /
path1 differs from that for /path2, but I don´t know of any ´per window
´ facility, and if it can be done I´d imagine you´d have to use
javascript.
I agree with the above post that your layout may need to be the first
paramet
Yes, the file is in the cake/app/controllers/ dir.
Here is the code for the posts_controller.php:
class PostsController extends AppController
{
var $name = 'Posts';
function index()
{
$this->set('posts', $this->Post->findAll());
}
function view($id = null)
{
Awesome! I decided to use the Session controller as it seems to work
the best for me since the user has to be logged in (in the future) to
be able to perform these functions. It works now. Had a slight
problem with the zip file format for some reason. If I name the file
with a date and/or time
On Mar 7, 12:32 am, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> If you want to do it in a single action, then keep as much of your
> Screenshot processing / validation in your Screenshot model, and have
> the extra bits in the Entries/add action.
I was working towards that until I realized that I wa
On 05-Mar-2007, at 14:52, Sonic Baker wrote:
> (d) Other.
project-dir
trunk
Rakefile
config/
Doxyfile
Doxyfile_cake
lighttpd.conf
deploy.rb
docs
If you just want one big query, then you will need to code it yourself
and use $this->Profile->query() to run it.
Multiple queries is the price you pay for Cake's automation of
relationships. If you are worried about this for performance reasons,
then I would suggest that you do some bench ma
> This is a lot of environments for one set of code to jump around in.
> How does cakePHP handle this? Will configuration environment for
> CakePHP allow it to jump from computer to computer without any
> problems?
I use Ant to build my projects to dev, test, and production
environments. Confi
I could be wrong, but it sounds like cake is having trouble finding
your posts_controller.php. I'm assuming that it's in cake/app/
controllers/posts_controller.php? The class should be class
PostsController extends AppController.
Is that what you have? It might help if you could put your code
the way that we handle it is that the config folder is not in svn
(ignore property is set) this way on our dev setups the debug settings
and db settings can be what we want them to be. we have a beta site
that is constantly updated to latest code (using a post-commit
callback in svn) at some poi
Been playing with it a bit my self (and submitted a patch to nate) but try this
$this->Email->Controller->set();
I'm working on tracking down why $this->set isn't working, but the
above should work in the meantime
Sam D
On 3/7/07, Marcus <[EMAIL PROTECTED]> wrote:
>
> Same problem here. The v
I am looking at CakePHP for several large scale projects. One thing
I'm wondering about is the best way to set up a development
environment.
My idea Environment looks like this:
- Source Code is stored in SVN or CVS
- Developers check out code and work on thier own system of choice,
and com
On 3/5/07, Grant Cox <[EMAIL PROTECTED]> wrote:
>
>
> I'm using (b) at the moment too, but the application started as just
> having my app folder in version control, and the core cake libs
> outside of this (c). So my folder structure is more like
> trunk/
> trunk/libs/
> trunk/libs/cake_1.2.x.x_b
On 3/5/07, AD7six <[EMAIL PROTECTED]> wrote:
>
>
>
>
> On Mar 5, 9:52 pm, "Sonic Baker" <[EMAIL PROTECTED]> wrote:
> > Hi bakers,
> >
> > I know this has been touched on before but I would like to pay a revisit
> if
> > you'll bare with me for a few minutes. With the advent of cakePHP 1.2 on
> the
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> if ($access === false)
>
>
> Is this just a typo?
>
It's not a typo. When you use === you are asking for a comparison of
value AND type. Since empty values can also be interpreted as false
depending on context, the only way to 100% mak
Suspected something of the sort when Amazon modified the release date to
push it back three months...
-Toby
kinto wrote:
> ...
> It seems that the book will never come out and I'm really
> disappointed.
> ...
>
> simone
>
--~--~-~--~~~---~--~~
You received
It's the default structure that comes directly out of the cake box. I
never changed it.
Is it what you need?
Thanks a lot!
On Mar 7, 1:40 pm, "hydra12" <[EMAIL PROTECTED]> wrote:
> What is your current directory structure? That would help in
> diagnosing your problem.
>
> On Mar 7, 12:06 pm, "So
What is your current directory structure? That would help in
diagnosing your problem.
On Mar 7, 12:06 pm, "Somewhere" <[EMAIL PROTECTED]> wrote:
> Yes, thank you for the reply! I have succesfully installed Cake now.
> I followed the online example of Blog and created the DB and the code.
> But w
hi,
i use this pagination component, in combination with
admin routing
http://bakery.cakephp.org/articles/view/65
i had to change
if ($this->paramStyle=="get")
{
$this->url = str_replace($this->controller-
>webroot,"/",$this->controller->here);
Yes, thank you for the reply! I have succesfully installed Cake now.
I followed the online example of Blog and created the DB and the code.
But when I tried to connect to it, I got this fatal error:
Fatal error: Class 'PostsController' not found in /usr/local/apache2/
htdocs/cake/cake/dispatcher.
Crappy outlook... Where I've said "I'm sure there will be a no proposal" I
meant "I'm sure there will be a new proposal" ☺
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be c
hello,
i'm using this pagination component:
http://bakery.cakephp.org/articles/view/65
in combination with admin routing.
in this method, the property "here" evaluates to
"/cake/index.php/admintransactions/index/"
insteaf of
"/cake/index.php/admin/transactions/index/"
/**
* Set the base url for
Hi All
I'm getting trouble with paginating comments.
In my users controller
$this->set('scheld',$this->requestAction('/scheldues/getScheldue/
Users/'.$id));
$this->paginate['Comment'] = array(
'limit' => 4,
'order'
Its a shame that the deal was cancelled but Im sure there will be a no
proposal for a CakePHP book.
I would work on it myself but I lack the English skills to do so. I am
willing to write in Spanish, though ;)
-MI
---
Thanks for the quick reply.
I tried what you suggested but i got the same result by writting the
Profile model like this:
class Profile extends AppModel
{
var $name = 'Profile';
var $recursive = 3;
var $belongsTo = array('Location' =>
On Mar 7, 5:32 pm, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> Hrmm, you had a good idea but, I am not figuring out how to implement
> this.
I do it almost exactly as I described.
I sat there for an hour yesterday just thinking about it. My
> problem is that I have a simple a
That's fantastic, you're a legend! Thanks so much for your help.
On Mar 7, 4:10 pm, "ianh" <[EMAIL PROTECTED]> wrote:
> More info needed as MI says. Based on whats available why not do it as
> a beforeSave? Only one expensive write to your DB then.
>
> function beforeSave()
> {
> // assuming yo
Hrmm, you had a good idea but, I am not figuring out how to implement
this. I sat there for an hour yesterday just thinking about it. My
problem is that I have a simple array with the path and name of the
file. The file name and paths change dynamically but with flash and
redirect, I don't see
You are going to have to read the installation instructions again all
the way through as well as the manual on www.cakephp.org
On Mar 7, 7:46 am, "Somewhere" <[EMAIL PROTECTED]> wrote:
> Thank you, guys, for your help!
> I just changed it to the dev installation and it works as it is.
> But when
if ($access === false)
Is this just a typo?
--~--~-~--~~~---~--~~
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 from this group, send ema
Hello,
Like one would store data into a cakePHP session with $this->Session-
>Write('key', 'value'), is there a way to store data into a context
that can be accessed by other controllers?
Important to note is that such data is not known from start, so i'd
rather not write such variables in confi
More info needed as MI says. Based on whats available why not do it as
a beforeSave? Only one expensive write to your DB then.
function beforeSave()
{
// assuming your data is in $this->data
$this->data[MODELNAME]['total'] = $this->data[MODELNAME]['price'] *
$this->data[MODELNAME]['quantity']
OK, point taken.
Never used afterSave before so not sure how they are supposed to work
with the function in the controller.
Currently I have the standard save function in the controller that
adds the row made up on item, qty and price.
Then in the model..
function afterSave()
Simply attach the patch to the respective ticket. There is no need to
post the patch here.
--
Daniel Hofstetter
http://cakebaker.42dh.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to
Just to clarify, I added the debugger message:
Generated query from cake:
SELECT `Treeview`.`id`, `Treeview`.`prev`, `Treeview`.`filename`,
`Treeview`.`fileExtension`, if(fileExtension='0', filename,
concat(filename, '.', fileExtension)) AS fullfilename,
`Treeview`.`folder` FROM `treemenu` AS `Tr
Thank you, guys, for your help!
I just changed it to the dev installation and it works as it is.
But when I opened the default page in a browser, it said:
"Your database configuration file is not present."
Do you know what it refers to?
Thanks a lot!
S.
On Mar 6, 8:51 pm, "hydra12" <[EMAIL PRO
I believe that it hurries to me in sending patch for this ticket:
https://trac.cakephp.org/ticket/1854.
It must have sent here first?
greetings
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To
Acutally i primarly meant the comments inside the post. (in the
linguistic meaning of comment there can be comments *inside* a post,
not only comments *on* the post)
And whenever somebody agrees with (comments *on* the post) that, it
counts too.
some quotes: "I hardly understand this decision of
In my case my solution was:
define('CAKE_SESSION_SAVE', '');
Is a good solution?
thanks.
On 7 mar, 03:52, "bingo" <[EMAIL PROTECTED]> wrote:
> Hi mindcharger,
>
> Thanks for the information. I will give it a try. For now, I tried
> playing with Cake_Session_Save and Security. I modified
Hi Kinto,
actually you don't need a book. There is cakephp manual, which is
great. But there is also 5 part series from IBM that provides a
systematic introduction to CakePHP. Here are the links to each of the
series.
Part 1:
https://www6.software.ibm.com/developerworks/education/os-php-cake1/o
It is true, the book deal between the Cake Software Foundation, Fabio
Cevasco, and Peachpit Press has been cancelled. This decision was
unanimously reached by all members of the CSF as well as other members of
the community who where involved in peer review.
In short, we were dissatisfied with the
On 3/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> On the blogpost i read some negative comments towards "the authors" of
> cakephp.
Which comment in particular?
There are somethings which can be inferred as negative about Cake
Foundation in the post itself but I did not find anything i
oh god...
i think that i finish it... but not...
now i got problems when form breaks in validation...
so...
1) if i select the firt SELECT TAG
2) the second SELECT TAG is update by ajax
3) i leave a field blank e press SAVE
So, the form will back to edit, because a have a blank field
required.
On the blogpost i read some negative comments towards "the authors" of
cakephp.
Before we draw conclusions lets hear their side of the story.
I'm sure they'll probably have a decent explanation (maybe they don't
want a book that's outdated after a few months because of the very
rapidly changing co
Mike,
Can I respectfully ask you that you provide more information as to why you
"can't get it working"? It makes us waste emails to keep explaining that
there's no easy way to tell what is wrong when you don't even tell us what's
not working.
So instead of just saying something doesn't work, sh
That sounds familiar ;)
I wouldn't override validates, as on CakePHP 1.1 the parameter to
validates() has a different meaning to the one you are using, while in 1.2
validates() is supposed to take no parameters ($data parameter is
deprecated.)
I think it'd be better to have it as a separate func
Hey
I've had a bit of a nosey around and can't seem to find the answer to
my problem.
I have two tables ( cars, products) and a join table ( cars_products)
all set up with a HABTM relationship using bake.php.
I want to be able to return a set of results from products that are
related to a particul
You can setup Apache to accept multiple domains/subdomains for a
virtual host.
You will need to setup apache to use virtual hosts, read the Apache
documentation here:
http://httpd.apache.org/docs/2.0/vhosts/name-based.html
Then you can set up a virtual host with your base domain name and add
an
I believe that would be the best approach. Then you would just have to
do one save, using the joining table for the current record. And of
course using that method, there could be any number of fields in the
joining table.
On Mar 6, 8:23 am, "Grant Cox" <[EMAIL PROTECTED]> wrote:
> To have more t
Same problem here. The variables I set in a controller action with
$this->set('foo', 'bar'); are not available in the view which is
rendered by the EmailComponent (the viewVars array is empty)
It looks like that after rendering the mail template:
Notice (8): Undefined variable: username [CORE/a
Yes, this way I get the value.
But building the query cake seams not to find the column
'fullfilename' and not build the 'HAVING' right.
the finished sql query should look like this:
select id, prev, filename, fileExtension if(fileExtension='0',
filename, concat(filename, '.', fileExtension)) AS
Hi,
I'm new to cake php.I'm doing ACL for the first time.i have
followed the article http://bakery.cakephp.org/articles/view/171 . As
mentioned in that i created tables aros,acos & aros_acos.
ARO's:
group.all
group.anoymous
anonymous
group.membe
You should access it like:
$fileData[INDEX_HERE][0]["fullfilename"]["prev"]
like a:
$fileData[0][0]["fullfilename"]["prev"]
On 7 мар, 16:11, "Aldo" <[EMAIL PROTECTED]> wrote:
> Hi Zoltan
>
> Thank you.
> But do you know a workarround for this:
--~--~-~--~~~---~--
Mariano Iglesias írta:
> I use WinMerge (since I'm on a XP box):
>
> http://winmerge.org/
>
> With it you open the original file on one side, the modified on another, and
> it generates the .patch file.
>
I use linux, and I think eclipse can make patch and there is a program
diff, what can ge
On 3/7/07, kinto <[EMAIL PROTECTED]> wrote:
> So...I hope that something can still change and I'm really interested
> on hearing the position of the Cake Software Foundation
+1 to that - I too was looking forward to the book
Tarique
--
==
Hi,
Have a really simple problem and wonder if someone can give me some
advice.
The problem is as follows: I want to add item, price and quantity into
a table but I also want the total price (i.e. price*qty) to be
inserted into the same row. I have played with afterSave callbacks in
the model bu
Brian, is this after you did your apache setup?
On Mar 6, 2:01 pm, "Brian French" <[EMAIL PROTECTED]>
wrote:
> I'm dealing with his now. the way i have figured it out is to check
> the domain in the app_controller.php's beforeFilter() method. Then
> look up that user info based on the domain and
Today I found a new post on h3rald.com, Fabio Cevasco's blog.
http://www.h3rald.com/blog/view/42
It seems that the book will never come out and I'm really
disappointed.
I tought that it would be a great deal for Cake.
For me (and I believe a lot of other people) buying a book and
learning from it
HI,
I have a hmabm relationship between two objects, product and category, the
product controller collects multiple new objects via. a soap interface an
inputs them into the database including the categories they belong to, there
is a request action for each category within a product to check if th
I think you should make your files hidden or not accessible by web
(with the help of .htaccess) and then make a controller that will
return the file's data (with a new layout of course)
which will return the file's mime and other good headers you like to
send.
the auth code should be on that contr
This overrides built-in validates and allows you to pass an array of
field names that you want to check. Pretty much like the one above but
I didn't like how that one permanently changed the fields that were
set for model->validate. Bonus would be to make it so you could change
the rules by passin
On 3/7/07, cecplex <[EMAIL PROTECTED]> wrote:
>
> What if I have 15 fields and I only want 2 of them validated. Is there
> no construct available to let me validate a specific set of fields?
>
Did you try out validating anything?
CakePHP will validate only those fields which are provided to it
I don't remember if othAuth allows you to specify access control at the
file level (it is a while since I have used it). I now use dauth and
Cake's ACL. ACL is flexible enough to be able to deal with just about
anything. You can use othAuth with ACL.
Regards,
Langdon
Alain Martini wrote:
Hi bingo
> flexibility to open two different windows with two different layouts?
> Is that possible.
No idea sorry. Perhaps through the URL would be the best way.
Regards,
Langdon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
Hi mindcharger,
Thanks for the information. I will give it a try. For now, I tried
playing with Cake_Session_Save and Security. I modified
Cake_Session_Save to database and security to medium. These changes
solved my current problems.
Regards,
Ritesh
On Mar 7, 3:44 am, "mindcharger" <[EMAIL PRO
> ERPs are great for large to mid-size companies, but it's not a
> solution for a small companies (like mine) who may want something more
> flexible than QickBooks, but far less involved than and an ERP. That
> middle ground is completely missing in the OpenSource accounting app
> market. That's
Hello,
I have created a site that works with the oth authentication. I have a
"media" directory that contains medias that only authenticated users
should download.
I have created a controller wich read the directory (through the
"Folder" class) and a view that publish the file contents.
Now, how c
Yep! They're the same...
The phpinfo() shows the php.ini info, plus a couple more stuff...
You don't have acess to php.ini? Well...let's see what we can do...
First of all, you can force manually the session start...how? Like
this:
session_start();
$_SESSION['car'] = 'Dodge Charger R/T';
This co
hi Langdon,
so is there a way to store variables that are specific to particular
window. I search through groups and there were some mention about
application specific variables. But I didn't find much information
about application specific variable. I think, I want to give user
flexibility to op
Hi bingo
> I am not an expert of session or cookie and have only
> information that cookie is save on client side whereas session is
> saved on server side. But are both shared between windows ?
Yes, both should be shared between multiple windows.
Regards,
Langdon
--~--~-~--~~---
Hi Zoltan
Thank you.
But do you know a workarround for this:
$fieldArray = array('id', 'prev', 'filename',
'fileExtension','folder',"if(fileExtension='0', filename,
concat(filename, '.', fileExtension)) AS fullfilename");
$fileData = $this->controller->$controllerName->findAll("id=$id",
$fieldAr
Hi Langdon,
I think I am able to do what you suggested...but now the problem is
that I can't have two windows having different layout. If I want to
manage information specific to particular window, where it should be
stored. I am not an expert of session or cookie and have only
information that c
Hi bingo
> I initially thought of doing that..but there are some problem. Let me
> explain you my scenario.
Perhaps the better approach would be to put the layout at the start of
the url as people do with language like this:
/en/us/controller/action
I think that modrewrite is then used to
93 matches
Mail list logo