actually attempted to craft one.
If you do go down that route, would be great if you share the code :)
On Fri, Jun 14, 2013 at 7:10 PM, Henrik Gemal
ge...@dinnerbooking.comjavascript:
wrote:
Hi
We use latest CakePHP 2.3.6
We are sending emails using SMTP to sendgrid. The configuration
Hi
We use latest CakePHP 2.3.6
We are sending emails using SMTP to sendgrid. The configuration is really
easy in CakePHP
Now we are looking into switching to using SendGrids HTTP interface for
sending email, since it's a lot faster than SMTP.
How would we implement this in CakePHP?
Fx how
I'm building a pure REST application which only supports Basic
authentication.
But CakePHP 2.1.3 keeps insisting on sending out a Cookie on all reponses.
My setup is something like this
- CakePHP 2.1.3 app with Basic authentication
- After authenticating the user I return the XML to the user
I'm developing a App that ONLY uses Basic Auth as authentication
I want to specify some methods that requires authentication
So I have something like:
$this-Auth-authenticate = array(Basic);
$this-Auth-allow(info, check)
$this-Security-requireAuth(check);
when ever I call the check
I use Auth on one of my websites.
When I change another users password I like the other user to get
logged off.
How do I do that?
--
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
I need to have client specific translations in a project of mine.
The project is already translated into 2 languages eng and dan.
The project serves different clients.
Now a client of my wants to have a different translations for some
strings.
I'm thinking about implementing like this:
First
I have a controller which is being called with different paramters
like:
/test/do?start=2010-01-01end=2011-01-01test=1super=8
Now I like to user cake to validate the input parameters. How do I do
that?
I like to specify that start and end are dates and test is numeric and
super is also numeric.
In my CakePHP application I have an action that sends an mail.
To use this action you must POST some required fields like to,
from, cc, subject and like.
How do I go around a validate those parameters?
Since the mail isn't going to be saved into the database I cant use
the normal $validate
Is there a way to validate a form entry where people can enter one or
more email addresses?
In the form like:
t...@test.com, te...@test.com
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are
://book.cakephp.org/view/150/Custom-Validation-Rules
Enjoy,
John
On Apr 15, 6:10 pm, Henrik Gemal henrikge...@gmail.com wrote:
Is there a way to validate a form entry where people can enter one or
more email addresses?
In the form like:
t...@test.com, te...@test.com
Check out the new
Using the security module I get a error:
Fatal error: Class 'String' not found in D:\cake\1.2.6\cake\libs
\controller\components\security.php on line 671
Use the following controller and the load the test method
http://localhost/test/test
Simple controller code:
?php
class TestController
I have a table with:
name, hour, status
hour is the hour of the time.
So I have to check each hour that name is ok and set the status.
So eventually I get a table like:
test, 1, 1
test, 2, 0
test, 3, 0
test, 23, 1
If I use:
$data = array(Name = array(status = $status, name =
Is there a way to get notified about new CakePHP releases? Like a
CakePHP announe malinglist?
On Sep 9, 5:54 pm, mark_story mark.st...@gmail.com wrote:
The CakePHP development team is happy to announce CakePHP 1.2.5[1].
1.2.5 is a bug fix release of the latest stable branch. Check the
I have a function need to call both from the controller and from two
models.
How do I share that function between both the controller and the
models?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
I need to write an admin application where user can only see their own
stuff and admins can see all the stuff.
But I am a bit confused which way I need to look. Should I look into
using ACLs or ?
Think of a book site where users can only see and edit the books they
posted and admins can see
Is it normal that you keep getting new CAKEPHP cookies?
Try loading
http://ketchup.book.dinnerbooking.com/
and click on a date.
A set-cookie header is sent every time. Is that normal?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I'm accessing databases stored on difference computers. Everything
works just fine now since all the databases have the same columns on
the different computers. So no problem now.
But we need to upgrade the databases. This we cant do all at once, so
we will be running with different databse for
I have a multi language site where people can change language using
the P28nController and P28nComponent.
I bootstrap.php I set a default language.
The problem right now is that somehow I got an invalid Config.language
setting.
If I in my code do:
---
On my production server I have:
In core.php in Cakephp:
Configure::write('debug', 0);
In PHP.ini:
error_reporting = E_ALL
display_errors = Off
log_errors = On
error_log = \phperror.log
Consider the following PHP code and memcache ISN'T installed:
?php
I'm using the MailtoHelper to encode a mailto address to avoid
spammers.
the code is something like:
$mail = $html-link($m, $mailto-encode($m));
the problem is now that the mailto address is already encoded so I
dont want html-link to reencode (html entities) since this messes up
my mailto
In my controller I'm doing:
$ok = $test-deleteAll($conditions, false);
where $test is my model
this normally works just fine, but this was failing for some unknown
reason.
Now I want to be able to debug why this was failing.
Is there a way to get the last error?
I've only seen the problem in
do I need to generate the .mo file from my locale?
cakephp seems to cache the language file in a cake_core_default_eng
file in the cache directory.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
if I'm running debug=0 and get a:
Fatal error: Call to undefined method
I get a blank page.
Can I somehow show an error page instead?
I've tried using
ErrorDocument 500 /error/
but that doesn't work.
My site seems to return a 200 OK with the fatal error
I just tried to upgrade to CakePHP 1.2.2.8120 and now I'm getting
Undefined variable: html
My app_controller.php:
class AppController extends Controller {
var $components = array(P28n);
var $helpers = array(Html, Form, Javascript, Session);
}
My test_controller.php:
class
Any idea why this worked in 1.2.1.8004 and not 1.2.2.8120 ?
What has changed?
On Mar 20, 9:46 am, Sergei yatse...@gmail.com wrote:
I think you need to merge your $helpers variable, because you variable
in testcontroller overwrites one in appcontroller.
On 20 мар, 16:35, Henrik Gemal
class BookingsController extends AppController {
rite?
On Mar 20, 10:48 am, jitka (poLK) slunii...@gmail.com wrote:
class TestController extends Controller {
Guess what is wrong in this line.
--~--~-~--~~~---~--~~
You received this message because you are
My web application has to connect to a remote database over a openvpn
connection.
Should I use persistent connections?
Are there any disadvantages by doing so?
I also looked into added support for compression to the mysql driver
in cakephp. Should be pretty simple. Just add
Hi
I'm having a little problem with converting an old sql request to use
cakephp.
The sql is:
select name, if(module_id is null,0,1) activated from module left join
active_modules on (id = module_id and res_id = $id)
I have something like:
var $useTable = modules;
var
what should I set as the default useDbConfig in my model?
Say I have a model called x. This model is located in database which
I dont know the name of when loading the model uses uses
I first know the database name after I query the first name where I
get the name of the database.
So should I
In my controller I first need to query a database which holds
information about which database all of the models should use. I'm not
sure how to do this.
When the models get initialized by the uses array I haven't yet
determined what database they should use.
Any clue in which direction I
I have a form where you have to enter either (firstname AND
lastname AND phone) OR (companyname AND phone)
how do I make a validate rule like that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To
I'm not sure what the most correct way to dynamicly load a model is:
ClassRegistry::init(model_name)
or
loadModel(model_name)
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group,
In my model I want to call a debug function in the controller. But how
do I do that?
Something like:
$ok = $waitlist-save($data);
if (!$ok) {
parent::errorlog(waitlist save not ok);
or is this the wrong way to do thing? Should I use a completely
different approche?
I think you can change the line:
Configure::write('debug', 2);
in core.php to:
Configure::write('debug', 0);
* CakePHP Debug Level:
* 0: No error messages, errors, or warnings shown. Flash messages
redirect.
* 1: Errors and warnings shown, model caches refreshed, flash
messages
If I am to use begin() commit() rollback() do I need to set the
$transactional property on the model first?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this group, send email to
I have a custom html escape function that I like to be able to use in
two views.
What's the best way to share function between views?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
CakePHP group.
To post to this
.
best regards...
On Jan 9, 12:47 pm, Henrik Gemal henrikge...@gmail.com wrote:
I have a function in a model which contains multiple save operations
also in different models.
So my function in model x does something like:
x-save()
y-save()
z-save()
so it's only if all of the saves
I have a function in a model which contains multiple save operations
also in different models.
So my function in model x does something like:
x-save()
y-save()
z-save()
so it's only if all of the saves success that I want to commit.
But can I do something like:
x-begin()
x-save()
y-save()
Is there a way in the model to say that it should only be possible to
submit these values in the post?
I want to disallow the user posting any other form fields that I have
specified in the model's validate array?
--~--~-~--~~~---~--~~
You received this message
I need to change the host and the database from the controller.
The controller will read some config vars in the local database and
the then needs to connect to the host and database specified in the
config vars. These config vars changes all the time.
So how do I dynamically change the
I need to include a JavaScript URL on my page. The JavaScript needs to
be generated by PHP.
How do I do that?
The PHP needs to read from the database to generate the JavaScript
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
41 matches
Mail list logo