You have to install/configure mail server on windows.
Or use SMTP like gmail:
'host' = 'ssl://smtp.gmail.com',
'port' = 465,
'username' = 'exam...@gmail.com',
'password' = 'xxx',
'transport' = 'Smtp',
- make sure php_openssl is loaded in php.ini
On Tuesday, February 28, 2012 3:25:35 AM
Thank you Jeremy.
My bookmarklet can't post data due to crossdomain restriction, I can
only send GET requests with jsonp, so I've writed some code like this:
$this-data-[User][username] = $this-request-query[username];
(some for password) and then passed $this-data to $this-Auth-
login...
btw I
Hi,
as I only have to secure one controller, I put this into my
usersController:
class UsersController extends AppController {
var $name = 'User';
var $components = array('Auth');
public function beforeFilter() {
parent::beforeFilter();
$this-Auth-fields =
Hello,
try to configure the Auth fields on the same level of $components =
array('Auth');
On 28 Feb, 09:33, heohni heidi.anselstet...@consultingteam.de wrote:
Hi,
as I only have to secure one controller, I put this into my
usersController:
class UsersController extends AppController {
I'm trying to override default behavior of CakePHP when someone hits
URLs like http://localhost/SOMETHING_NOT_VALID
I added a subclass of ExceptionRenderer and added a
missingController() method. That plumbing all works fine and dandy. If
I do an echo(), the output comes out just fine. However, I
I did this, see above?
On 28 Feb., 09:36, @dariobarila dario.bar...@gmail.com wrote:
Hello,
try to configure the Auth fields on the same level of $components =
array('Auth');
On 28 Feb, 09:33, heohni heidi.anselstet...@consultingteam.de wrote:
Hi,
as I only have to secure one
Il 28/02/2012 09:55, heohni ha scritto:
I did this, see above?
On 28 Feb., 09:36, @dariobariladario.bar...@gmail.com wrote:
Hello,
try to configure the Auth fields on the same level of $components =
array('Auth');
On 28 Feb, 09:33, heohniheidi.anselstet...@consultingteam.de wrote:
...
Even that way give me the same strange sql error
On 28 Feb., 10:33, luca capra luca.ca...@gmail.com wrote:
Il 28/02/2012 09:55, heohni ha scritto:
I did this, see above?
On 28 Feb., 09:36, @dariobariladario.bar...@gmail.com wrote:
Hello,
try to configure the Auth fields on the
well, if I do it like the book says, I get no sql error any more, but
the if ($this-Auth-login()) fails without any comment.
In this case, how can I get the sql statement debugged which is
running?
On 28 Feb., 10:33, luca capra luca.ca...@gmail.com wrote:
Il 28/02/2012 09:55, heohni ha scritto:
Most of the time I want the orphan records to be deleted, as they would
have been done by CakePHP (using dependent=true) if I did not have the
MySQL relations in place.
It was very rare that I created orphans in my code before using MySQL
relations, as I use counterCache a lot and where I
learn something new every day :)
On Monday, 27 February 2012 16:46:36 UTC, euromark wrote:
debug() automatically echoes
so no echo required^^
On 27 Feb., 17:11, phpMagpie p...@webbedit.co.uk wrote:
echo debug($array); gives much nicer formatting.
--
Our newest site for the community:
Hi,
I having problem with an autocomplete function.
I have a form with a search input. Via jquery I catch the submit
function and do a $.post(); to my search controller/action which
returns the found data to a view via $this-set(compact('data'));
I used this-layout = 'ajax';
And here is my
That was really helpful, and i will try to use it, thanks.
But my problem is slightly different (I wasn't specific enough the first
time):
i want to evaluate the whole result from the checkboxes. For example:
None of the checkboxes checked = 0
First-checked, second-not = 1
First-not checked
Hello,
i want to use a checkbox with inverted results: if checked- the value would
be 0 and if not- 1, for which i am using the value attributes of both the
checkbox and the corresponding hidden field:
$formMarkup = array('verification_needed' = array('label' = __('Don\'t
verify'), 'type' =
Set debug to 2
Em terça-feira, 28 de fevereiro de 2012 06h55min25s UTC-3, heohni escreveu:
well, if I do it like the book says, I get no sql error any more, but
the if ($this-Auth-login()) fails without any comment.
In this case, how can I get the sql statement debugged which is
running?
that's exactly how the checkboxes get translated ;)
on beforeValidate() - or manually
On 28 Feb., 13:40, Boyan Penev boyan.m.pe...@googlemail.com wrote:
That was really helpful, and i will try to use it, thanks.
But my problem is slightly different (I wasn't specific enough the first
time):
I'm using David Persson's media plugin. I have a users table that
contains the fields necessary to link to an image file, but a user
does not have to have an image. When I include the Media.Coupler
behaviour in the User model User-create always fails on User-save
when the user does not have an
Hi,
I have a form input which is taking in a rate title. This has worked
fine in the past but when a euro symbol is added to a title Cake
doesn't seem to be converting it to 'euro' as I would expect. The
core file, layout and database are all using utf-8 encoding. I'm just
wondering if there is
I have debug 2. but it will not return a sql statement, it's an ajax
based request anyway
On 28 Feb., 14:02, Rodrigo Rodrigues Moyle rodrig...@gmail.com
wrote:
Set debug to 2
Em terça-feira, 28 de fevereiro de 2012 06h55min25s UTC-3, heohni escreveu:
well, if I do it like the book
Hello, I need your help.
In the previous version of *CakePHP (1.3.4)* I can use the Configure::store
to save my settings, as follows:
http://bin.cakephp.org/view/1327054859
Now in *version** **2.1*, I use the following code
http://bin.cakephp.org/view/1594623852
But this code does not create
It should only unset the data if you are creating the User and it's missing
the 'file' key. If you are updating, you shouldn't *need* the 'file' key.
That said, you can probably get away with passing an empty (or a path to a
default image) file key when you are creating the User using a hidden
The 'checked' key just checks the checkbox. If you set the value to '0'
Cake (well, PHP) sees that as an empty value and therefore assigns it a
value (the default being 1).
You have a few of options here:
1. Use unconventional string values like 'on' and 'off'
2. Flip the results in the model
Hi all,
I currently work in a web agency and we wonder, when the stable
version of 2.1 will come out. For now V2.1 R.C
We will work on big projects and big change apparently will be made.
Thank you in advance for your to answer.
--
Our newest site for the community: CakePHP Video Tutorials
I am not using the 'checked' attribute at all, but the info on the way php
interprets this is good to know- thanks.
On Tue, Feb 28, 2012 at 4:52 PM, jeremyharris funeralm...@gmail.com wrote:
The 'checked' key just checks the checkbox. If you set the value to '0'
Cake (well, PHP) sees that as
how you know if file is created, if you delete it then ? :D
and CONFIGS does not exists in cake 2, use APP . 'Config' . DS instead :)
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/2/28 Salines nikola.parad...@gmail.com
Hello, I need your help.
In the previous version of *CakePHP
Generally the response to this question is: when it's done.
It's important to understand that CakePHP is a completely volunteer-driven
framework. This means that people (core team and otherwise) put in unpaid
time after their normal job. Because of this, there isn't a hard and fast
release
Hi,
Deletion occurs at the end, after copying the files from the temp folder in
the Config folder.
Please try the following code and tell me that the settings.php file is
created in your / tmp / cache / persistent / folder?
Configure::store('Setting', 'settings', array('Site'= array('title' =
Hi,
I have these 3 associated models :
class Author extends AppModel {
var $hasAndBelongsToMany = array('Book');
}
class Book extends AppModel {
var $belongsTo = array('Collection');
var $hasAndBelongsToMany = array('Author');
}
class Collection extends AppModel {
Are you sure that the controller that handles the return action
specifically allows that action?
function beforeFilter()
{
parent::beforeFilter();
$this-Auth-allow(array('ipn', 'returning'));
}
(or whatever the actual names are)
--
Our newest site for the community: CakePHP
You could set the path in bootstrap.php like
Configure::write('uploadPath', '/path/from/root/of/server/etc');
But you may also run up against Open BaseDir (and maybe Safe Mode?)
depending on your server's config.
--
Our newest site for the community: CakePHP Video Tutorials
What do you mean by filtered? Do you want to sort by Collection, or do
you want to select only specific Collections?
And which controller/model do you want to do this from? Because the
models are associated, code from, eg. the Book model can run a find()
from the Collection model.
I understand what you are saying but I don't think it's the full answer. It's a
perfectly valid use case to have a table that has an optional image in it
without the need to have a separate join table. The absence of the image
doesn't create any garbage data; the user row is still valid. A bio
I'm having some trouble figuring out how pagination has changed. It
appears as if the controller's $paginate array doesn't require any
mods, but I can't get it to properly paginate. The SQL is all correct
except that the offset is not included, so I always get the first page
of results.
Thinking
Sorry for the noise. It figures that I'd agonize over this for days,
then spot the problem just minutes after giving and pleading for help.
The issue is that 'page' is now expected to be under 'named' in
$this-request-params.
My route:
Router::connect(
'/admin/contributors/:page',
I didn't say I agreed with how it worked, I was just explaining what I
think the author's intended use case was. The question was if you were
missing a setting or doing anything wrong. You weren't, so I just threw out
some ideas based on how the Coupler works. Feel free to take it up with the
Hi,
I'm currently trying to create a shopping cart solution with cake 1.3.
In the current design, only the product id of a chosen product will be
saved in the session, each time the customer lists the cart items, all
information needs to be read out of the database.
My idea was to create a
I'm attempting to port Nick Baker's FileUpload plugin to 2.x but am
running into class not found errors. He used a separate
FileUploadSettings class that's in the config folder. I've renamed the
folder Config and the file FileUploadSettings.php. Then I've changed
the import line in the component.
By filter I mean to select all authors where Collection is equal to a
collection_id and do it from the authors controller.
I can't simply do a $this-Author-
find('all',array('conditions'=array('Collection.id'=
$collection_id)) because the Author model is not associated with the
Collection model.
App::uses('FileUploadSettings', 'FileUpload.Config');
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2012/2/28 lowpass zijn.digi...@gmail.com
App::import('FileUploadSettings', 'FileUpload.Config');
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check
Go 3 levels deep so the data is arranged by the particular Collection
you're after.
$data = $this-Author-Book-Collection-find(
'first',
array(
'conditions' = array(
'Collection.id' = $c_id
),
'contain' =
On Tue, Feb 28, 2012 at 5:15 PM, Tilen Majerle tilen.maje...@gmail.com wrote:
App::uses('FileUploadSettings', 'FileUpload.Config');
Oh, I'm a dolt. I was forgetting that it's not a configuration file,
but a class.
But it still doesn't work. I get class not found on the line with:
I find it odd that Nick used a class for this in the first place, as
it only has a single array of options. It's loaded in both the
component and behavior. I think it would be simpler to just put all of
this in the plugin's bootstrap so I'll try rewriting it like that.
--
Our newest site for the
Your second proposition is close to what I need, but my Grail would be
to have the list of the authors (sorted alphabetically) each with its
associated books published in a given collection. I guess that with
some tweaking of the array of results I can get there but it's not
very elegant.
Thanks
I have a weird problem with Models and array's
I moved a website from a test server to the live server.
In the new situate all my code started to complaine about undefined
indexes. When debugging an array I see that the array indexes became
numbers instead of the Model names!? What can be the
Thanks for the response lowpass.
The controller allows ipn, but not returning. However, after further
testing, I found that not only was I being returned to the login page,
I was actually logged out. I found this when trying to go to other
places on the site and found that it shows the login
Gosh my reply sounded harsh on you Jeremy - that wasn't my intention. We've
commented out the line that unsets the data and it *all seems fine*, which also
feels dirty. The user records are saving correctly, we can subsequently add
images to user records and all other dedicated image tables
Hi
I am using cakphp 'link' to generate anchor tags. Now i awnt to add a class
to active links to apply some styling to those links. Is there a way to
that.
--
*Thank you,*
*Kiran.*
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP
47 matches
Mail list logo