Dave,
I was having (what seems like) the exact same problem. You can read the
thread about it
here: https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU
My solution was to put CakeSession::start() in the beforeFilter() method in
my AppController. Everything seems to work fine then. How
I have found a work-around for this problem.
I found that Sessions were not being started (on redirect after Auth login)
on the server that had PHP 5.4.36 and Cake 2.x. My first work-around was to
set session.auto_start=1 in my php.ini file. The Sessions and Auth login
worked properly then.
I
Euromark,
Thanks for your response. I updated my version of CakePHP to the 2.6.1. Now
I can change the setup so that session cookies on the server are written to
/app/tmp/sessions. I now see the cookies - each with a name like
sess_abd5g143. The client-side cookie content is the GUID that m
A kind person on IRC suggested that the problem might be fixed by going to
the latest version of Cake. So I updated to 2.6.1 and the problem still
exists.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message becaus
Another factor that might have a bearing on this: the old server had PHP
5.2.17 - the new server has 5.4.36.
In my original post I said I had a CakePHP 2.3 and a 1.3 app that were
misbehaving. When I switched the 1.3 app to use Session.default='cake', it
started working. Now I can switch it bac
I have tried changing the Session settings in core.php. I have tried both
Configure::write('Session', array('defaults' => 'cake')); and 'database'.
Each time I do that my error.log fills up with repeated errors that begin:
2015-01-18 17:15:13 Error: [CakeSessionException] Unable to configure the
First let me say I have looked for answers to this on this forum and in the
Book but nothing seems to fit. I have also posted this question on
StackOverflow and I apologize if any one is offended by my posting it both
places.
I have 3 working apps that I am moving from one production server t
In you post you say:
"... however after I created file(which is xslx format),..."
>
Maybe this is just a typo in your post and not in your code (you don't show
the actual code) but that is NOT the correct extension. It should be
".xlsx" for Excel files since Office 2007. Go back and check the e
Are you serious?!?!? This group is dedicated to CakePHP - a framework
written in PHP for creating applications. It is NOT for beginning PHP users
who first need to learn the PHP language.
You might want to start by learning the basics of the language by going to:
http://php.net/manual/en/tutoria
You should make a belongsTo association between Submits and Categories. If
you do this, Cake will automatically retrieve the data you are looking for
when you do a find() on Submits. To learn more about this go to:
http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html
Oops, I see a type in my previous post:
'className' => 'Phonr'
should be
'className'=>'Phone'
Sorry about that.
Ken
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google G
It sounds to me like you want Client and Vendor (for example) and Employee
(as another example) all to store their associated phone numbers (mobile,
home, etc) in a single model called Phone.
If this is correct, when saving a record in Phone, you would need to know
which model the record is ass
I'm taking the bait:
Looking at the article and the pie chart I have the following observations:
Given that the bottom 8 "frameworks" ("pear" is a framework?) all have a
response of 1.50% (likely one response each) and the intervals between the
other groups (Zend 1 and "none" likely had 2 respo
Your statement "the problem with CakePHP is that it only allows a
controller to access its own corresponding model's data" is just flat
wrong. You can access additional models in a controller by simply adding
the model name to the $uses variable in the controller class.
For example, the followi
>
> I had never heard of a DB that allows spaces in field names so I Googled
> it. Apparently, Access allows spaces, maybe other do too. Two different
> posts suggest enclosing the field names in square brackets : '[...]'
>
See
http://stackoverflow.com/questions/10920671/how-do-you-deal-with-
You haven't given us much to go on.
What if any error messages do you get?
Is your server configured to allow local .htaccess files?
What kind of server is it? *nix, Windows?
Ken
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You
You say you are running on Windows 7 which means you probably don't have an
SMTP mail server running unless you have specifically set one up.
I do development on a Win 7 machine but for Email testing I use my
production linux server. So in my email.php file instead of using
localhost, I point
Post the complete code of one of the Models (the smallest) that causes the
problem.
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscri
This is a terrible post - you gave nothing for anyone to go on.
Have you created the database? Have you modified Config/database.php so it
has the correct credentials to connect to the database? Have you followed
the tutorial on how to install CakePHP at
http://book.cakephp.org/2.0/en/getting-s
You are not going to get much help with a post like this. The people in
this group are not here to do your work for you. And saying that it is
urgent makes me think it is a school assignment.
What is a "frontend editor" - you have not described your task very well.
What have YOU done so far to
You have multiple problems. First, the fact that you are getting the
"method in controller could not be found" message means your routing is not
correct. Try looking at
http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html#RequestHandlerComponent
Second, at the end of y
Is the Webroot you show in your directory structure the CakePHP one? If so,
you have put it in the wrong place. It should be app/webroot (unless you
want to do non-standard setup - if so you need to look very carefully at
how you configure your .htaccess directives).
It seems like you are just
You should NOT need to change anything in the file app/index.php. You have
not given enough information about you installation for us to help. For
instance, where (in relation to your webserver document root) did you put
CakePHP. If you did a standard installation and put it in the document root
I just ran into something a little weird. I have an app that I recently
converted from 1.3 to 2.3 (2.3.9 to be exact). Everything was working fine
in both versions then I had to do some troubleshooting (I can't remember
exactly what) where I turned output_buffering=Off in my php.ini file. After
First of all, this isn't really a CakePHP question, is it? You might get
better help at http://www.apachefriends.org/f/search.php?keywords=xdebug
That said...
I have been using Xdebug on Windows machines for years as part of my
Netbeans IDE. I have it configured on both XP and Win 7 boxes.
>F
I have been using Netbeans 7.1/Xdebug 2.0.5/Apache 2.2 with CakePHP 1.3 on
Windows (XP and 7) for years. It's a lovely way to debug.
I am now trying to upgrade to CakePHP 2.3.5 and I cannot get Xdebug to work
properly. With a clean install of CakePHP 2.3.5 I get the typical CakePHP
Home page th
I should have said that index() does indeed exist in PagesController.php.
Ken
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe fro
I think it is great that the CakePHP team created the Upgrade Shell.
However, I'm having trouble using it. I have a working 1.3 app that I want
to upgrade to the latest version of CakePHP (2.3.5 at this time). I am
doing this on a Windows 7 PC running Apache 2.2.
I went to the Cookbook and foun
Yes, I second jodator. Great Job!!
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from
found it quite good.
>
> Here is 1.3 debugger: http://api.cakephp.org/1.3/class-Debugger.html
>
> I've found it by using the search box (it has a very nice autocomplete).
>
> Just remember to choose CakePHP version.
>
>
> On Tuesday, February 26, 2013 7:52:10 PM UTC+1, kduby
) to the
left there is a structure that makes some sense. Debugger is found under
Utilities. Not so under 1.3.
Is there still some work going on here that the structure is not complete?
Ken
On Tuesday, February 26, 2013 1:26:43 PM UTC-5, kdubya wrote:
>
> I can't find the classes any
I can't find the classes anymore. I was specifically looking for the
Debugger class in 1.3. The structure that used to be there until recently
is gone. What happened? Did I miss something?
Ken
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
Daniel,
Check your HTML 4 spec. The attribute you want is maxlength (not length). I
have made the same mistake before :-)
Ken
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
w
Try looking at http://en.wikipedia.org/wiki/Make_%28software%29
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this g
Your SQL syntax in incorrect.
Try:
SELECT SUM(customerpurchases.amount) AS total From customerpurchases
WHERE customerbill_id = $billid
This can be written as a find():
$total = $this->CustomerPurchases->find('first',
array('conditions'=>array('customerbill_id'=>$billid),
'fields'=>array('sum(
I realized I answered only part of your question. I have done the opposite
of what you are asking - redirecting domain.tld -> www.domain.tld (making
the www.domain.tld the canonical URL).
The /site/.htaccess file I use contains:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
I have always made rewrite rule changes in the /site/.htacess file
exclusively.
I don't really know why the /site/app/.htaccess (or for that matter
/site/app/webroot/.htaccess) files exist. I can't even dream up a scenario
where those files would ever be applied - as long as the /site/.htacces
Start with the Blog tutorial. Follow it step-by-step.
http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html
On Sunday, April 8, 2012 8:02:47 AM UTC-4, masoodi wrote:
>
> Dear friends ,
>
>I am new to cake . I have installed it .Now after installation what
> shall be our fi
What was the URL you used when you got this error message?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group,
Your DocumentRoot should be the same directory where app is i.e.
C:/www/tamilpadamdev
This is the root of your application
Your controller file should be named:
actordesctbls_controller.php
Also, in app/config/core.php you should probably change (if you have
not already) from:
Configure::write('
Thank you, your suggestion was helpful regarding joins.
Ken
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group
Actually, the more I think about this I realize this cannot be done
with some magic in the view. I'll have to do it in the controller or
the model. Never mind.
However, any suggestions of the best way to do this in the model or
controller would be appreciated. I can think of a SQL query using a
JO
In section 7.3.3 of the manual, it talks about form automagic that is
really cool and simplifies forms greatly. Specifically I'm talking
about, the example of, in the controller doing:
$this->set('groups', $this->User->Group->find('list'));
and then in the form:
echo $this->Form->input('Gr
Oops, that should have been DocumentRoot in the https.conf file. Sorry
for the typo.
Ken
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
T
In the error message you gave, it looks like you entered the address
of the view file (home.ctp) directly - this is incorrect for an
application built with CakePHP. It should have been something like:
http://localhost//home
Note: there is no .ctp extension. CakePHP knows where to find the .ctp
fil
Instead of using 'label'=>'Opt,' - try 'legend'=>'Opt.'
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, s
Would you post the HTML that your statement generates?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, sen
Looks like your forgot the echo in front of the call to $this->Form-
>input("ShooterEvent.$we.ShooterOption.$wo.entryfee",
$optbab);
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help other
Oops, I neglected to say the your create() needs to change:
echo $this->Form->create('Plan', array('action' => 'search_form'));
instead of:
echo $this->Form->create('Plan', array('action' => 'search'));
On Feb
Sorry, you are absolutely right, redirecting causes the validation
error messages to be lost. So, reverse the logic.
You currently have a view that renders the form that collects the
search criteria (you don't say what this is but I'll call it
search_form as I did above). So there is an action and
What "extra parameters"?
Post a bit code showing how you use the date picker without CakePHP
and we may be able to suggest how to do it using the $form->input()
method.
Ken
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions
So, in your search() action, call the validates() method as show in
the book here:
http://book.cakephp.org/view/3/The-Manual#!/view/410/Validating-Data-from-the-Controller
Something like:
if ($this->Plan->validates()) {
// continue to show your search results view
} else {
// didn'
I don't know anything about the Media plugin, however your problem may
be with how you have created your inputs in the view. Have you looked
at the structure of $this->data once the form has been submitted to
your action (admin_add)? In order for saveAll() to work. It should
look something like:
a
Based on the (very small) snippet of code you posted, the view should
be placed in the /app/views/committees directory and the file should
be named setpages.ctp.
The layout will have the $content_for_layout in it. Look in /app/views/
layouts. It may be a file called default.ctp (but maybe not). Wh
My suggestion would be to create a Model (maybe called Configuration
with a DB table called configurations) for your configuration data
then add the Model to your app_controller ($uses =
array('Configuration');) so that it is available in all controllers.
Depending on what you want to do with he co
Thomas,
Please show us a bit more of the code surrounding the snippet with the
checkbox. Also, what do you mean by "it hoses everything up?" Do you
get error messages?
It appears the original code snippet you show was in a loop. Why do
you want to get rid of the loop?
Ken
--
Our newest site fo
Show us your view code that builds the form.
Ken
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send ema
@euromark - what a cool solution. I struggles with this same question
and I think you hit on a great alternative.
Ken
On Jan 24, 7:27 pm, euromark wrote:
> you might wanna
> try:http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-at...
>
> On 25 Jan., 00:11, cricket wrote:
>
> >
So, to summarize, I can either use saveAll() to
1) save a single record of the main model (in this case Item) WITH
it's related models (see note below)
- OR -
2) save multiple instances of the main model (Item) WITHOUT it's
related models (see note below)
- BUT -
Not both. Is this correct?
No
I realize I'm not the first person to have a problem with saveAll(). I
have searched this group for a solution to my problem, which is - I
can't get saveAll() to save related model data. I must be doing
something wrong but I cannot spot it.
My app is a sales/inventory system. Here are the pertinen
Paul,
I, for one, don't understand what you are trying to do. Why is the
"user" selecting a textbox? Is this an end user/ Or is it a client-
type user (someone building their website)?
You say this is your first time using CakePHP so the following might
be of help:
In CakePHP much on the drudger
On Jan 23, 4:23 pm, ZAky wrote:
> In registration form I want to add "confirm password" filed.
> I don't have this filed in my users table.
Why would you add it to your model? You probably don't want to save
it, but instead compare it to the password field to make sure they are
the same. Assumin
> 3. What is cakephp global variable for current web root url for example if
> my cake is running in subfolder called cake inside htdocs of XAMPP and i
> use to access the site withhttp://localhost/cake/
>
> what variable can return "http://localhost/cake/";
>
I think you want $this->webroot
I h
I do a similar thing but I an using the Auth component without ACL.
However, I have added a 'role' field to my users table so I can select
actions based on the user's role like you desire.
In my controller I have the following:
class PagesController extends AppController {
public $name =
d']
)
Notice that there are no array keys assigned to the to arguments
following the edit action.
And, the definition for the edit() function should be something like:
function edit($compatible_id, $product_id)...
Study the way the function $html->link() is called here:
http://b
>
$compatible['Compatible']['id'], 'product_id' =>
$product['Product']['id']))?>
Ken
On Dec 18, 4:13 pm, Dewayne Pinion wrote:
> On Fri, Dec 18, 2009 at 12:13 PM, kdubya wrote:
> > Try either:
> > $this->redirect(array
On Dec 17, 3:30 pm, Dewayne Pinion wrote:
> Ok, apparently I am braindead, because I am still not grasping the concept
> of a redirect in cake. I have this page:
>
> productsadmin/compatibles/index/product_id:3365
Where does the above syntax come from (specifically the "product:3365"
part)? Ty
@Mohamed
Thank you for your suggestions. However, in both your examples, the
form is not actually submitted (unless I am missing something). I need
the form to be submitted (hence calling the action) and the result of
that action be rendered in a popup. I have tried a similar approach
where instea
I have an application where I want a "printer friendly" rendering. My
print() action has it's own layout. The action is called from a form
(method=POST). I need all the input from the form to generate the
stuff to be printed. How do I get the resulting stuff to be rendered
in a popup window instead
Why don't you just use the standard helpers?
i.e. In each of your layouts use the html and javascript helpers to
include the .css and .js files you need, like below:
app/views/layouts/layout_x.ctp
...
css('common_css_file')?>
link('common_js_file', true)?>
...
...
The CSS file must be
There is an excellent article in the Bakery at the following link:
http://bakery.cakephp.org/articles/view/captcha-component-with-securimage
It is not implemented using jQuery but it is a complete, step-by-step
guide to implementing CAPTCHA in CakePHP. I followed the instructions
and had it up and
The message you are getting is telling you that you have not setup any
kind of app under CakePHP. The URL you provided in your post (http://
localhost/cakephp/) is not a proper URL to access a CakePHP app. If
you follow the suggested installation (see
http://book.cakephp.org/view/329/Getting-Cake)
What control panel? CakePHP has no "control panel." If you are
thinking CakePHP is something like Front Page, that is not how it is
at all. The CakePHP interface is an API (Application Programing
Interface) and you need to write PHP code to use it. Do you know
anything about programming in PHP? You
Dr. Lobato,
Thank you. I don't know why I didn't find this article on the bakery
but it looks just what I need. Your example code is very clear. I'll
try it today.
Ken
On Nov 18, 10:51 pm, "Dr. Loboto" wrote:
> http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-...
--
You r
On Nov 7, 2:35 pm, Thiago Nuic Vidigal wrote:
> You can include other tables in the query using the 'joins' option of the
> Model->find method.
>
This sound like the solution to a problem I am trying to solve but I
have looked in the Manual and can find almost nothing about "joins"
option to "fin
@sersilva - I have just tried your suggestion and it DOES prevent the
weird output (crash?) I was getting.
However, there must still be some things I don't understand about
these belongsTo relationships:
1) I do remember something in the CookBook about making relationship
alias names unique but
On Oct 27, 4:08 pm, John Andersen wrote:
> I am not sure, but should the hasMany, hasOne not be arrays, thus:
Not according to the book here:
http://book.cakephp.org/view/81/belongsTo
Ken
--~--~-~--~~~---~--~~
You received this message because you are subscribed
e_id'
> );
> ==
>
> sersilva
>
> 2009/10/27 kdubya :
>
>
>
> > Well, (this is me looking doubly sheepish) the reason it worked after
> > rebooting was I had not put back the DisplayAreabelongsToPage
&
On Oct 27, 3:37 pm, John Andersen wrote:
> Please copy/paste the actual model associations from each model, so
> that we may better be able to help you ;)
> Enjoy,
>John
from page.php
class Page extends AppModel {
public $name = 'Page';
public $validate = array(
'title' => array('n
More info.
With all belongsTo associations in place (per original post) find()
works ONLY if I set recursive LESS than the maximum depth from that
level.
So
$this->Page->recursive = 2;
$page = $this->Page->find('first', array('conditions'=>array('title
like'=>'%Home%')));
works OK but the Image
Well, (this is me looking doubly sheepish) the reason it worked after
rebooting was I had not put back the DisplayArea belongsTo Page
association. So the original symptoms still exist but it is
interesting that I get the same symptoms when recursive is set too
deep.
I'm still stumped.
Ken
--~--
Well, (this is me looking a bit sheepish) it seems like it was a
corrupted environment on my development PC. The problem, in one
instance, went away after rebooting. In another instance, I was
attempting to do a find of ContentBlock where I had defined recursive
=2 which put it past the end of the
I have a simple hierarchy like this:
Page hasMany DisplayArea
DisplayArea hasMany ContentBlock
ContentBlock hasOne Image
All is fine when I execute queries with the above associations e.g.
$this->Page->find('first', array('conditions'=>array('title
like'=>'%Home%')));
Now I want to access some
Jon,
OK, I got it working as a behavior. I had to make 3 changes from your
suggestion to get it to work:
1) The actAs declaration had to be:
var $actsAs = array('Cleanup'=>array('field1'=>'', 'field2'=>'')); //
i.e. empty options value for each field
(Actually, since I'm not using any options,
Jon,
On Sep 22, 6:27 pm, Jon Bennett wrote:
> Hi kdubya,
>
> Sounds like a perfect candidate for a behaviour to me.
I had attempted to go down this behavior path but it seemed much more
complicated than necessary. Your example looks pretty complete so I'll
give it a try (m
Thank you, Brian. Sounds like an excellent suggestion! (Why didn't I
think of that?)
On Sep 22, 4:54 pm, brian 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 your app director
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 etc. and replaces newlines with .
I want to call
On Aug 19, 9:01 am, zaboo wrote:
> Don't echo $this->Session->setFlash()
>
> On Aug 19, 8:27 am, Chander Bhan wrote:
>
> > I always get the digit 1 in the next line of the message sent through
> > Session->setFlash from controller, need help
I don't understand this answer. I have been having th
Dave,
Keep in mind that Paginate is like doing a $this->Model->find(). The
options setup in the $paginate variable in the controller are setting
up the arguments to a find-like SQL query on your database. Every time
a new page is requested (by the user clicking on the next page link)
causes a new
Try something like this (assuming the two arrays you mentioned are
called $id and $percent respectively):
$combined = array();
foreach ($id as $key=>$value) {
$combined[$key] = array('id'=>$value), 'percent'=>$percent[$key]);
}
--~--~-~--~~~---~--~~
You received
Yes, CakePHP explanations can be terse. However, there is a
description of how a CakePHP app gets started in section one of the
manual (see:
http://book.cakephp.org/view/10/Understanding-Model-View-Controller).
> 1. Where are the objects ??
> I see lots of classes but no instances of them.Yes, t
What development environment/debugger do you use when developing
CakePHP apps? Have you used others? What do like/dislike about the one
you use?
Ken
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To
I have recently switched from a plain text development style to using
NetBeans 6.5. I figured I might like some of the niceties of a real
IDE (I have used them before) but my main motivation was to get
debugging with breakpoints, watches etc.
So, I have gotten Xdebug (verision 2.0.4) to work with
93 matches
Mail list logo