I've been hosting my CakePHP apps with Surpass Hosting (http://
www.surpasshosting.com) and ACL works fine. Their developer plan is
pretty nice...latest version of PHP/MySQL/PostgreSQL/SQLite and
version control (SVN, GIT, CVS):
http://www.surpasshosting.com/surpass-developer-resources.php
On Ma
I'm currently using Surpass Hosting (http://surpasshosting.com/) and
CakePHP works wonderfully with it. They even have a developer plan
that features 1-click installation of CakePHP (among other cool
features): http://www.surpasshosting.com/dev-tools-teaser/
--~--~-~--~~~--
x27;login') != 'admin')
{
$this->redirect('/users/login');
}
if(!$id)
{
$this->redirect(array('action' => 'index'));
}
e
sk confusing people, I believe an inline style is the correct way to
> do this.
>
> So, the inline style is a web standards issue - but it comes down on
> the right side of the fence - it's there to make complying with the
> standards possible.
>
> On Sep 13, 9:21 pm, Action
Form helper inserts the following code in every form:
Is there any way to remove the fieldset tag or the inline style? I'd
rather have the entire form inside a single fieldset instead of having
an invisible input field inside its own fieldset. Also, the inline
style is a web standards issue.
H
The bake console generated the following code:
$this->Session->setFlash(__('The User has been saved', true));
what does the __() mean?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this
ets,
>
>
>
> On Wed, Jun 11, 2008 at 3:35 AM, Action <[EMAIL PROTECTED]> wrote:
>
> > resolved. ignore.
>
> > On Jun 10, 9:18 pm, Action <[EMAIL PROTECTED]> wrote:
> >> Correction: I get those errors in EVERY save operation (adding
> &
resolved. ignore.
On Jun 10, 9:18 pm, Action <[EMAIL PROTECTED]> wrote:
> Correction: I get those errors in EVERY save operation (adding
> comments, editing posts, etc).
>
> On Jun 10, 9:07 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > In /posts/add, I'm savin
Correction: I get those errors in EVERY save operation (adding
comments, editing posts, etc).
On Jun 10, 9:07 pm, Action <[EMAIL PROTECTED]> wrote:
> In /posts/add, I'm saving a new post as well as all associated tags
> with it (posts habtm tags). In 1.2 Beta, it worked fined,
;]['Tag'][] =
$this->Post->Tag->id;
}
}
$this->Post->save($this->data);
$this->Session->setFlash('Your post has been created.',
$layout =
'
My root page as defined in routes.php is not caching:
Router::connect('/', array('controller' => 'posts', 'action' =>
'index'));
If I goto /posts/index, it will cache the page, but i
I randomly get the following error:
Warning: realpath() [function.realpath]: open_basedir restriction in
effect. File(/usr/lib64/php) is not within the allowed path(s)
I've tried every solution I could find searching the google group
(changing core files, adding code to app/webroot/index.php, et
When is it preferable to use read() instead of find() to query data
from the database?
In the blog tutorial, read() is used:
$this->Post->id = $id;
$this->set('post', $this->Post->read());
BUT, I've always just used find / findBy:
$this->set('post', $this->Post->findById($id));
What's the dif
In the sidenav under "Menu" you can click "All In One Page":
http://book.cakephp.org/complete/3/the-manual
On May 21, 12:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Hi everyone,
>
> I have been having terrible luck trying to find anything in the new
> book, I've been pulling my hai
I was wondering if anyone else could try implementing custom html tags
in 1.2 beta to see if it works for you.
I haven't found any documentation indicating it changed since 1.2 pre-
beta, so I might just submit a ticket.
On May 12, 1:11 pm, Action <[EMAIL PROTECTED]> wrote:
>
$this->loadConfig();
>}
>
> try putting that in the helper, i got results doing that with
>
> debug($this->tags) in a method of the helper
>
> 2008/5/12 Action <[EMAIL PROTECTED]>:
>
>
>
> > This is what I have:
>
> > app/app_
So, what is the best way to determine if a controller method is being
called from a cron job vs a normal user? I don't want normal users to
be able to goto the controller method that makes the requests from
these webservices.
On May 12, 10:17 am, jonknee <[EMAIL PROTECTED]> wrote:
> > So just hav
Nvm, looks like my shared host does support cron jobs.
On May 12, 7:34 am, Action <[EMAIL PROTECTED]> wrote:
> Is that possible to do on a shared host?
>
> On May 12, 2:52 am, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> > Making the remote service API reque
s that checks the remote services every 30-60
> seconds or so, it'll be frequently enough and it'll make the whole
> local data thing so much easier.
>
> On May 12, 12:03 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > Yeah, comments would be an afterthought if I had
nique set in the model's validation parameters?
On May 11, 9:52 pm, "Jonathan Snook" <[EMAIL PROTECTED]> wrote:
> My answers below...
>
> On Sun, May 11, 2008 at 9:44 PM, Action <[EMAIL PROTECTED]> wrote:
> > I'm trying to make a "tumblelog"
I'm trying to make a "tumblelog" using CakePHP. What this application
will do is pull in a list of recent activity on services like flickr,
twitter, delicious, youtube, etc. and display any posts made on them
in chronological order. The front page, for example, will display the
most 10-15 recent i
wrote:
> try in your helper
>
> function __construct(){
> parent::__construct();
> $this->loadConfig();
> }
>
> that displays what I have in the $tags array of config/tags.php
>
> and to load $this->loadConfig('mytags'); you
gt;
>
>
> > It changed - look at $this->tags in helper(s)
>
> > On Sun, May 11, 2008 at 10:10 PM, Action <[EMAIL PROTECTED]> wrote:
>
> > > I built an app using 1.2 pre-beta that uses a tags.php in app/config
> > > called from app/app_helper.php th
I built an app using 1.2 pre-beta that uses a tags.php in app/config
called from app/app_helper.php that sets custom html tags for certain
helper-generated markup.
In 1.2 Beta, it no longer works. It simply isn't applying my custom
tags. Has this changed from pre-beta to beta...or is it simply br
The items within the form need to be contained in any block element to
be validate as Strict. However, why is form helper inserting a SECOND
fieldset and input (both are hidden):
On Apr 12, 10:41 pm, "dzojntywole!" <[EMAIL PROTECTED]>
wrote:
> Ok guys... i got answer from jonathansnook on #cake
Turns out this was being caused by session auto start being enabled.
So problem fixed!
On Mar 8, 12:52 pm, Baz <[EMAIL PROTECTED]> wrote:
> Damn, that sucks.
>
> On Sat, Mar 8, 2008 at 10:43 AM, Action <[EMAIL PROTECTED]> wrote:
>
> > Also, their tech support gave m
nction and then ensuring the GPC control does
not touch that variable-key in its cleaning."
On Mar 8, 11:31 am, Action <[EMAIL PROTECTED]> wrote:
> It turns outsessionswork fine on my host...justnotwithin Cake. If
> I usesessions, either using cake's built-insessionsor from scr
Joel <[EMAIL PROTECTED]> wrote:
> Sounds more like a server configuration issue than a Cake one. What
> server is the host running? Apache?
>
> On Mar 7, 4:41 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > I recently switched web hosts and this problem arose:
>
&
I recently switched web hosts and this problem arose:
I have a login form. If the login info is correct, it creates a
session and redirects you to an admin page. The admin page checks if
the session is set and redirects you back to the login page if it is
not.
This worked fine on my old host, bu
For those of you who use CakePHP on Dreamhost with PHP 5.2.2 enabled,
did you have to modify the default htaccess files that come with Cake
for it to work?
I have my domain pointing to /home/yoursusername/yourdomain.com/app/
webroot/ in the web panel.
--~--~-~--~~~---~
AIL PROTECTED]> wrote:
> > > Yes. Just upload the files and run. PHP 5, I don't remember the release
> > name.
>
> > > Are you getting this error at default cakephp page?
> > > I only get 500 Internal Server Error when I use setFlash and redirect.
&g
hen I do redirect or setFlash.
>
> Try to call with support!
>
> []'s
>
> On Feb 13, 2008 12:20 PM, Action <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am getting 500 errors with a fresh CakePHP installation on Dreamhost
> > (PHP 5.2.2). Is this something t
I am getting 500 errors with a fresh CakePHP installation on Dreamhost
(PHP 5.2.2). Is this something that can be fixed by changing the
htaccess files?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
Warning (512): SQL Error: 1066: Not unique table/alias: 'PostsTag'
Warning (512): SQL Error: 1066: Not unique table/alias: 'Post'
This only happens on my shared host (mysql 4.0), not my local host
(mysql 5.0.45).
--~--~-~--~~~---~--~~
You received this message be
dmin_delete($id = null)
{
$this->autoRender = false;
if(!$id)
{
$this->redirect(array('action' => 'index'));
}
if($this->Post->del($id))
{
So, I finished my app and everything works fine on my local server.
Now that I've uploaded it to my shared host (1&1), I am having 2
problems:
1) Cake is saving "December 31, 1969, 7:00 PM" into my "created" field
every time instead of the correct date. I've used Cake before on 1&1
and never had
I updated my app from 1.2 pre-beta to 1.2 beta, and now my custom tags
defined in config/tags.php no longer work.
Here is my tags.php:
'%s',
'blockstart' => '',
'blockend' => ''
)
?>
How do I fix this?
--~--~-~--~~~---~--~~
You received this mes
Is there any documentation on how RSS feeds are created in 1.2? I just
need to see an example, but I can't seem to find one anywhere...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this
In my app, Posts HABTM Tags.
When I query data using $this->Tag->findAllByName() with $this->Tag-
>recursive = 3 (or any value), it doesn't return all the associated
tags of the associated posts...just the posts.
How can I search by tag, and find all tags associated with each result
post as well
In my app, Posts HABTM Tags.
I'm trying to find all Posts matching a specified Tag and order them
by Post.created DESC.
Here is my code:
$this->set('data', $this->Tag->find('all', array('conditions' =>
array('Tag.name' => $tag), 'order' => 'Post.created DESC')));
Which gives me the following e
Fixed.
On Dec 30, 7:31 pm, Action <[EMAIL PROTECTED]> wrote:
> I have a form where a user can create a new post. There is also an
> input box in this form where a user can list all tags (separated by a
> " ") associated with that post. The tags the user lists can be ne
I have a form where a user can create a new post. There is also an
input box in this form where a user can list all tags (separated by a
" ") associated with that post. The tags the user lists can be new
tags or existing tags (my code currently does not check if a tag
already exists, but that is i
Also, I'm in the app directory when running the command.
On Dec 26, 1:33 pm, Action <[EMAIL PROTECTED]> wrote:
> I'm using wampserver and cakephp 1.2. I'm trying to run the bake.php
> script from the windows command line.
>
> Here is what I'm typing the comm
I'm using wampserver and cakephp 1.2. I'm trying to run the bake.php
script from the windows command line.
Here is what I'm typing the command line:
C:\wamp\bin\php\php5.2.5\php.exe ..\cake\console\cake bake
This is what is outputted to the window:
###
I've always used Cake as my primary framework, but the Zend Framework
seems to be shaping up nicely. Most of its published criticisms have
been dealt with since 1.0 and it has some very impressive features
(webservices, etc.).
Given the fact that it's "Zend" and that there's an entire team of
pro
Quick question:
I need to validate a form but I don't need to compare any of the
fields to the database. Is it better to use ajax validation with the
model or javascript validation? and why?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
31 pm, francky06l <[EMAIL PROTECTED]> wrote:
> $this->Model->validationErrors works for me and contains the
> errors Something is wrong...
>
> On Nov 29, 10:21 pm, Action <[EMAIL PROTECTED]> wrote:
>
> > Nevermind, it works now.
>
> > On Nov 29, 4:10
Nevermind, it works now.
On Nov 29, 4:10 pm, Action <[EMAIL PROTECTED]> wrote:
> I tried your method but $this->Model->validationErrors just returns an
> empty array...even if there are errors.
>
> Controller:
>
> $this->set('haserrors', $this->Com
>name)).Inflector::camelize($key);
>
> // $v will be the Id generated of the field , the one
> generated by $form->input .. Usually ModelField
>
> // ... js code to insert message (message is in $val) ..
>}
>
> Hope this helps
>
>
tation and tutorials with little to show for it.
CI's documentation and flexibility is making me reconsider.
On Nov 29, 3:41 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2007 3:33 PM, Action <[EMAIL PROTECTED]> wrote:
>
>
>
> > That's pre
;ve been toying with the idea of switching to
Codeigniter for some time now. I'm wondering trading some power for
better docs would ultimately speed things up.
On Nov 29, 3:28 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2007 3:21 PM, Action <[EMAIL PROTECT
view? I want to know if there is something
like an invalid fields array that is created each time a form
validates?
On Nov 29, 3:15 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Nov 29, 2007 3:12 PM, Action <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'
I'm using form helper and I have my validation error messages defined
in my model, so the error messages are automatically displayed next to
the invalid field in the form.
However, I want to submit and validate the form using ajax (jquery).
How can I access the validation errors (what variable ar
Resolved.
Changing the form to $form->input instead of $form->password fixed it.
Just had to specify the 'type' as password in the options array:
input('password', $options = array('type'=>'password'))?>
--~--~-~--~~~---~--~~
You received this message because you
Also, this might be stemming from another problem I just discovered:
I'm using form helper for this form, and for some reason the
'password' and 'confirm_password' fields are completely ignored during
validation, even if I remove the custom beforeSave() validation and
specify validation rules in
I'm trying to validate that "password" and "confirm password" match. I
can't seem to get invalidate() to work at all in any situation.
Here is my code:
function beforeSave()
{
if($this->data['User']['password'] != $this->data['User']
['confirm_password'])
{
$this->invalidate(
, but the error messages never appear (they do appear when
submitted not using ajax).
On Nov 15, 7:46 pm, bunyan <[EMAIL PROTECTED]> wrote:
> I did it the following way:
>
> An action returns the rendered view if there were errors while saving
> the data, otherwise it returns xml
Nvm, fixed. Was searching the google groups for the wrong term.
On Nov 21, 12:55 pm, Action <[EMAIL PROTECTED]> wrote:
> I need to set up a HABTM association between two tables: users and
> teams.
>
> The problem I'm having is that the primary key in the users table is
I need to set up a HABTM association between two tables: users and
teams.
The problem I'm having is that the primary key in the users table is
called "user_id", not "id". (I am not allowed to change this).
How do I set up my join table and association so it associates Team.id
with User.user_id,
What do I have to change on the cake side of things to get this
working? Currently it's just set up for non-ajax submission, but I
figured submitting the data using ajax would yield the same results.
The form appears on posts/view and submits to comments/add, which
saves the form if it validates.
I have a blog-like page that contains a post, comments, and a new
comment form. I want the new comment form to submit using ajax (but
also work if the user has js disabled) and have the newly added
comment appear in the comments list.
Currently, I'm using the jQuery Form Plugin to submit the form
I don't like the fact that the Form Helper outputs its error message
using divs. How could I go about change it so it uses tags
instead, for example?
The same goes for the divs used by setFlash()
Thanks.
--~--~-~--~~~---~--~~
You received this message because you
I would also like to know.
On Oct 9, 6:14 am, Fanck <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm new tojQuery, but I wonder if it is possible to return a result
> via controller thatjQuerycan handle on success?
>
> I'm trying to POST data to an "add" method, and on success loading the
> view with the
abits (i.e. a function called
'view' doing tasks other than just retrieving data).
On Nov 14, 7:02 pm, yolabingo <[EMAIL PROTECTED]> wrote:
> On Nov 12, 11:10 am, Action <[EMAIL PROTECTED]> wrote:> Is my aforementioned
> working method (using /posts/view to handle
>
This is for a blog with posts and comments.
On /posts/view/blog_post_name, I have the blog post, its comments, and
an add comment form. Right now, the add comment form submits to the
same controller function used for this view (/posts/view). The data is
saved using /posts/view and then you are re
Resolved. I wasn't triggering the validation in the controller.
On Nov 10, 8:28 pm, Action <[EMAIL PROTECTED]> wrote:
> Also, here is my code:
>
> echo $form->create('Comment'); <-- validation errors work, but it
> sets the action to 'add', w
Also, here is my code:
echo $form->create('Comment'); <-- validation errors work, but it
sets the action to 'add', which I don't want
echo $form->create('Comment', array('url' => array('controller' =>
'posts'
essages defined using form helper
displayed. The problem here is that form helper defaults the form
action to 'add', and so far it seems like it breaks if I try to change
that (i.e. the validation error messages no longer appear).
Is there any way to accomplish this without copying everyt
odel again, using 'fields' option to set the fields you
> want :
>
> $this->Post->bindModel(array('hasMany' => array('Comment' =>
> array('className' => 'Comment',
> 'fields' =>
, using 'fields' option to set the fields you
> want :
>
> $this->Post->bindModel(array('hasMany' => array('Comment' =>
> array('className' => 'Comment',
> 'fields' => a
I want to be able to retrieve multiple blog posts as well as the
comment count for each post. I do not want to retrieve the comments
themselves, just the comment count.
This is what I have so far:
$this->Post->unbindModel(array('hasMany' => array('Comment')));
$this->set('data', $this->Post->fi
My application currently has 2 associated tables: Posts and Comments.
A post hasMany Comments and each Comment belongsTo a Post.
So, the only purpose of the Comments model is to be associated with
the Posts model. I have no use for a Comments controller or view. Any
data saved/retrieved from the
72 matches
Mail list logo