Re: What hosting service do you use?

2009-04-13 Thread Action
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

Re: Hosting

2008-11-17 Thread Action
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/ --~--~-~--~~~--

Problem with updating data with HABTM (Posts and Tags).....too much data is deleted from JOIN table.

2008-10-02 Thread Action
x27;login') != 'admin') { $this->redirect('/users/login'); } if(!$id) { $this->redirect(array('action' => 'index')); } e

Re: How to remove ugly markup from helper? ( )

2008-09-14 Thread Action
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

How to remove ugly markup from helper? ( )

2008-09-13 Thread 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

what does __() mean?

2008-09-08 Thread Action
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

Re: Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE/cake/basics.php, line 528]

2008-06-11 Thread Action
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 > &

Re: Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE/cake/basics.php, line 528]

2008-06-10 Thread Action
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

Re: Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE/cake/basics.php, line 528]

2008-06-10 Thread Action
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,

Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array [CORE/cake/basics.php, line 528]

2008-06-10 Thread Action
;]['Tag'][] = $this->Post->Tag->id; } } $this->Post->save($this->data); $this->Session->setFlash('Your post has been created.', $layout = '

How to cache homepage / root ('/') ?

2008-06-09 Thread Action
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

"open_basedir restriction in effect" error

2008-05-28 Thread Action
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

Difference between read() and find()?

2008-05-25 Thread Action
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

Re: Cake Book

2008-05-20 Thread Action
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

Re: Custom tags no longer working in 1.2 Beta...has something changed?

2008-05-14 Thread Action
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: >

Re: Custom tags no longer working in 1.2 Beta...has something changed?

2008-05-12 Thread Action
$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_

Re: This is more of a general application design question than a CakePHP question...

2008-05-12 Thread Action
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

Re: This is more of a general application design question than a CakePHP question...

2008-05-12 Thread Action
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

Re: This is more of a general application design question than a CakePHP question...

2008-05-12 Thread Action
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

Re: This is more of a general application design question than a CakePHP question...

2008-05-11 Thread Action
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"

This is more of a general application design question than a CakePHP question...

2008-05-11 Thread Action
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

Re: Custom tags no longer working in 1.2 Beta...has something changed?

2008-05-11 Thread Action
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&#

Re: Custom tags no longer working in 1.2 Beta...has something changed?

2008-05-11 Thread Action
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

Custom tags no longer working in 1.2 Beta...has something changed?

2008-05-11 Thread Action
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

Re: cakephp 1.2 form helper,how to create() form without ugly inline css

2008-05-05 Thread Action
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

Re: Session lost after redirect

2008-03-08 Thread Action
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

Re: Session lost after redirect

2008-03-08 Thread Action
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

Re: Session lost after redirect

2008-03-08 Thread Action
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: > &

Session lost after redirect

2008-03-07 Thread Action
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

Re: 500 errors with Dreamhost?

2008-02-13 Thread Action
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. --~--~-~--~~~---~

Re: 500 errors with Dreamhost?

2008-02-13 Thread Action
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

Re: 500 errors with Dreamhost?

2008-02-13 Thread Action
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

500 errors with Dreamhost?

2008-02-13 Thread Action
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.

SQL Error: 1066: Not unique table/alias when deleting data

2008-02-11 Thread Action
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

Re: DATETIME and ADMIN ROUTING broken when moving to shared host. HELP!!

2008-02-11 Thread Action
dmin_delete($id = null) { $this->autoRender = false; if(!$id) { $this->redirect(array('action' => 'index')); } if($this->Post->del($id)) {

DATETIME and ADMIN ROUTING broken when moving to shared host. HELP!!

2008-02-11 Thread Action
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

Custom tags in tags.php no longer working (1.2 Beta).

2008-02-10 Thread Action
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

How to create RSS feeds in 1.2?

2008-02-02 Thread Action
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

Recursive not working with HABTM.

2008-01-26 Thread Action
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

HABTM...how to ORDER find() results from one table by a field in an associated table?

2008-01-26 Thread Action
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

Re: HABTM: How to save NEW posts and NEW tags in same form?

2007-12-30 Thread Action
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

HABTM: How to save NEW posts and NEW tags in same form?

2007-12-30 Thread Action
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

Re: Trying to run Bake script in windows...outputs jibberish.

2007-12-26 Thread Action
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

Trying to run Bake script in windows...outputs jibberish.

2007-12-26 Thread Action
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: ###

Will CakePHP be able to survive as the Zend Framework matures?

2007-12-16 Thread Action
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

Ajax validation vs Javascript validation?

2007-11-30 Thread Action
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

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
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

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
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

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
>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 > >

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
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

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
;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

Re: How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
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'

How to capture validation errors? (what variable are they stored in?)

2007-11-29 Thread Action
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

Re: $this->invalidate not working (1.2)

2007-11-28 Thread Action
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

Re: $this->invalidate not working (1.2)

2007-11-28 Thread Action
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

$this->invalidate not working (1.2)

2007-11-28 Thread Action
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(

Re: AJAX form submission with jQuery

2007-11-25 Thread Action
, 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

Re: HABTM problem - Underscore in primary key name?

2007-11-21 Thread Action
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

HABTM problem - Underscore in primary key name?

2007-11-21 Thread Action
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,

Re: AJAX form submission with jQuery

2007-11-16 Thread Action
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.

AJAX form submission with jQuery

2007-11-15 Thread Action
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

Extending the Form Helper to change output HTML?

2007-11-14 Thread Action
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

Re: jQuery $.ajax() and on success result processing?

2007-11-14 Thread Action
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

Re: Saving data in '/posts/view' instead of '/posts/add' = bad practice? How can I fix this?

2007-11-14 Thread Action
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 >

Saving data in '/posts/view' instead of '/posts/add' = bad practice? How can I fix this?

2007-11-12 Thread Action
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

Re: Tricky form helper/validation dilemma

2007-11-10 Thread Action
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

Re: Tricky form helper/validation dilemma

2007-11-10 Thread Action
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'

Tricky form helper/validation dilemma

2007-11-10 Thread Action
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

Re: How to find comment count for each post?

2007-11-10 Thread Action
odel again, using 'fields' option to set the fields you > want : > > $this->Post->bindModel(array('hasMany' => array('Comment' => > array('className' => 'Comment', > 'fields' =>

Re: How to find comment count for each post?

2007-11-10 Thread Action
, using 'fields' option to set the fields you > want : > > $this->Post->bindModel(array('hasMany' => array('Comment' => > array('className' => 'Comment', > 'fields' => a

How to find comment count for each post?

2007-11-09 Thread Action
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

Having just a model with no controller/view = bad practice?

2007-11-09 Thread Action
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