CakePHP 1.3 Shell can't find AppModel class

2015-07-26 Thread Andrew Burchill
Hi All, I have just posted a question to stack overflow and would like to post it here as well for more visibility, hopefully this is ok. The short version is I am having trouble getting the shells to work after migrating a cakephp 1.3 app, any help would be much appreciated. http://stackoverf

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-16 Thread Andrew Lechowicz
think your best bet is to fork https://github.com/cakephp/bake and apply your tests and changes there. The bonus with this method is it's easy to create PR's back to the core. On Monday, February 16, 2015 at 3:51:51 PM UTC-5, Lorne Dudley wrote: > > Hello Andrew ! (and anyo

Re: Creating Associated Records with CakePHP 3.0 ORM

2015-02-16 Thread Andrew Lechowicz
Is that directly copied/pasted? If so, do you mean to have a 'Users=> patchEntity' in this line: $user = $this->Customers->Users=>patchEntity($user, ['customer_id' => $cr-> get('id')]); Notice the double arrow (=>)? On Monday, February 16, 2015 at 6:45:40 AM UTC-5, Harold Putman wrote: > > Hi, >

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-15 Thread Andrew Lechowicz
ve any file maintained by a package manager (composer in this case). Move these into the respective folders in src and you should be good to go. On Sunday, February 15, 2015 at 8:29:09 PM UTC-5, Lorne Dudley wrote: > > Hello Andrew ! > > OK, I tried this. > E:\web\cake3-rc2>ph

Re: Iter of cakephp tests

2015-02-14 Thread Andrew Lechowicz
Fixture data is automatically loaded before each test run. Any data or structure in your existing test database will be deleted or dropped and replaced with only the relevant fixture data. From you linked Github issue it looks like you have some other issue with either you tests or code that's

Re: Cakephp 3.0 upgrade from 1.3 where to begin??

2015-02-14 Thread Andrew Lechowicz
Something else to consider if you want to jump straight to CakePHP 3 would be to re-write the app in 3.0 piece by piece and update the web server's routing to turn "off" and "on" the 3.0 pieces as need be. On Tuesday, February 3, 2015 at 10:09:12 PM UTC-5, Robert Gravel wrote: > > Hi all, > I wa

Re: cakePHP 3.0.0-RC2 documentation, Testing

2015-02-14 Thread Andrew Lechowicz
When something isn't loading the correct file, it smells like a composer autoload issue or a namespace issue. Try running `composer dump-autoload`. If that doesn't work try looking at your `use` blocks to see if you might be missing something. On Friday, February 13, 2015 at 12:00:11 AM UTC-5,

Re: Cake v2.x -- Looking to return rendered view to the Controller

2015-02-10 Thread Andrew Lechowicz
akeResponse.html#605-617 On Tuesday, February 10, 2015 at 7:44:55 PM UTC-5, BrendonKoz wrote: > > Thank you for the response, Andrew. In my test (using a view file that > just contains static text), $this->response->body seemed to return an empty > string due to ViewBlock->ge

Re: Cake v2.x -- Looking to return rendered view to the Controller

2015-02-05 Thread Andrew Lechowicz
It looks like `Controller::render()` sets the body on the CakeResponse object and then returns the CakeResponse object: http://api.cakephp.org/2.6/source-class-Controller.html#922-962. I would imagine you could access the rendered view like so: public function test() { $this->ren

Re: Routing to 2 controllers?

2014-12-21 Thread Andrew Lechowicz
UsersController and a ShopsController, the former handles the > "Bob" username while the latter handles "BobsShop" username. So if i route > the /:username url to my UsersController, how should I handle the logic for > the "BobsShop" username? > > T

Routing to 2 controllers?

2014-12-20 Thread Andrew Lechowicz
Hi. I want to route a url to 2 controllers depending on some logic I define. For example, if I have 2 usernames Bob and BobsShop, I want localhost/Bob to route to my UsersController while localhost/BobsShop will route to my ShopsController. I've thought of one way to accomplish this - by writing

Re: redirect not working

2014-05-30 Thread Andrew Barry
Although the above fixed it , the issue remains the below code didnt work as expected, in fact it doesnt work. why? class AppController extends Controller { public $components = array( 'Session', 'Auth' => array( 'loginRedirect' => array('controller' => 'posts', 'action' =>

Re: redirect not working

2014-05-30 Thread Andrew Barry
This solved the problem as I need to specify the redirect in the login I also tried in the beforefilter without success public function login() { if ($this->request->is('post')) { if ($this->Auth->login()) { return $this->redirect(array('controller' => 'posts','action' => '

Re: form data

2014-05-24 Thread Andrew Barry
what happens is that the form in myform2 displays but the id fields are blank dropdown. These fields are not autoincrement. I submit and I can get the subject field displayed in myform3 but not id or date fields. controller public function myform3() { if($this->request->is('post')) {

Re: form data

2014-05-24 Thread Andrew Barry
Ok I was hoping I wouldnt get such a response. I have been looking at this book and you have to admit , it just isnt always going to help you do a complete example. data goes back to the controller in a $this->request->data['MyModel']['title']; and this means I can do what and where ? is ther

form data

2014-05-24 Thread Andrew Barry
Hi, I created a form and a submit button. After that I want to 1) display certain fields back to another view and that means the posted data is handled by the controller? I am really finding this hard to get a complete example on this and cakephp book isnt helping as yet. echo $this->Form->cr

Re: load 2 models in controller

2014-05-24 Thread Andrew Barry
I dont think it should be this complicated. You are just loading a model in a controller and i see many examples of ths but i cant get it to work. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are

Re: filter data with controller or model?

2014-05-23 Thread Andrew Barry
I tell a lie, I had a plural model name so I fixed this and it works -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this gro

Re: filter data with controller or model?

2014-05-23 Thread Andrew Barry
Hi, Didnt work sorry and I dont know how to fix this. You have to be careful with the single quotes placed here because they copy across. *Error: * SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Tutorsessions.teacher_id' in 'where clause'?? Th

Re: load 2 models in controller

2014-05-23 Thread Andrew Barry
I need to know how this is done . ( My example was just that). I just want to load another tables data in on the same view as another table data (just assume the data is not related). -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

load 2 models in controller

2014-05-23 Thread Andrew Barry
Hi, In my view I want to display data from 2 tables (maybe not related). I read i do the following to load 2 model in a controller and simply access the other model in the view. I get an error in the view file so this method of loading 2 models in a contrller doesnt work? Undefined index: Teac

filter data with controller or model?

2014-05-23 Thread Andrew Barry
In cakephp what is the method to filter data on a database request. Do I filter the data from a model or a controller? Say if I have a table with 1000's of rows and I only want to select rows on a condition , like a where clause on sql. The user enters in a certain fields to select rows from a t

Re: displaying 2 tables

2014-05-23 Thread Andrew Townsley
Hi, My error is now the view and controller where I link the 2 tables. I have ended up with the problem with this line in the controller with the models having the reference to another table Undefined variable: posts [*APP\View\Posts\home2.ctp*, line *11*] public function home2() {

2 tables wont display

2014-05-23 Thread Andrew Townsley
I am getting an error on a simple display of 2 tables as i am just learning it. I know sql but cakephp is awkward with sql/ Anyway I have *Error: * SQLSTATE[42S22]: Column not found: 1054 Unknown column 'Post.user_id' in 'on clause' *SQL Query: * SELECT `Post`.`id`, `Post`.`title`, `Post`.`bod

Re: displaying 2 tables

2014-05-23 Thread Andrew Townsley
e like such* > > foreach($users as $user) { > echo $user['UserType']['name']; > echo $user['User']['username']; > } > > http://api.cakephp.org/2.5/source-class-Model.html#243-249 > > http://book.cakephp.org/2.0/en/models/associatio

displaying 2 tables

2014-05-20 Thread Andrew Barry
Hi, I have just started cakephp and got working an example. if you look at a hello world example from cakephp then I have these files. I have a table name called users and looking at the blog tutorial that name users should refer to a database name . q1)My example works but what is correct? Is t

cakephp 2.4 projects does not work on ios 7 devices like ipad 2.

2014-03-06 Thread Andrew Wakos
I know it can sound strange but I found that recent version of cake and other 2.x don't work on ipad 2 with ios 7. In general website loads but immediately after loading the information is showed on safari that connection was reset. On the same server I was using cakephp 1.3 and worked fine. Thi

Re: Media View Path - Strange behaviour

2014-02-28 Thread Andrew Lechowicz
What is the value of your `ROOT` constant on the windows machine? On Friday, February 28, 2014 7:01:22 AM UTC-5, Stephen S wrote: > > Hey > > I've pulled some working code from a repository this morning, which works > at the office using OSX, to my windows machine. > > The media view is having st

Re: What are the advantages and disadvantages(if any) to use cakephp3.0?

2014-02-28 Thread Andrew Lechowicz
CakePHP 3.0 is still a preview. It is not intended for production use and is not complete. You could consider it alpha software (pre beta). More information about the 3.0 Developer preview 1 can be found here: http://bakery.cakephp.org/articles/markstory/2014/01/05/cakephp_3_0_0_dev_preview_1_r

Tree recover() method and alternative parent_id field

2014-02-09 Thread Andrew Cross
Hello, I'm trying to use the recover() method described here: http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::recover, unfortunately, whenever I run it I get the follow error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL

Re: hasMany with group by

2013-12-15 Thread Andrew Ponomarev
Hi, did you resolve the problem? How did you do that? I have the similar problem. вторник, 12 марта 2013 г., 23:33:46 UTC+4 пользователь André Luis написал: > > Hi people, I have model User and model Image, and the model User hasMany > Image, so when i use $this->User->find('all'), it comes wit

Re: Cakephp Manual Auth login returns true, but not logged in another page

2013-12-10 Thread Andrew Ponomarev
I found out that $this->Session->Auth array exists and contains correct user data, but debug(AuthComponent::user('id')) returns NULL. Why? пятница, 21 июня 2013 г., 2:37:44 UTC+4 пользователь Rahul Reddy написал: > > In my cakephp(v 2.3.4) app, I am using the code below to manually login > user

3.0 Jitters (excited jitters)

2013-08-05 Thread Andrew Lechowicz
With CakeFest 2013 fast approaching and the final minor release of the 2.x branch preparing for release, I'm excited to start building for 3.0. Hopefully I can provide some useful real-world testing and have some plugins ready at launch. Does anyone know of an approximate time when I can start

Re: Multi Tenancy / SaaS

2013-02-03 Thread Andrew Wilson
I've got the same issue on a project I'm working on. Any solutions you came up with Dylan? On Monday, August 6, 2012 4:02:15 PM UTC-6, Dylan Jennings wrote: > > Hello > > I'm currently building a SaaS application using cakePHP. I've worked with > cakePHP before a few times and I'm comfortable

Re: Find() returns different formatted array when using Postgresql vs Mysql ( any way to resolve this? )

2013-01-11 Thread andrew gardner
I recognize this is an old thread, so I'm posting this answer here because I had the same issue today, and couldn't find a solution anywhere. I'll note I'm a relative novice to PHP. I ran into this issue converting a Cakephp 1.2 app from Mysql to Postgres. There are several instances of the "quer

Completely Stuck trying to list names of Contacts class

2012-11-28 Thread Andrew Cook
I just don't even kind of understand how to access my data.. I went through the blog tutorial and that was all fine, but for my application all I'm wanting to do is this: I want to create a new Client via a form, which I've created.. in a dropdown list box I want to list all of the names in th

Redirect Loop

2012-11-27 Thread Andrew Johnston
//Set some variables for the view (this code I know works as it has been used successfully elsewhere } else { //User is POSTing $this->Slide->create(); $this->Slide->save($this->data); } } Thanks to everyone in advance; I couldn't do this without your support! Andrew

Re: Yet another "Call to a member function find on a non-object" error

2012-11-14 Thread Andrew Johnston
ut the line that is getting the > error. > > Thanks, > Bill Stoltz > > On Nov 13, 2012, at 10:31 PM, "Andrew Johnston [via CakePHP]" <[hidden > email] <http://user/SendEmail.jtp?type=node&node=5712254&i=0>> wrote: > > I know this pos

Yet another "Call to a member function find on a non-object" error

2012-11-13 Thread Andrew Johnston
ublic $hasMany = array( 'OModule' => array( 'className' => 'Module', 'foreignKey' => 'users_id', 'order' => 'Module.created DESC' )); public $hasAndBelongsToMany = array( 'Module' => array( //We gotta rememb

Re: Multiple Database relations (HABTM and HasMany)?

2012-08-20 Thread Andrew Johnston
I won't write out the models (too tired), but I'll give you the DB structure and you can base the models off that: Table: users id (primary key) username pass Table: tasks id (primary key) user_id <--- This is the user that created the task Table users_tasks id (primary key) user_id task_id Th

Re: My auth plugin doesn't protect the rest of my application

2012-08-20 Thread Andrew Johnston
nk it through my AppController > but I'm not sure how to make that work with my Plugin which has Auth config > already defined in it. Won''t that override my Plugin Auth settings? > > How can I make my app recognize and use my Plugin's authentication? > > T

Re: PHPUnit Fixture Failure

2012-08-20 Thread Andrew Johnston
t; On 20 Aug 2012, at 20:38:14, Andrew Johnston > > > wrote: > > Hello everyone- > > I started testing my application with PHPUnit. All of the built in > tests succeed, but the test I created failed with the following error: > > SQLSTATE[42000]: Syntax error or access vi

PHPUnit Fixture Failure

2012-08-20 Thread Andrew Johnston
Hello everyone- I started testing my application with PHPUnit. All of the built in tests succeed, but the test I created failed with the following error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Get Data about Current Page

2012-07-23 Thread Andrew Johnston
How would I get data for a current view? For example, if I had the page: http://example.com/view/2 and I wanted to link to: http://example.com/view/3 How would I do that? I don't use Paginator. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the

Re: Connecting to a ReSTful API (Google apps) instead of a database.

2012-07-23 Thread Andrew Lechowicz
Also, I found this on StackOverflow. But I'm not sure how I would use it. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org

Re: Connecting to a ReSTful API (Google apps) instead of a database.

2012-07-23 Thread Andrew Lechowicz
Not that it matters but the path where I put the google library actually reads "app/Vendor/GoogleAPI/" -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related

Connecting to a ReSTful API (Google apps) instead of a database.

2012-07-23 Thread Andrew Lechowicz
Hello all and thanks for reading my topic. First let me say that I've very new to CakePHP and MVC in general so please bare with me. I have actually read The Book and found it to be a great starting point, and the main reason I chose Cake over other PHP MVC frameworks. I'm working on a webser

Two tables with multiple relationships

2012-07-17 Thread Andrew Johnston
Hello Again Everyone- I'm having a bit of trouble establishing my databases. To sum up my application, it allows users to make modules which then can be viewed by other users of the creator's choice. So I have: User hasMany Module <-- This is where I place the user id number of the creator o

Re: Login Forms

2012-07-13 Thread Andrew Johnston
Thanks Steve, but that doesn't quite answer my question. Can home.ctp be a login page? As it has no controller I don't know where I could put the Auth components. Andrew On Friday, July 13, 2012 7:42:27 AM UTC-4, Steve wrote: > > You can use a Eagle User Management Plugin

Login Forms

2012-07-13 Thread Andrew Johnston
Hello Everyone- I'm new to CakePHP and I'm a bit confused with the idea of login forms. I've read just about every page I could find on the issue, but none of them seemed to mirror my problem exactly. I'm using Wordpress for the static portion of my site and I wanted to have a link that said

Session sharing through new tabs via hyperlink inside email.

2011-09-14 Thread Andrew Senner
I have an issue where user A logs into our application, that user does there thing. Through the application we have email notifications which notify the user of certain things which happen during any period of time. Well inside this email there is a link which takes them to the corresponding page

Help with Complex SQL FIND/COUNT

2011-06-17 Thread Andrew
I need a way in CakePHP to find if a 1-Many record has more that that one entry in the Many Table... This what what i would like to do in Cake... SELECT *, COUNT(`tank_id`) AS NumOccurrences FROM `shipments` LEFT JOIN `tanks` ON (`shipments`.`tank_id` = `tanks`.`id`) GROUP BY `tank_id` HAVING ( C

return to paginate page following edit update

2011-06-02 Thread Andrew Fielden
Hi I am pretty new to cakephp and I am struggling to do something that I think should be a relatively common problem. We have a list of records that we are paginating, a user can select a record to edit. Upon completion of the edit the user is then returned to the paginated list. My usual (non c

Re: Incorrect behavior of delete() method

2010-12-16 Thread Andrew Hodirevski
7;, 'fields' => '', 'order' => '' ), 'Project' => array( 'className' => 'Project', '

Re: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me? On 13 дек, 12:41, Andrew Hodirevski wrote: > Hello! > I have three models: > > Project > User > ProjectsUser > > The ProjectsUser table is used for HABTM relations between Project and > User. > This is remove() method of Project

Re: Incorrect behavior of delete() method

2010-12-15 Thread Andrew Hodirevski
Bump. Anyone can help me? On 13 дек, 12:41, Andrew Hodirevski wrote: > Hello! > I have three models: > > Project > User > ProjectsUser > > The ProjectsUser table is used for HABTM relations between Project and > User. > This is remove() method of Project

problem with CpAmf v0.11

2010-12-13 Thread andrew sky
Hi there, I am using CpAmf v0.11 provided at http://carrotplant.com/en/blog/cpamf-php-example and keep getting the following error whenever i access the browser function : (mx.rpc::Fault)#0 errorID = 0 faultCode = "Client.Error.MessageSend" faultDetail = "Channel.Connect.Failed error NetCo

Incorrect behavior of delete() method

2010-12-13 Thread Andrew Hodirevski
Hello! I have three models: Project User ProjectsUser The ProjectsUser table is used for HABTM relations between Project and User. This is remove() method of Project model: function remove($project_id, $user_id) { /* * Проверяем, относится ли выбранный проект к пользоват

Internationalization in Cake - not works for me

2010-12-11 Thread Andrew Hodirevski
What am I doing wrong? I've got the next part of View: __('Ваш логин', true), After that I've generated using cake 'cake i18n extract' neccessary path and default.pot, which I copied to app/locale/eng/LC_MESSAGES/ default.po and edited with PoEdit. The part of default.po for the previous string

Re: Containable Behavior, conditions and empty array

2010-12-09 Thread Andrew Hodirevski
or my question ;) So, how?' On 9 дек, 17:07, "j.blotus" wrote: > Please see > > http://groups.google.com/group/cake-php/browse_thread/thread/f649c3b2... > > On Dec 9, 9:44 am, Andrew Hodirevski wrote: > > > > > > > > > He

Containable Behavior, conditions and empty array

2010-12-09 Thread Andrew Hodirevski
Hello! I have the next question. There is part of code: $result = $this->find('all', array( 'contain' => array( 'User' => array( 'fields' => 'id', 'conditions' => array( 'id

Re: Some questions about HABTM relations and join tables.

2010-12-09 Thread Andrew Hodirevski
You mean bindModel() calls? On 9 дек, 12:00, Almudena Garcia wrote: > Good day, > > Isn't it simple if you paste here your code? > Anyway, I don't see in your cake query any join... > What are you trying to do? > > Regards. > > 2010/12/9 Andrew Hodirevski

Some questions about HABTM relations and join tables.

2010-12-09 Thread Andrew Hodirevski
Good day! So, I have the next tables: projects users projects_users Project hasAndBelongsToMany User User hasAndBelongsToMany Project ProjectsUser belongsTo User ProjectsUser belongsTo Project Here is code all of models: https://gist.github.com/734531 So, when I am trying to do the next query:

Re: Call to undefined method Shell::getAssociated()

2010-12-07 Thread Andrew Hodirevski
Huh, you are right, it was overrided. Btw can I use separate usermodel Shells and not to have conflict with core Shell model? On 7 дек, 23:53, AD7six wrote: > in the absence of any useful information I'd say you've created a model > named Shell - Shell is a core class, so should be considered a r

Call to undefined method Shell::getAssociated()

2010-12-07 Thread Andrew Hodirevski
Hello! I got a subj error when I creating some models. I use the last cake version and windows 7. So, what the problem is and how can I fix it? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you a

Why the error "Class 'ErrorHandler' not found" throws?

2010-12-01 Thread Andrew Hodirevski
Hello! I am using the latest versions of CakePHP and SimpleTest but when I start unittests the next error throws: Fatal error: Class 'ErrorHandler' not found in Z:\home\prodvigator\www \cake\libs\object.php on line 201 So, why? Check out the new CakePHP Questions site http://cakeqs.org and help

Re: Accessing variables in referenced tables in views

2010-09-14 Thread Andrew Alexander
So am I approaching this the wrong way? I could make a method in my controller to retrieve the variables, but that seems like bad design to me Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you ar

Re: Accessing variables in referenced tables in views

2010-08-18 Thread Andrew Alexander
And yes thread.php and post.php has a belongsTo User. post.php: var $belongsTo = array( 'Thread' => array( 'className' => 'Thread', 'foreignKey' => 'thread_id', 'conditions' => '',

Re: Accessing variables in referenced tables in views

2010-08-18 Thread Andrew Alexander
Placing "" in view.ctp gives me the error: Notice (8): Undefined variable: threads [APP\views\threads\view.ctp, line 1] If I use the "$thread" variable instead, I get an array with posts and their user_ids but not the usernames: "Array ( [Thread] => Array ( [id] => 7 [subject] => c [user_id] => 5

Accessing variables in referenced tables in views

2010-08-17 Thread Andrew Alexander
I am attempting to create a forum in php. In my project I have tables: threads, posts, users. And each post has a foreign key for a thread and a user. In my thread view I want to replace the user_id field with the corresponding username for each post. I've tried "echo $post['User']['username'];" bu

Re: Returning Model Instance from a different model

2010-08-06 Thread Andrew Myers
I think I've solved this. $temp->set('user_id', $userId); Did the trick. Andrew. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups &

Returning Model Instance from a different model

2010-08-06 Thread Andrew
;Setup" model prepopulated with "suggested data", but I do not require it to be saved to the db until the user reviews it and re-submits. I'm primarily a ColdFusion programmer and new to CakePHP and my PHP skills are pretty basic so it's entirely possible I'm complet

Re: HABTM - can't get model back

2010-07-20 Thread Andrew
Thanks, I'll give it a go Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To

HABTM - can't get model back

2010-07-20 Thread Andrew
t; 'category_id' ) ); class CategoryCity extends AppModel { var $name = 'CategoryCity'; var $useTable = 'categories_cities'; var $belongsTo = array ( 'Category' => array (

Re: Cakephp - Subdirectory - Removing index.php from URLs

2010-06-17 Thread Andrew
ow do you get CakePHP to create links that do not include the index.php subdirectory? On Jun 17, 4:27 pm, Andrew wrote: > Hello, > > I recently installed cakephp in a subdirectory directly off the root > directory. To get this working I used the htaccess settings in > Appendix 1 belo

Cakephp - Subdirectory - Removing index.php from URLs

2010-06-16 Thread Andrew
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^subdir/(.*)$ /subdir/app/webroot/index.php?url=$1 [QSA,L] p.s. I cannot change httpd.conf because of my hosting provider. Thanks! Andrew Check out the new CakePHP Questions site http://cakeqs.org and help oth

Re: Missing Database Table error

2010-06-11 Thread Andrew
s User extends AppModel { var $name = 'User'; var $hasAndBelongsToMany = array( 'User' => array( 'className' => 'User', 'foreignKey' => 'user_id', 'dependent&#x

Re: Missing Database Table error

2010-06-11 Thread Andrew
) .. > > would the model be UsersVote or UserVote. Do both parts get singularized? > > > In any case, your issue still seems to be with naming conventions. > > > - Ed > > > On Fri, Jun 11, 2010 at 5:43 PM, Jonathon Musters wrote: > > > > I think the new

Missing Database Table error

2010-06-11 Thread Andrew
Hello all, I've been using cakephp for a few months now and I love it!! I must admit I am still getting used to some of the concepts. At the moment I'm trying to add a database bridging table for a HasAndBelongsToMany Model. My three models involved are Users, Votes and Users_Votes. So when I cal

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
After bugging the guys on IRC and not figuring anything out, I decided to try refreshing my cake directory with the latest in the 1.2.6 branch and that seemed to fix the issue. Sorry, guys. On Mar 29, 4:40 pm, AD7six wrote: > On Mar 29, 10:18 pm, Andrew wrote: > > > > > >

Re: Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
I use getpath() to build my breadcrumbs too, but it will get the wrong path sometimes, like this: Array ( [0] => Array ( [Page] => Array ( [id] => 821 ) [_explicitType] => Page ) [1] => Array

Page Model and TreeBehavior Issue

2010-03-29 Thread Andrew
I've got a Pages model that I'm using the TreeBehavior for a hierarchy. I'm having issues, though, with the breadcrumbs coming through incorrectly. It seems that every time I call verify(), I get this sort of result: [0] => Array ( [0] => node [1] => 827

Model help

2010-03-17 Thread Andrew
;Item->findAllByCategoryId('1')); And now I'm totally stuck, as this is the first model I've created. I had a look through the model documentation but couldn't see anywhere that dealt with SQL from two tables :-( Thanks Andrew Check out the new CakePHP Questions site htt

CakePHP 1.2.6 First Character Issue

2010-02-25 Thread Andrew
I'm working on retrieving a stack of data and for some reason some of the data gets corrupted. For instance, I've got some Post models that each are related to Comment models (hasMany), and each of the Comment models belongsTo a User. When retrieving the data, here's what I get from the database fo

Re: looking for developer (Were based in Cleveland, Ohio)

2010-01-28 Thread Andrew
opportunities to receive compounding business from their help. I am also providing an opportunity to land a good paying role that doesn't require someone to punch a clock. And on top of all this, you can get a copy of Seth Godin's new book. Who wouldn't want that? -- Andrew On Jan 28,

Re: looking for developer (Were based in Cleveland, Ohio)

2010-01-28 Thread Andrew
. We will send you a free copy of Seth Godin's new book called Linchpin. -- Andrew On Jan 28, 1:51 am, "ecommy.com" wrote: > what kind of project do you want? what's the proposed reward to the > coder? part of the business / flat fee per project? > > O

looking for developer (Were based in Cleveland, Ohio)

2010-01-27 Thread Andrew
. -- Andrew Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To u

Re: Blog tutorial trouble...

2010-01-27 Thread Andrew Poquette
Ok, so I changed Cake to use 'pretty urls' and turned mod_rewrite off and it works now. Now, I just need to figure out why it wasn't working in the first place On Jan 27, 11:17 am, Andrew Poquette wrote: > I got this when I restarted apache... > > * Restart

Re: Blog tutorial trouble...

2010-01-27 Thread Andrew Poquette
qualified domain name, using 127.0.1.1 for ServerName (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs On Jan 27, 11:12 am, Andrew Poquette wrote: > Thank you for the help so far!  I enabled mod rewrite, no

Re: Blog tutorial trouble...

2010-01-27 Thread Andrew Poquette
Thank you for the help so far! I enabled mod rewrite, no luck. On Jan 27, 9:59 am, Akeda Bagus wrote: > On Wed, Jan 27, 2010 at 10:24 PM, Andrew Poquette wrote: > > So, I installed cake, set everything up, and have the welcome page > > saying that Cake can connect to the databas

Re: Blog tutorial trouble...

2010-01-27 Thread Andrew Poquette
les are hidden it is easy to > overlook them, especially the one in the root. > > Jeremy Burns > On 27 Jan 2010, at 15:24, Andrew Poquette wrote: > > > > > So, I installed cake, set everything up, and have the welcome page > > saying that Cake can connect to the

Blog tutorial trouble...

2010-01-27 Thread Andrew Poquette
So, I installed cake, set everything up, and have the welcome page saying that Cake can connect to the database, and I'm good to go. I created a model, a controller, and a view via the tutorial, but when I go to http://localhost/posts/index I get a 404 error. I've searched the group here and I co

Multiple Model Pagination

2009-12-24 Thread Andrew
mber of database calls down, so any suggestions along those lines would be great. Thanks! ~Andrew Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP&q

Re: CakePHP performance 1.2 - is future any better?

2009-11-24 Thread Andrew Okhmat
ripts / classes that consume the most CPU time. Do not do this on a production server, because profiler adds a serious cpu load on the server. -- Andrew Okhmat http://Supportex.Net - linux remote installation, support, performance and security tuning. On Nov 23, 9:02 pm, Balrog wrote: > Hel

Re: Question Concerning Nested Relationships

2009-10-22 Thread Andrew
Nice! Thanks a lot. On Oct 22, 3:20 am, Bert Van den Brande wrote: > Use the Containable behavior :http://book.cakephp.org/view/474/Containable > > On Wed, Oct 21, 2009 at 7:32 PM, Andrew wrote: > > > > > > > I've got a Post model set up that has a BelongsT

Question Concerning Nested Relationships

2009-10-21 Thread Andrew
ated to it through the Group model without retrieving any more of the other relationships in the Post model. In other words, I'd like to set recursive=2 for the Group model and recursive=1 for other relationships. What's the best way to do th

Re: Doing a calculation as a field in a find

2009-09-11 Thread Andrew Koebbe
Ok. The parentheses worked. So the moral of the story is. Don't use model names and put the math in parentheses. Thanks for the help. --Andrew On Sep 11, 11:01 am, "euromark (munich)" wrote: > did you try it this way: > > (field1-field2) as foo > > maybe you ne

Re: Doing a calculation as a field in a find

2009-09-11 Thread Andrew Koebbe
Thanks for the suggestion. If I do that it back-ticks the whole thing select `x-y` AS `difference` from ... putting spaces around the minus sign produces similar errors. Is there a way to remove the back ticks for that field? --Andrew On Sep 11, 7:44 am, Rick wrote: > Assuming you don

Doing a calculation as a field in a find

2009-09-10 Thread Andrew Koebbe
`Model`.`x - Model.y as difference` from ..." Am I missing something simple here? I know I could do the subtraction outside the query, but I want to be able to order the query by the result of this subtraction. Thanks. --Andrew --~--~-~--~~~---~--~~ You recei

Saving Nested HABTM relationships

2009-09-03 Thread Andrew Senner
Alright, I searched the groups was wondering if I could get a little help with this. Here is the associations. Record HABTM Product Product HABTM Status I know the format for saving HABTM data is [Model][HABTM][HABTM] that is for Record to Product the format would be: $this->data { ['Record

  1   2   >