Is apache dying? Sounds like a Zend Optimizer issue - if you have the
Zend Optimizer installed try disabling it.
https://trac.cakephp.org/ticket/2059
On Jul 20, 11:54 am, Ryan [EMAIL PROTECTED] wrote:
As soon as I add this, it craps everything else out that I've done -
i.e white screens
A few years ago I had to work with Cake and Filemaker - but thankfully
I convinced them that the website could use it's own database, and
their internal Filemaker database would just synchronise from this
live site with a Filemaker script (one way synch only). There was
just a cake action that
I'd also be very interested in knowing which revision it is current to
- for example the change in r7075 about condition operators moving
from the value to the key, is quite an important one. I guess that's
the difficulty with writing any book for a non-stable release - the
API can change...
I do the same, and keep the file in fixtures. Makes sense to me :)
On Jul 15, 8:33 am, aranworld [EMAIL PROTECTED] wrote:
I need to create a test case for the parsing of a tab delimited file.
Would it make sense to put the test version of this CSV file in the
fixtures directory of my test
$db = ConnectionManager::getDataSource('default');
$result = $db-query('SELECT * FROM ...');
On Jul 9, 8:38 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi.
Is there anyway to call query() from a controller that has no model?
--~--~-~--~~~---~--~~
You
You cannot use array syntax for these any more, you have to use string
syntax (where escaping falls to you, rather than Cake).
$conditions = array(
'FooModel.foo_important_type = NOW()'
);
On Jul 8, 7:50 am, vb13 [EMAIL PROTECTED] wrote:
HI all,
there is already a
What is your save query, and what is the SQL generated?
When saving using the standard Model-save() syntax, the data provided
is assumed to be unquoted - and will automatically be made safe for
SQL.
$this-Model-save(
array('Model'=array(
'field1' = 'value',
For anyone else wondering, just have a $this-set('layout_var',
'content') in your view, then in the layout file you can use
$layout_var .
On Jul 6, 6:15 am, bmgz [EMAIL PROTECTED] wrote:
I managed to figure this out, however it wasnt as elegant or simple as
it could be..
Make sure you are using Cake 1.2
var $validate = array(
'categoryName' = array(
'too_short' = array('rule' = array('minLength', 1),
'message'='Category Name cannot be empty'),
'unique' = array('rule' = array('isUnique'), 'message'='That
Category Name is
No, just make a model file.
Seriously, what's the problem with having:
?php
class Engine extends AppModel
{
var $name = 'Engine';
}
?
On Jul 2, 5:00 pm, Ben [EMAIL PROTECTED] wrote:
Hello World,
i just tried to search, but can't find what i'm looking for.
I want to bind a table
The documentation you are referring to is misleading - a join is only
used across a belongsTo association (and hasOne), never for hasMany.
Basically, you can't have query conditions across a hasMany
association. You will have to either query the other way (as you saw,
the Course belongsTo Term,
Don't forget you can also use
$javascript = END
...all your js here...
END;
On Jun 25, 4:43 pm, Daniel Hofstetter [EMAIL PROTECTED] wrote:
Hi Federico,
Hi all, I'm working in a helper that has to output lot of JS code. The thing
is that I really dislike coding JS as string (ie
It requires more work for you to code, because it's a more complex
query situation, and Cake doesn't currently have the functionality to
hide this complexity.
As you mentioned, I'm sure the Cake devs are aware of this. But can
post an enhancement ticket on trac if you like.
On Jun 23, 7:55
See ticket 4855, it sounds quite similar
https://trac.cakephp.org/ticket/4855
And update to the newest SVN (a revision number isn't mentioned in the
fix for that ticket) to see if the issue persists
On Jun 23, 6:23 am, francky06l [EMAIL PROTECTED] wrote:
Depends the conditions and your
You could just have a second database connection - to the same
database but with a different prefix. Then in the models for the beta
site application set the appropriate var $useDbConfig to point to the
beta tables.
On Jun 20, 2:54 am, Siebren Bakker [EMAIL PROTECTED] wrote:
I have a website
You could always have a second database connection for the legacy
application - without a prefix set. I would have expected that your
legacy app would be in a different database than this new one, anyway?
Not sure about the password hashing, I haven't used the inbuilt Cake
authentication.
On
Because you don't have mod_rewrite (apache module) set up properly on
your second computer.
The first issue is that something is requesting http://yourapp.localhost/privat
, which Cake assumes to be the index action of the privat
controller. I'm not sure what this is - it's something in your
Create an account at
https://trac.cakephp.org/register
Then read
https://trac.cakephp.org/wiki/bugreport
and you will be able to add a ticket :)
On Jun 12, 6:23 am, Eriky [EMAIL PROTECTED] wrote:
I can't find a way to report a bug on the site (maybe I'm stupid) so
I'm posting it here.
You have to use string based conditions for that - not the array key
= value.
$where['AND'][] = 'DATE(Table.datefield) = CURDATE()';
On Jun 10, 3:54 pm, Mr-Yellow [EMAIL PROTECTED] wrote:
Still puts quotes around CURDATE.
$where['AND']['DATE(Table.datefield)'] = '= -!CURDATE()';
There is no such limit in Cake by default, it'll be in your
application code.
Are you sure that the model is passing validation? If you have the
alphaNumeric validation rule, it'll fail on a period, as it
explicitly only allows alphabetic and numeric chars. What is the SQL
being generated?
I have the major and minor numbers hardcoded in my application
configuration file, and the actual revision appended using AD7Six's
snippet
http://bakery.cakephp.org/articles/view/using-your-application-svn-revision-number
On Jun 9, 5:22 am, Ken [EMAIL PROTECTED] wrote:
Like a good developer I
? Doesn't seem a whole lot better than
going through your working copy with a decent File/Folder Merger
utility.
I might give it a shot once next time, not sure if I'll stick with it
though.
And unfortunately WinMerge won't work for me, I'm on a Mac. :o)
On 5 Jun 2008, at 12:46, Grant Cox
/css/cake.generic.css is correct - you should never see the webroot
in the url
If mod_rewrite is enabled, are you sure you haven't removed
any .htaccess files?
If mod rewrite is disabled, are you sure you haven't removed any
index.php files?
if you have
/var/www/html/cake/app/webroot
then
I was about to reply with something glib - since all you want to do is
list all files in the folder (recursively), select them and delete
(trivial with Windows Explorer). However I had a chat with one of our
Mac guys here, and we couldn't figure it out in Finder / Spotlight.
How do you list all
I use Subversion vendor branching (
http://bakery.cakephp.org/articles/view/vendor-branching
) to maintain all third party code, as you really need something that
can compare three targets.
But if you do want to do it manually, WinMerge works well for me on
Windows, using the CVS/SVN Loose
I agree, these artificial benchmarks are useless. The modify loop
benchmark showing foreach being 80x slower than while surprised me, so
I gave it a quick test here. I found quite the opposite, with
foreach($data as $key = $val) $data[$key] .= 'a';
being 5x faster than the while loop. But
HABTM are never done with a JOIN, so you can't use conditions across
the query. You can only do this with belongsTo, so in your example
you would be able to use Service fields in the conditions, but not
Event, Group or User.
The options that I see you have.
1. Create models for the join
Well, you haven't given us any indication of what is taking 9 seconds
- is it a SQL query, and if so what is it? Anyway, some suggestions:
1. Unbind any of those associations that you don't need for any
particular query. While belongsTo associations are done with a JOIN
(comparatively fast),
What database are you using? MySQL, or something else? What database
connection options are you using - perhaps post the $design
configuration from your /app/config/database.php (remove your username/
password of course :P)
Also, what version of Cake?
On May 15, 6:21 am, TracyB [EMAIL
When your site is published it won't be shared with these other
packages will it? Your development platform should replicate the
server as close as possible, which is why a virtualhost is usually a
very good idea.
But I've got Cake installations just in a folder in my webroot with no
problem.
Making the remote service API requests for every one of your page
requests is a bad idea - you have to use some kind of caching (save
locally). Otherwise your page load times could be completely unstable
(what if there is a 5 second delay between your server and one of the
services?), plus you
City belongsTo State
Assuming Cake 1.2:
$cities = $this-City-find('list', array('fields'=array('City.id',
City.name', 'State.name'), 'recursive'=1) );
Then you can have a form select with cities as the data source, you
should get exactly what you want.
On May 12, 9:00 am, Kyle Decot [EMAIL
$teams = $this-Team-find('all', array('fields' =
array('Team.id','Team.firstName','Team.lastName')));
$team_list = Set::combine($teams, '{n}.Team.id', array('%s %s',
'{n}.Team.firstName', '{n}.Team.lastName'));
On May 8, 3:48 pm, jwerd [EMAIL PROTECTED] wrote:
I always follow the CakePHP
Use vendor branching - then every revision of your app has the
appropriate Cake core, and you can easily handle updates / deletes to
Cake core files, even those in the app folder.
Felix has a good screencast for using vendor branching.
Can you post your $hasAndBelongsToMany variable definition? I think
you'll be able to fix your issue by just using the model alias
prefixes in the 'foreignKey' and/or 'associationForeignKey' values.
On May 7, 2:25 pm, David Christopher Zentgraf [EMAIL PROTECTED]
wrote:
Hi,
I'm stumbling
I agree it is probably permissions (or case sensitivity). However,
why are you using imagejpeg() to write a .gif file ?
On May 7, 8:52 am, francky06l [EMAIL PROTECTED] wrote:
Story of writing permissions on folder maybe ?
--~--~-~--~~~---~--~~
You received
That's the way I do it, and have had no problems. It is quite trivial
to set up conditions on your associations, so that the associated rows
are loaded automatically.
On May 2, 9:52 am, validkeys [EMAIL PROTECTED] wrote:
Quick question..
I have a conversation going on between users and
Check out the following links:
http://bakery.cakephp.org/articles/view/jsmin-helper-compress-and-cache-javascript
http://bakery.cakephp.org/articles/view/automatic-javascript-and-css-packer
https://trac.cakephp.org/ticket/2233
http://blog.bradleyboy.com/2007/07/28/assetpackager-for-cakephp/
You're not using the Zend Optimizer are you? Sounds kind of like my
issue ( https://trac.cakephp.org/ticket/2059 ), removing the Zend
Optimizer PHP extension fixed it.
On Apr 22, 4:18 pm, Langdon Stevenson [EMAIL PROTECTED]
wrote:
I have a very strange problem appeared with a site that I have
http://bin.cakephp.org/view/1178242700
This is the behaviour I use for this purpose. Basically it looks at
every query, and if you haven't already set any conditions that look
at the owner id (or artist_id in your case), then it automatically
appends a condition to only retrieve those owned by
Can you explain why you want to do this? For what circumstance do
they need a persistent unique value?
The only thing I can think of is to store data on a persistent medium
- ie database or file. And in both of these cases you can easily
generate a unique one (file / row), and just store the
I'd be more inclined to use the existing TimeHelper timeAgoInWords()
function.
On Apr 21, 6:51 am, jonknee [EMAIL PROTECTED] wrote:
So - where should I put the function and how can I call it? Any ideas?
Unless I'm missing something, that would ideally be a helper. You
could call it like
I ran into the same issue today - I forgot that a little project for a
friend will need to be hosted on cheap shared hosting. I have
reworked the CakeAMF plugin to use SabreAMF instead, and it seems to
be working fine for this small app. Email me if you would like a
copy.
On Apr 15, 4:21 am,
/cake/libs/model/datasources/dbo/*
so for mysql, you want to look in
/cake/libs/model/datasources/dbo/dbo_mysql.php
specifically at the resultSet and fetchResult functions (where it
converts the result to an array). These functions are called by
fetchRow function in
No, stick with the dispatcher. You can easily pass data just as a
second parameter:
$result = $Dispatcher-dispatch($url, array('cli'=true, 'source'=
$mime_source));
then in your controller action you can just access
$this-params['source']
to get the data passed. Let me guess, you're writing
I'm not sure of any method - but why do you think that all your rows
as arrays will use up more memory than the same amount of data wrapped
in objects? Is it just a pass by reference vs pass by copy issue?
At the heart of it the dbo_source.php file takes the data from the
database query as an
We have some large reports for our application - often involving ~250K
rows from 8 different tables. The problem is, if your reporting needs
to do any kind of collating or comparison, as ours does, you really
can't avoid having all the data loaded somewhere. You may be able to
do much of it in
I'll bet that what is actually crashing apache is the Zend Optimizer
extension for PHP.
On Apr 1, 11:17 am, Vangel [EMAIL PROTECTED] wrote:
The topic sounded like a troller post, I guess it served its purpose.
Hack the cake core if you believe its messing up. Thats what Open
Source is for.
Tickets go on https://trac.cakephp.org
However, if you search there you will find a few tickets on the same
topic, such as:
https://trac.cakephp.org/ticket/3029
The purpose of updateAll() is to allow updating of fields based on
calculated values of other fields. Hence, strings are not supposed
1. None of the methods mentioned are thread safe - if you get
multiple concurrent executions you will run into conflicts. You
should always rely on the database's auto-increment primary key, don't
create the PK yourself. So if you want to use the Client primary key
in the client's account
We have a large web application that has 5000 visitors a day, that
has been running in production on the 1.2 branch (then alpha, now
beta) for more than six months now.
1. We have lots of unit tests - these tell us if the code is stable
more than any stable / beta label on the framework does.
It's no different than without Cake.
In your fckconfig.js set
FCKConfig.EditorAreaCSS
FCKConfig.BodyId
FCKConfig.BodyClass
as appropriate.
On Jan 31, 5:04 am, mbavio [EMAIL PROTECTED] wrote:
Hi folks,
I have an app where i´m using FCK Editor with Cake, and I want to
change the background
Well, I've never used the service browser, but the AMF plugin works
fine from Flex.
Perhaps get on #cake-amf and check that the service browser is
supported - perhaps it uses something that is AMFPHP specific?
On Jan 21, 1:57 am, kiang [EMAIL PROTECTED] wrote:
Environments:
PHP Version 5.2.4
The beforeSave looks ok, except that '--' is not empty, so the unset()
won't be called. Perhaps you want to do a regex check instead of
empty() ?
On Dec 31, 10:44 am, Jamie [EMAIL PROTECTED] wrote:
Apologies as I'm new to cake, as well as MVC.
I have a table with a field called
First, you shouldn't request /app/views/posts/index.thtml - maybe
that was a typo above? If http://localhost/cakeBlog/posts/index
doesn't work, but http://localhost/cakeBlog/index.php/posts/index
does, then you are correct it is a mod_rewrite issue.
To enable mod_rewrite, all you should need to
You should be setting all required data in your controller. If you
have
$this-data = $this-User-read( null, $user_id );
in your controller, then your form will automatically populate.
On Dec 20, 7:41 am, jon [EMAIL PROTECTED] wrote:
Is there any way to force change the model that helpers
Try putting
$this-YourTable-cacheQueries = false;
before the affected queries.
On Dec 20, 12:35 am, kane [EMAIL PROTECTED] wrote:
I have written a program which to update credit in an account.
When I run once, it work fine.
When I run more than once, the problem come. It seems not to
As I see it the problem is
- you are not calling $this-User-set($this-data) before the $this-
User-validates() check, so it's not actually validating your data
- you are not checking the $this-User-save($this-data) return
value - which would indicate whether it was actually saved correctly.
So
/app/webroot is the main web folder
Any file you put in there can be accessed directly - if you put a file
in /app/webroot/files/yourdoc.pdf then you will be able to access it
at http://yoursite.com/files/yourdoc.pdf
On Dec 20, 1:09 pm, effour [EMAIL PROTECTED] wrote:
Hi,
I had a developer
In your Event model, have
var $primaryKey = 'event_id';
Now you weren't clear about the table name, is it singular or plural?
If it is singular (e.g. not matching the convention), then also add
var $useTable = 'event';
On Dec 20, 12:01 pm, Fabian [EMAIL PROTECTED] wrote:
Hi I'm trying to
:
This is from my core.php
* Set a random string of used in session.
*
*/
define('CAKE_SESSION_STRING',
'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi');
On Dec 17, 6:12 pm, Grant Cox [EMAIL PROTECTED] wrote:
You shouldn't need to change a single file for Cake to work (to see
You shouldn't need to change a single file for Cake to work (to see
the default cake has been installed page). For your application to
work, you will need to provide the appropriate database connection
details (/app/config/database.php), and set a unique session key (/app/
config/core.php).
var $primaryKey = 'prj_id';
in your model file.
On Dec 17, 7:51 am, situator [EMAIL PROTECTED] wrote:
I am in trying to make the edit page of my app to call the field name
'prj_id' as opposed to 'id' in the WHERE clause. There is no 'id', it
is only 'prj_id'. I need the read() and other
You have to put the conditions in the association itself.
var $hasMany = array('InvoiceItem' =
array(
'className' = 'InvoiceItem',
'conditions' = 'InvoiceItem.invoice_id IS NULL',
)
);
If you need to do this dynamically, then look at bindModel /
For the form helper - if you have $form-create('YourModel'); then the
form helper will automatically use the YourModel model for the
form. However, you can also create each form item with $form-
input('OtherModel.somefield') to use any other model.
The data that prepopulates these fields is
To ensure that both models show validation errors, just call
validates() manually (which will in turn invalidate() each field that
does not match).
$this-User-set( $this-data );
$this-Profile-set( $this-data );
$user_validates = $this-User-validates();
$profile_validates =
Or you can just have
?php $paginator-options(array('url' = $this-passedArgs));?
directly in the view, without anything in your controller. It works
fine for me without the connectNamed stuff.
On Dec 16, 7:36 am, Matjaz Drolc [EMAIL PROTECTED] wrote:
Thanks, it works.
On 15 dec., 22:15,
Use $this-flash() from your controller.
http://manual.cakephp.org/chapter/controllers
On Dec 17, 12:08 pm, oracle411 [EMAIL PROTECTED] wrote:
When a user submits a form successfully, I would like to display my
setFlash message on a blank page. I can redirect it to another page
and display
Please be more clear in your question.
You cannot call model functions from a view. You must call the model
function from your controller, and set() the data for the view.
On Dec 17, 3:09 pm, manuj bansal [EMAIL PROTECTED] wrote:
my code is as follows
I'm sure you'll get a number of responses from people familiar with
both systems, professing that CakePHP is better / smaller / faster,
whatever. I haven't used Zend, so I can't comment on that.
However, the reason I am going to stick with CakePHP is because I know
it, and trust its direction.
It should be in the model - as should all data retrieval functions.
Put as much stuff in the model as you can - the controller should just
parse the request to see what model functions should be called, then
set() this for the view. While some processing in the controller is
inevitable, models
How are you checking that you are getting a lot of DESCRIBE queries
with DEBUG set to 0?
On Dec 14, 7:09 am, Olexandr Melnyk [EMAIL PROTECTED] wrote:
Hello bakers,
in one of applications I'm working on, I have noticed DESCRIBE queries being
executed on every page for all used models. With a
Yes, we use CakeAMFPHP with the 1.2.x svn branch. We have made some
modifications to CakeAMFPHP though - making it use the cake dispatcher
rather than executing the controller actions directly. These
modifications were not necessary to get it working though, just to fit
in with the rest of our
What kiger was getting at is that the user can only see what is in
their browser's cache - which is what they were allowed to see a
second ago anyway... They won't be able to click any links, or
perform any actions.
But regardless, what you really want is browser history management.
Search
What is a pure html tag ?
If you mean a form element that is not named with cake conventions,
look in $this-params['form'] in your controller.
On Dec 4, 2:18 am, firefox [EMAIL PROTECTED] wrote:
how can i get a value from a pure html tag to my controller?
Mcrypt is a PHP module - and its installation is quite independent
from Cake.
http://au.php.net/mcrypt
There is a newer Cookie component on the bakery (
http://bakery.cakephp.org/articles/view/encrypted-cookie-component )
which also uses mcrypt.
On Dec 4, 6:14 am, skoggins [EMAIL PROTECTED]
I expect it will work with
$this-layout = 'xml'.DS.'default';
On Dec 4, 4:15 am, Andreas [EMAIL PROTECTED] wrote:
Hi
I've been trying to use the xml layout but it's not going too well
since the layout file itself is located within a subfolder called xml
(xml/default.ctp) and I'm not sure
Or actually, try:
$this-layoutPath = 'xml';
$this-layout = 'default';
obviously that second line is optional - as 'default' is what should
be used anyway.
On Dec 4, 7:48 am, Grant Cox [EMAIL PROTECTED] wrote:
I expect it will work with
$this-layout = 'xml'.DS.'default';
On Dec 4, 4:15 am
Set 'dependent'=true in your $hasMany definition. See
http://manual.cakephp.org/chapter/models for more details.
On Dec 4, 2:56 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
Hi, I'm new to cakePHP and I'm wondering if there is an easy way to
setup automatic referential data integrity so
Connecting to multiple databases is easy. Just add the extra
connection to your /app/config/database.php, and have the appropriate
var $useDbConfig in your Student model class.
On Dec 3, 4:54 am, Greg Baker [EMAIL PROTECTED] wrote:
How would one go about gathering information from an external
' = 'Person')
);
}
On Nov 29, 2:31 pm, powtac [EMAIL PROTECTED] wrote:
On Nov 29, 5:18 am, Grant Cox [EMAIL PROTECTED] wrote:
1. Follow the cake conventions - it makes life easier
(http://manual.cakephp.org/appendix/conventions).
Ok, Ill have a look at it.
2. In your example
I'm not familiar with Postgres or schemas, but I think a prefix is
suitable. The table name does not need to affect the MVC names - just
set var $useTable = 'whatever_long_table_name' in your model.
On Nov 30, 6:33 am, BravoFoxtrot [EMAIL PROTECTED] wrote:
What are the best practices for
When you say 404, is it a Cake 404, or an apache 404?
Cake 404:
Set your Debug to 1 in /app/config/core.php, this will let you know
what the error really is. Delete all the files out of /tmp/cache
(leave the folders).
Apache 404:
Make sure mod_rewrite is enabled in your httpd.conf.
Make sure
Because your app controller is attempting to access the User model.
Models are not loaded by default - only if they are included in the
$uses array of a controller (or, if they are the primary model for the
controller, and there is no $uses).
http://manual.cakephp.org/chapter/controllers
On
1. Follow the cake conventions - it makes life easier (
http://manual.cakephp.org/appendix/conventions ).
2. In your example above, you want:
Person belongsTo Position, with foreign_id 'position'
Position hasMany Person, with foreign_id 'position'
3. Make sure you are using scaffold for your
, then i would restrict permissions).
I have provided full permission to the tmp folder,
do i need to do anything else?
Thanks for your help.
Rohit
On Nov 29, 12:22 pm, Grant Cox [EMAIL PROTECTED] wrote:
When you say 404, is it a Cake 404, or an apache 404?
Cake 404:
Set your Debug to 1
Looks like you are messing with it now - there is an obvious print_r
and br/ before the file data now.
Are you calling exit() after the file data is output, or otherwise
ensuring that cake doesn't attempt to render a view?
On Nov 27, 7:09 pm, jonathan [EMAIL PROTECTED] wrote:
Just so you know
Just to clarify, when setting debug to 0 only the DESCRIBE
`your_table` queries are cached - of course a read() does still read
in every field.
If you want to reduce the fields included, look at using findById() or
just find() rather than read().
On Nov 28, 5:44 am, WordPress Guru [EMAIL
Or specifically, use a different layout for your pages. You can set
$this-layout in the view itself too, if you don't want to copy over
the PagesController.
On Nov 28, 11:06 am, kiang [EMAIL PROTECTED] wrote:
Put the following line in the top of your controller:
var $layout = 'error';
---
// get the current basket
$basket = $this-Session-read('basket');
if ( empty($basket) ){
$basket = array();
}
// modify it how you like
$basket[] = $new_product;
// save back to session
$this-Session-write( 'basket', $basket );
On Nov 26, 8:08 am, ohneworte [EMAIL PROTECTED] wrote:
Good
Have you tried debugging this yourself - what problems did you
encounter? The errors above give you specific line numbers in your
own code that should give a good idea what is happening.
For a guess, since it is in your afterFind, you are expecting the
afterFind to have an array of results each
http://manual.cakephp.org/chapter/models
Read up on associations, and how they are meant to work. And perhaps
make something a bit smaller until you understand what the difference
between associations are.
Anyway, this is the kind of structure I would start with for what you
outlined. I've
Cake does not provide a method, as you should not be accessing the
session from any model / behaviour.
Sometimes it is just much easier to do so though, so you can still
access $_SESSION directly. But you really should reconsider whether
you have to access the session in your model / behaviour
And that nate's response came in 20 minutes before mine showed how
long I sat here thinking about it, heh.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake
PHP group.
To post to this group, send email to
http://groups.google.com/group/cake-php/browse_thread/thread/58ea010f930fab6c/fdff3040db8f9cf6?lnk=gstq=nate+master+slave#fdff3040db8f9cf6
Or if that doesn't work, search this group for nate master slave.
Basically just set the $useDbConfig in the beforeSave / beforeFind /
beforeDelete to cause
I have no idea why it doesn't work for you, it works fine here. Are
you sure you aren't including the .php part of the filename in your
vendor call? Is your file in a subfolder or anything? What version
of Cake are you using?
The vendor() function is defined in /cake/basics.php, and is not
Put both conditions in the 'or' key:
$datetime = date(Y-m-d H:i:s);
$count =$this-PromoCode-
findCount(array(OR=array(PromoCode.start_date = $datetime,
'PromoCode.active'='1')));
On Nov 20, 11:49 am, zonium [EMAIL PROTECTED] wrote:
I have these statements:
$datetime = date(Y-m-d H:i:s);
Router::connect('/admin/logout', array('controller' = 'home',
'action' = 'logout', 'prefix'='admin'));
On Nov 20, 8:11 am, releod [EMAIL PROTECTED] wrote:
Hey, just installed my first CakePHP application today.
I am wondering how to get url to work in the browser:
/admin/logout
Here is my
It looks like it - I can't see an alternative scandir function
declared anywhere.
Test it out and see if it causes an error, if so post a ticket on
https://trac.cakephp.org/
On Nov 20, 2:53 am, keymaster [EMAIL PROTECTED] wrote:
Am I imagining things, or is the cake 1.1 version using an
No, you cannot access ANYTHING from the controller in the model -
that's one of the core parts of MVC.
What you should do is define a new function in your model -
register() This can set some class variable which you can check in
your other callbacks, eg:
class YourModel extends AppModel {
1 - 100 of 577 matches
Mail list logo