With DEBUG set to 1, I get a bunch of notices/warning.
I want to set the error_reporting level to "E_ALL ^ E_NOTICE".
I can't seem to figure this out. I tried changing the error_reporting
lines in configure.php & cake.php, but there's no change.
What's the solution to this? A google search tur
I am not getting any PHP errors on the Server Logs if I put DEBUG =
0.
Can anybody tell me how to get the php errors logged to Server Log
even with DEBUG = 0?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP
Brilliant! This actually worked out much better for me.
Thanks
Brad
On Feb 15, 4:01 am, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Don't use HABTM, make a full model for the table, then change the
> associations to hasMany/belongsTo.
>
> HTH,
> - Dardo Sordi.
>
> On Fri, Feb 15, 2008 at
Cake 1.2.0.6311-beta
The 'day' param in the following route is always passed as the same
value as :month, regardless of the :day value in the URL.
Router::connect('/events/:year/:month/:day',
array('controller' => 'events', 'action' => 'view', 'day' => null),
array(
'WORK' => array('className' => 'Work',
in Person model should be
'Work' => array('className' => 'Work',
Case is important
also
var $belongsTo = array(
'person' => array('className' => 'person',
'foreignKey' => 'person_id',
'conditions' => '',
'fields' => '',
'o
OK,
This is the models
==
array('alphaNumeric'),
'firstname' => array('alphaNumeric'),
'street' => array('alphaNumeric'),
'city' => array('alphaNumeric'),
'state' => array('alphaNumeric'),
'zip' => array('alphaNumeric'),
'email' => array('email'),
'ph
I haven't done this extensively, but things I've been considering
recently about the subclassing approach:
- Must obey the fat model paradigm, as the more logic you put in the
model, particularly your base model, the more benefit you get from
subclassing in this way.
- Customise the subclasses b
> If you are using the cake1.2 beta distribution, there was a bug in the
> Auth that would make problems, Try with svn branch or nightly build.
I have the latest svn revision, I keep updating incase it is a bug.
--~--~-~--~~~---~--~~
You received this message be
What are all the different schema types (for use in the model)?
I only know of string and text.
What type do you use for radio or select?
e.g.- model:
var $_schema = array(
'firstName' => array('type' => 'string', 'length' => 30),
'lastName' => arra
It seems like the idea of having more meaningful primary keys doesn't
have any obstacles. I'll continue with that.
Thanks everyone!
On Feb 15, 9:12 pm, nate <[EMAIL PROTECTED]> wrote:
> You can use any kind ofprimarykey you want, so long as it doesn't
> include more than one column.
>
> On Feb 1
If you are using the cake1.2 beta distribution, there was a bug in the
Auth that would make problems, Try with svn branch or nightly build.
On Feb 15, 8:27 pm, FrenchEscapes <[EMAIL PROTECTED]> wrote:
> Not sure if this is normal or what! I have the beginings of ACL and
> Auth working, where I h
On Feb 15, 2008 3:52 PM, sixs <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have a person table and each person could have many work records in the
> works table.
> I use bake and I tell cake that a person has many work records, and in the
> works I tell cake that many works records could belong to a per
On Feb 15, 2008 5:46 PM, Rod D. <[EMAIL PROTECTED]> wrote:
> Thanks so much.
>
See, all you GrumpyCanuck haters out there? I *do* help people. :P
--
Chris Hartjes
Internet Loudmouth
Motto for 2008: "Moving from herding elephants to handling snakes..."
@TheKeyBoard: http://www.littlehart.net/at
Hi,I have a person table and each person could have many work records in the
works table.I use bake and I tell cake that a person has many work records, and
in the works I tell cake that many works records could belong to a person
record.It generates the code with t table of personand I can sele
Chris, that was it. I looked at the source and sure enough it had
users/login.
The code in the view that created it was: create('User', array('action' => 'login'));?>
So, I bet I have to add to that array an entry for the controller.
Thanks so much.
Chris Hartjes wrote:
> On Feb
I have a popup form that the user will use to edit data. Does anyone
know if there is a way to update the $ajax->div sections of the parent
window from this child window?
Thanks,
Dave
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Feb 15, 2008 5:29 PM, Rod D. <[EMAIL PROTECTED]> wrote:
>
>
> Any help would be greatly appreciated.
> -Rodney
On your login page, what's the actual target for the POST? An odd
thought struck me that you might be pointing at /users/login in your
form in the login page instead of /echere/log
Cake: 1.2.0.6311 beta, Mysql: 5.0
I am having more issues with the 1.2 beta Auth component.
Particularly I am trying to get around having a Users controller.
Let's say I want to use a controller named EcHere instead of Users.
When I enter, localhost/echere/login I get the login prompt served up
b
Thanks.
I now understand fat controllers divide into classes.
And I also understand the way I said is wrong.
I get one more question. Where do I put my classes?
I know put them as I want, But where is CakePHP's standard?
Are app/vendors/foo.php and app/vendors/bar.php?
And include them 'vendor(fo
You can use any kind of primary key you want, so long as it doesn't
include more than one column.
On Feb 15, 6:57 am, villas <[EMAIL PROTECTED]> wrote:
> > You could set up a "shadow" field in the table to store the human
> > readable form of theprimarykey, maintained on a trigger.
>
> That's an
First off, make a little test.php plain PHP file that verifies that
you can send email using PHP's built-in email functionality:
http://us2.php.net/mail
Then make a little test in a Cake controller that you can call
directly which does the same thing. Then you can worry about the
emailcomponent e
I have made some progess, but the controller still does not inherit
the core classes. Here is how far I have gotten:
1. I installed Eclipse PDT
2. I noticed that I was on the PHP navigator and not the PHP explorer
initially, so I opened the explorer by going to Windows -> Show View -
> Other -> PH
Not sure if this is normal or what! I have the beginings of ACL and
Auth working, where I have groups from admin to customers in aros and
controllers and actions with root as first parent in acos. The only
permissions I have set is Admin -> root, admin users can access every
thing, so far so good
Does the Cake schema tool allow one to define the type of a table
(innodb, etc)?
--~--~-~--~~~---~--~~
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 unsu
Nice one!
On Fri, Feb 15, 2008 at 3:49 PM, francky06l <[EMAIL PROTECTED]> wrote:
>
> If you define some default value in the database definition (not null
> and a default), you can call $this->data = $this->Expense->create() in
> controller prior to render the view. The default value defined i
Can you post the complete error messages?
On Fri, Feb 15, 2008 at 10:20 AM, blain57 <[EMAIL PROTECTED]> wrote:
>
> Is it possible to give me an example based on a table named
> ticket_activities?
>
> I opened the inflection file.. and was shocked ! :P
>
> thanx
>
>
> On Feb 15, 1:48 pm, "Dar
You need to be more specific with your question.
CakePHP isn't much different to dropping in phpBB or something, with respect
to security (sort of).
You follow the same basic rules: Cake sure only the appropriate files and
directories are writable (/app/tmp/*), and that's it. Not much difference.
I am in the same situation as glastoveteran (I am a Cake noob as
well). I am building a content management system which posts various
types of content (articles, bulletins, press releases, etc.). They all
have some common characteristics, but also differ greatly. This is a
typical is-a relationshi
Hi All,
On my local development machine, I use php 5 and on the production, it
uses php 4.2
I was having problem when user authenticated, I redirect them to
another controller but somehow the session drop (only in IE).
I did the check inside the app_controller.php file. I tried to print
out the
Is it possible to give me an example based on a table named
ticket_activities?
I opened the inflection file.. and was shocked ! :P
thanx
On Feb 15, 1:48 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> Try setting it on config/inflections.php
>
> On Thu, Feb 14, 2008 at 2:30 PM, blain57 <[
Quick snippet form my project:
// block users who are not marked 'active'
$this->Auth->userScope = array(
'User.active' => 1
);
Works as advertised...
On 15 feb, 11:43, Tim W <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> My user table/model has a state_id fie
Story goes like this -
Netro42 have recently embraced CakePHP. We have spawned 4 major
cakephp sites in the last year (including the Daily Express and Daily
Star), and have many more in development. All the work we are
currently doing is exciting and I can feel that this agency is
actually going
Hello,
I am using cake 1.1.15.5144 with PHP5 and postgres 8.2.5.
The problem is that boolean values from the database are stored within
the model as strings ('t' / 'f').
Is there a solution that the model stores 'real' boolean (TRUE/FALSE)
values?
There is a function "boolean" in dbo_postgres.php
2008/2/14, r0sk <[EMAIL PROTECTED]>:
>
> Hi people:
>
> I'm now trying to add i18n on a webapp but I dunno how's the right use of
> Translate Behavior. I'd seen that the new CookBook had i18n and I would be
> pleased to see the code. Anyone knows if there is a SVN/Trac or so to see
> how it works.
Hi! I'm developing a cake app that will be served on shared webhosting
(hostmonster). I've read the manual for installation but the
Production and Advanced installation notes discussed instructions for
somebody with access on httpd config. How can I have a secure
installation of cake on a shared w
Hi,
In CakePHP, i want to integrate the paypal.
Is there any possible way to do the process by Submitting the Hidden
Values to paypal like php?
Thanks,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" gro
If you define some default value in the database definition (not null
and a default), you can call $this->data = $this->Expense->create() in
controller prior to render the view. The default value defined in the
table will be used.
hth
On Feb 15, 6:14 am, duncan_m <[EMAIL PROTECTED]> wrote:
> Than
Hi!
I am developing my application with Cake 1.2 and I want to have send e-
mails functionality.
Inside pages folder, I have the view to send e-mail with the basic
fields: Destination, Subject and Message(body). I have been reading
about EmailComponent in Bakery's article
(http://bakery.cakephp.or
anyone?
On Feb 14, 4:40 pm, Richard <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have an entire view that I cache other than a phone number that is
> output based on the user's geographic location ...US visitors would
> see an 1-800 number, UK 0800 etc. Therefore I have cached the view
> using the $ca
Hey guys, I am using cakePHP 1.2 beta release and I cant get any
session handling to work correctly.
Right now I am trying to use database session handling and my core.php
settings are as follows:
Configure::write('Session.save', 'database');
Configure::write('Session.table', 'cake_sessions');
Co
perhaps someone familiar with these non-americacentric languanges
could suggest in a trac ticket a regex query that would include these
other characters
The check now is for
$_this->regex = '/[^\\dA-Z]/i';
so suggest the fix to help them, I'm not familiar enough with the
other languages to be a
english please...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For mo
To keep it simple with cake I have separate tables & models, but if I
need to share functionality between models, I use a behaviour.
What you're saying about using a custom base class for your models/
behaviours works well also.
Ultimately it depends on your data. eg. in my scenario I was going
OK! Thank's.
I've found myself and I've wrote a regular expression!
It's normal "alphaNumeric validation criteria" doesn't work for "blank
character" which are not "letter" or "number", I'm stupid!
But it's anormal for "accented characters" which often exist in French
or European language and are
That is correct, however, be aware that setting the debug to 0 causes
the table schemas to be cached. Ideal in a production environment, but
if you are still making changes to your tables you won't see those
changes until the cache is refreshed. If you set your debug level to
1, you won't see the
> But it's anormal for "accented characters" which often exist in French
> or European language and are real letters...
"real letters"? By that rationale, all other alphabets should validate
too: from greek to cyrillic and hiragana. Can you imagine the regexp
for that?. I understand your frustrat
Please do everyone else a favor and search around a little bit next
time. This bug has already been reported a zillion times, and was
fixed weeks ago.
On Jan 21, 8:58 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I'm having trouble making UPDATE queries in PostgreSQL. I know that
> there
This has been reported by others before, but the cake team has said
this is the expected functionality. If you're really worried about
validating this data then validate the length of the data, otherwise
write a custom regex to handle your requirements.
Cheers,
Adam
On Feb 16, 1:56 am, avairet <
Hi,
Model : "nature" (id int auto-increment PK / label varchar (50) )
var $validate = array(
'label' => array('alphaNumeric')
);
Create basic functions in NaturesController (view, add, edit)
I launch : "myapp/natures/add"
Add new Nature with label "Article" work fine. Data is saved
correct
Hi,
I'm using 1.2.x.x nightly builds.
I'm using Bake script to generate a simple model called "nature" whith
only 2 fields : id (int auto-increment PK) and label (varchar 50).
I'm generating the NaturesController too with the same way.
Bake create automagically Unit tests for my model and my cont
Hi,
I have a HABTM releationship bewteen my Users & Projects table. All I
am trying to to is update the password field in the Users table and
nothing else, but whenever I try this it deletes the info from the
Project table!
I have tried using saveField('password',$password) also
unbindModelarray
Hi all,
I'm building a content managed site with several slightly different
types of record, but all of which feature a common set of fields e.g.
title, summary, description, start_date, end_date, notes, etc. Some
types of record have one or two extra fields, e.g. location, price,
etc.
I've alw
Thanks dr. Hanniball.
On 15 fev, 09:32, "dr. Hannibal Lecter" <[EMAIL PROTECTED]> wrote:
> Paulo,
>
> Eu estou usando um tradutor, peço desculpas se é ilegível :-)
>
> Não creio que haja um caminho para este Cake construído utilizando-se
> os métodos, você terá de criar uma base de dados us
Very interesting!
I always wanna known how much the plugin is "plugable".
If to integrate the application with the plugin is only setting several
OPTIONS or I'll need to make some IMPLEMENTATIONS on the code.
In this way setting several options is that I need. Correct me if I'm wrong.
Yes, "Wha
Thanks a lot you guys!
I tried setting up a hidden field "redirect" before ($form-
>hidden), but got a blank screen when trying to submit the form. I
guess the model didn't validate or didn't know what to do with
data[Event][redirect] since my DB-Event table doesn't have a column
"redirect". S
thanks for interesting ideas, but me now mostly liked my version :)
just add to URL "MyPages/show/" and rerun __getController();
$_GET['url'] = 'sitepages/index/'.$_GET['url'];
imho defects :
>> Router::connect('/*', array('controller' => 'MyPages', 'action' => 'show'));
>> But remember to defin
Woops, I found a space after a ?> ... got to watch out for those
blighters.
On 15 Feb, 13:37, leo <[EMAIL PROTECTED]> wrote:
> I've been trying to implement this in 1.2, but I always get a headers
> already sent error. Has anyone had any success with it? Does anyone
> know the answer to my proble
I've been trying to implement this in 1.2, but I always get a headers
already sent error. Has anyone had any success with it? Does anyone
know the answer to my problem?
I've already spent the morning picking it to pieces and now I have to
move on to something else.
--~--~-~--~~---
Hi,
I'm using CakePHP to develop a multi-language CMS and have troubles
with translate baheviour.
For example I have model named "Offer" and related model "Category" as
relation is "Offer"--belongsTo-->"Category". I set up i18n sql tables
and using "var $actAs" in models translate the content, b
I'm not 100% sure this will work, but here goes anyway:
http://bin.cakephp.org/view/818943714
The really annoying bit about this is that you have to process display
text (the submit image caption/value) as data. In theory, of course,
you could use a element and set its value property, but IE
ig
Try my suggestion and do a few tests. Don't see why it wouldn't.
Adam
On Feb 15, 9:57 pm, villas <[EMAIL PROTECTED]> wrote:
> > You could set up a "shadow" field in the table to store the human
> > readable form of theprimarykey, maintained on a trigger.
>
> That's an idea that I hadn't consider
> You could set up a "shadow" field in the table to store the human
> readable form of theprimarykey, maintained on a trigger.
That's an idea that I hadn't considered.
However, I'd only consider this route if someone confirms that my user-
friendly primary keys are not recommended in Cake for so
You should look at ajax to help create something like this to prevent
leaving the page.
Otherwise you store information in your session, or cookies, or pass
them through hidden fields, etc.
On Feb 15, 9:27 pm, Sebastian <[EMAIL PROTECTED]> wrote:
> Hi y'all,
>
> I got a problem. I have a form th
Try setting it on config/inflections.php
On Thu, Feb 14, 2008 at 2:30 PM, blain57 <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> simple example:
>
> i make a ticket_activities table
> i make a ticket_activity.php file model with:
>
> class TicketActivity extends AppModel
> {
> var $name = '
Or implement something like this:
http://snook.ca/archives/cakephp/static_pages_cakephp12/
On Feb 15, 9:08 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote:
> An easy way to do it is setup a catch all route:
>
> Router::connect('/*', array('controller' => 'MyPages', 'action' => 'show'));
>
> B
Paulo,
Eu estou usando um tradutor, peço desculpas se é ilegível :-)
Não creio que haja um caminho para este Cake construído utilizando-se
os métodos, você terá de criar uma base de dados usando o Modelo::
query (), bem como a abrir o arquivo de configuração com fopen () e
escrever a nova config
Hi y'all,
I got a problem. I have a form that contains all kinds of data for a
Model "Event". That Event has multiple HABTM relationships with models
like "Promoters" or "Bands", which are displayed as select fields in
the form.
Now in order to give the user the opportunity to e.g. add a "Band"
t
An easy way to do it is setup a catch all route:
Router::connect('/*', array('controller' => 'MyPages', 'action' => 'show'));
But remember to define _before_ it a route for each controller in your app. Ex:
Router::connect('/users/:action/*', array('controller' => 'users'));
...
HTH,
- Dardo So
Don't use HABTM, make a full model for the table, then change the
associations to hasMany/belongsTo.
HTH,
- Dardo Sordi.
On Fri, Feb 15, 2008 at 12:26 AM, Snadly <[EMAIL PROTECTED]> wrote:
>
> For this question, lets assume I have 3 models: A, B, and C.
>
>
> I have a HABTM relationship setup
You could set up a "shadow" field in the table to store the human
readable form of the primary key, maintained on a trigger. Your users
get their pretty field values and don't need to join and cakePHP still
happily works with its expected "id" integer field..?
Dunc.
--~--~-~--~~-
I just tried it and it works perfectly, thank you Grigri. And wow,
quick replies! :)
On Feb 15, 11:51 pm, grigri <[EMAIL PROTECTED]> wrote:
> Just set $this->Auth->userScope = array('User.state_id' => WHATEVER);
> in your controller's beforeFilter callback.
>
> On Feb 15, 10:43 am, Tim W <[EMAIL
That sound easy, i'll give it ago, thanks Grigri :)
On Feb 15, 11:51 pm, grigri <[EMAIL PROTECTED]> wrote:
> Just set $this->Auth->userScope = array('User.state_id' => WHATEVER);
> in your controller's beforeFilter callback.
>
> On Feb 15, 10:43 am, Tim W <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
Thanks Dardo. I'm still a beginner at Auth, i'd really appreciate a
line of code and a suggestion where it should go. The login() method
of my UserController is never called during the login process,
execution jumps straight to the login method in auth.php.
On Feb 15, 11:48 pm, "Dardo Sordi Bogad
Just set $this->Auth->userScope = array('User.state_id' => WHATEVER);
in your controller's beforeFilter callback.
On Feb 15, 10:43 am, Tim W <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> My user table/model has a state_id field. I'd like to configure Auth
> so that it only lets people login is the sta
Use AuthComponent::$userScope = array() // accepts conditions in the
same way that Model::findAll()
On Fri, Feb 15, 2008 at 8:43 AM, Tim W <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> My user table/model has a state_id field. I'd like to configure Auth
> so that it only lets people login is the
Yo can define which column is used in the join, see:
http://manual.cakephp.org/chapter/models
http://tempdocs.cakephp.org/#TOC82250
http://book.cakephp.org/view/66/models#78-associations
On Fri, Feb 15, 2008 at 7:21 AM, villas <[EMAIL PROTECTED]> wrote:
>
> The end-user reporting application is
Hi all,
My user table/model has a state_id field. I'd like to configure Auth
so that it only lets people login is the state is a certain value. Is
there an easy way to do this?
Two lines in auth.php suggest it should be possible
38: $conditions = $this->userScope; // (previously $conditions is
Hi all,
I've posted an article about Markdown and dp.SyntaxHighligher to the
bakery; it's been a while and the article is still not published. I
was just wondering is this a standard issue or do I need to correct
something in the article itself? (I apologize if this is the wrong
place to post, do
AFAIK cake will accept a string as a primary key if your table is
setup like that, however I think it creates a UUID when inserting a
new row, but you could probably override this if you need to.
I've not used this functionality so I can't verify that it works
flawlessly.
Cheers,
Adam
On Feb 15
> My "Hello world" is ok now. But when I try to work with database, html
> out put always have a table with query string and some infomation
>
> How to remove it. I want to have a layout same CodeIgniter or ZF.
> I know cakePHP have more helpful but I dont want see it in my
> website
>
Sorry for the off-topic, but I'd like to cast my vote to quote Baz in
a very *very* visible place on this group (home page or such).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this gr
The end-user reporting application is indeed 3rd Party. It only takes
a few seconds to teach users how to make nicely formatted reports from
tables. However, although IMO the dialogs for joining tables are
fairly straightforward to anyone knowing SQL, it can be quite tricky
for those who are un
I've tried it now and Dieter's approach works okay on 1.2. The only
change I had to make was the name of $from_url, which now becomes
$fromUrl:
In the translate table, all the languages (I have Spanish, Catalan and
English) are listed together:
$translatetable = array(
Lets i post my look at this implementation:
adding to dispatch one more condition if (!is_object($controller))
dispatcher.php
function dispatch($url = null, $additionalParams = array()) {
if ($this->base === false) {
$this->base = $this->baseUrl();
The find('list') returns an array containing the id and displayField
(ie. a field named "title" or "name") for the model.
Use pr() to see the structure it creates
$people = $this->Work->Person->find('list);
pr($people);
Then in your baked view you should see something like this.
echo $form->in
Look in app/bootstrap.php and you will find this comment. Let's you
define extra paths for your classes. Never used it but I'm guessing
this was what gwoo was getting at.
/**
* The settings below can be used to set additional paths to models,
views and controllers.
* This is related to Ticket #
There's no need to create a JQuery helper for CakePHP.
All you need is just start using it.
---
Julio Vinicius Protzek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send em
*
"fir url argument" = "first url argument"
--~--~-~--~~~---~--~~
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 t
help me create dynamic routing.
A have a DB tree structure of pages like
- page1
- page1.1
- page1.2
- page2
- page2.1
and have a MyPagesController which handle request like
/MyPages/show/page1/
or
/MyPages/show/page1/page1.2/
How can i trim URL this format:
/page1/
or
/page1/pa
89 matches
Mail list logo