redirect problem

2011-07-24 Thread cake-learner
Everytime I use $this -> redirect( ) to forward to the specific page it adds app/webroot/index.php to the url between "http://www.mywebappdomain.com"; name and "/ controller/action" so it looks like http://www.mywebappdomain.com/app/webroot/index.php/controller/action The page itself is displayed

possible to add a new database connection?

2011-07-21 Thread cake-learner
I am developping web app for creating customized surveys. Each user will have own subdomain like client1.mywebapp.com and each client will have their own database for saving surveys and tracking results. I already made it so that the same cakephp source code is used for all subdomain but I want to

Re: model find function

2011-07-07 Thread cake-learner
I mean I can always go 10 mins with this once in a while. -- 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 questions. To unsubscribe from this group,

model find function

2011-07-07 Thread cake-learner
why cakephp is not generating any errors when I go model -> find( 'all', array( 'id' => 5 ) ); instead of model -> find( 'all', array( 'conditions' => array( 'id' => 5 ) ); It is very helpful if it does. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check

how can i set up this in cakephp?

2011-06-21 Thread cake-learner
I want to add a feature to create a note for all accounts in my system. You can create a note for yourself and note for others. All account will have a page to see all notes in a page and also have a widget to display recent notes in the dashboard. Everytime someone create a note you you will recei

find list

2011-06-10 Thread cake-learner
Can I get the search result so that it returns the id as key? so if you are searching for the users I want to get the result returned like this. array( [1] => array( [name] => "jone done" [email] => 'j...@test.com" ), [2] => array( [name] => "mike tyso

cakephp gives me a lot of empty page

2011-06-07 Thread cake-learner
I found it cakephp likes errors with blank page so we don't know how to solve. -- 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 questions. To unsubscr

add extra function to model but cakephp thinks it's query???

2011-06-05 Thread cake-learner
I just add an function to model and call that function from another controller. but what i get is the following error. What happen? In Model( department.php ), class Department extends AppModel { var $useDbConfig = 'default_account'; function get_child_dep( $dep_id, $child ){ } } I

Response in object array?

2011-05-09 Thread cake-learner
I read somewhere in cakephp 2.0 model -> find will return the object instead of array? Did anyone create a wrapper class so that the "find" function return the array of object for 1.2.8 or 1.3? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new

Re: Validate from within a model

2011-04-27 Thread cake-learner
I always do validation with Jquery plugins not with cakephp function since the form function is limited. -- 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 relate

naming Model

2011-04-08 Thread cake-learner
I have following Controller and Model set up manually since the baker is not so easy to use. But somehow I can't get to work. First of all, about the class name, I am not sure why they want to use singular for model and plural for controller and small letters for routes.php. It's been nightmare wit

save object in Session Component

2011-04-05 Thread cake-learner
I have set up an application object to save all info in session, but I don't know how to save with "cakephp" session. In app_controller, i have set up like this in beforefilter() and beforeRender() but I am not able to retrieve the informatoin when i go to the next page. What I am doing wrong here

execute query twice in a short time is a problem?

2011-03-31 Thread cake-learner
I have a problem saving model in a loop. I am not sure the problem is executing a query twice in such a short time or how I am calling is the problem. I tried with $this -> controller -> Notification -> save but didn't work so i am trying to do with maunally query instead but still get the same res

syncing two databases

2011-03-29 Thread cake-learner
Is there any way to sync tables schema between two databases? I have already set up a script to push source code to live whenever it's ready, but i want to know there is a way to sync tables to make sure any changes on database will be updated to live database as well. I know there are a couple of

my app developer with cakephp is slow

2011-03-21 Thread cake-learner
Is there anything I need to do before putting my app on live. Now i set false to Cache.disable and 0 to debug, but looks like it takes quite some time to load the page. If there is any way to find a bottle neck I would appreciate, too. -- Our newest site for the community: CakePHP Video Tutorial

select multiple options

2011-03-15 Thread cake-learner
how can i select multiple options? i do like this but didn't work. select( 'SurveyCategory.'.$index.'.department_list', $department_list, array( 'selected' => array( 232,233 ), 'mutiple' => 'true' ), array( 'multiple'=>'true', 'class' => 'input_selection group_selection' ) ); ?> http://book.c

session not saved in app controller

2011-03-13 Thread cake-learner
I set up my app object in both beforeFilter and afterFilter callback functions class AppController extends Controller{ var $myAppObj; var $components = array("Site" , "Notification", "Auth", "Mailer", "Session"); function beforeFilter(){ $this -> myAppObj = unserailize( $this ->

is htaccess problem or cakephp's problem?

2011-03-10 Thread cake-learner
My app used to forward to login.php page when user comes into the page but today it started going to index.php/login instead. mydomin.com/login page still exists but when i rediret( /login ) it goes to index.php/login -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

cakephp 2.0 will be like this to save the data?

2011-03-10 Thread cake-learner
I hope we can do this oop way pretty soon to save data not the array( which cost me a lot of time to debug ) $obj = new myObject(); $obj -> name = 'myname'; $obj -> save(); $obj = myObject::load(id); $obj -> save(); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakeph

Re: cakephp model problem

2011-03-07 Thread cake-learner
rray('Account.username' => $emailAddress))); > > -----Original Message- > From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf > > Of cake-learner > Sent: Monday, March 07, 2011 7:34 AM > To: CakePHP > Subject: cakephp model problem > >

Re: cakephp model problem

2011-03-07 Thread cake-learner
Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 7 Mar 2011, at 11:03, cake-learner wrote: > > > Still continue having problem with cakephp model. > > > I always have the account empty and don't know why. > > > Configure::write( "deb

cakephp model problem

2011-03-07 Thread cake-learner
Still continue having problem with cakephp model. I always have the account empty and don't know why. Configure::write( "debug", 2 ); $emailAddress = $_POST[ 'email_address' ]; $sql = "SELECT * FROM accounts WHERE username = '" . $emailAddress . "' LIMIT 1"; echo $sql; $account = $this -> Account

Creating Shell for cron job

2011-02-22 Thread cake-learner
I am setting up the shell so that i can register as a cron job for maintenance tasks. In the past i do it manually and need to check if there is the same process running. If I use the shell I don't need to consider that? Thanks, -- Our newest site for the community: CakePHP Video Tutorials htt

Re: 1.2.8 cake console

2011-02-22 Thread cake-learner
Thanks i got it working. I just had to relogin. -- 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 questions. To unsubscribe from this group, send email

Re: 1.2.8 cake console

2011-02-22 Thread cake-learner
but I can call baker by 'cake bake' On Feb 22, 11:46 am, cake-learner wrote: > i can't get it workig the console. Everytime i typed in "cake -app / > home/myaccount/public_html/dev/app" it just gives me to error saying > like the following > > my app fo

Re: 1.2.8 cake console

2011-02-22 Thread cake-learner
but baker works by going "cake bake" On Feb 22, 11:46 am, cake-learner wrote: > i can't get it workig the console. Everytime i typed in "cake -app / > home/myaccount/public_html/dev/app" it just gives me to error saying > like the following > > my app fo

1.2.8 cake console

2011-02-22 Thread cake-learner
i can't get it workig the console. Everytime i typed in "cake -app / home/myaccount/public_html/dev/app" it just gives me to error saying like the following my app folder is "/home/myaccount/public_html/dev/app". However I am not sure about "working" directory seems like as I change the -app path

Re: move to new server

2011-02-15 Thread cake-learner
error message on firefox "The page isn't redirecting properly" and when i look at in fiddler it's trying to go back to root(mydomain.com/) 20 times -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.or

Re: move to new server

2011-02-15 Thread cake-learner
yes seems like all files are there. I see router.php is there. yes i was developing the app on the other server. only difference is htaccess files .htaccess root "empty" app/ RewriteEngine on RewriteBase / RewriteRule^$webroot/[L] RewriteRule(.*) webroot/$1

Re: move to new server

2011-02-15 Thread cake-learner
After setting debug to 2, Fatal error: Class 'Router' not found in /home/gowerk/public_html/dev/ cake/dispatcher.php on line 281 -- 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

Re: move to new server

2011-02-15 Thread cake-learner
I debug and removed all errors, but now it doesn't show any thing but a blank page. http://cakephp.org) * Copyright 2005-2010, Cake Software Foundation, Inc. (http:// cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * *

Re: move to new server

2011-02-15 Thread cake-learner
No I have been trying to get it working and CAKE_CORE_INCLUDE_PATH is not define. Should be like this? if (!defined('ROOT')) { define('ROOT', dirname(dirname(__FILE__))); } if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', ROOT); } -- Our newest site for

Re: move to new server

2011-02-15 Thread cake-learner
yes it worked on another server, but having the problem after moving files to another server. -- 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 questions

Re: move to new server

2011-02-15 Thread cake-learner
I gotta this because CORE_PATH is not define, either. Warning: include(cake/bootstrap.php) [function.include]: failed to open stream: No such file or directory in /home/gowerk/public_html/dev/ app/webroot/index.php on line 57 Warning: include(cake/bootstrap.php) [function.include]: failed to open

Re: move to new server

2011-02-15 Thread cake-learner
It seems that it skips index.php on the root and came to webroot/ index.php -- 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 questions. To unsubscribe

Re: move to new server

2011-02-15 Thread cake-learner
and also CORE_PATH is not defined. I think what happen is that it skips index.php on root and came to webroot/index.php because of how I change htaccess is defined. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http:

Re: move to new server

2011-02-15 Thread cake-learner
On Feb 15, 11:04 am, MissYeh wrote: > It seems that the script is unaware what value DS is, it should be a slash. > > Is the following code present in the webroot/index.php file before line 52? > >         if (!defined('DS')) { >                 define('DS', DIRECTORY_SEPARATOR); >         } I

move to new server

2011-02-15 Thread cake-learner
*I just moved my cakephp app to new server and have some configuration issue. I got the following message and need to specify the `* CAKE_CORE_INCLUDE_PATH` but can`t find any place to specify. Can I just add to core.php? *Warning*: include(cakeDSbootstrap.php) [function.include

find all not working.

2011-02-14 Thread cake-learner
Very often i got this error and i had to do custom query why it's not putting '*'? $this -> loadModel( 'Company.Role' ); $this -> Role -> useDbConfig = $this -> db_name; $arrRoles = $this -> Role -> find( "all" ); Warning (512): SQL Error: 1064: You have an error in your SQL syntax; check the man

should be able to access model easier

2011-02-10 Thread cake-learner
Why not we can't access models by $this -> Controller -> ModelName( I meant all models defined in $uses ) or $this -> Controller -> Uses -> ModelName? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp

jqgrid?

2011-02-10 Thread cake-learner
Has anyone try to integrate cakephp 1.3 with Jqgrid? -- 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 questions. To unsubscribe from this group, send

Is there any way to display error when working on ajax request?

2011-02-09 Thread cake-learner
I set up one class to handle all ajax request called ajax_controll. The thing is everytime I develop a function and there is some kind of syntactic errors it returns empty. Usually take a couple of hours to develop one simple query because of this. Is it anyway to spit out the php error on browser(

Where should I put class accessing from all the places

2011-02-09 Thread cake-learner
I want to create one class accessible from anywhere(MVC). Where should I put or is it possible? -- 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 questio

why sometimes i have to specify the field name otherwise i won't get the resule?

2011-02-04 Thread cake-learner
Time to time I need to specify the fields; otherwise i wont' get the result or empy result. $employee = $this -> Employee -> find( 'first', array( 'fields' => array( 'first_name', 'last_name' ), 'conditions' => array( 'Employee.accounts_id' => $uid ) ) ); if it's for "first" i need to specify the

where would you put the container?

2011-02-01 Thread cake-learner
I want to set up a container so that i can save everything and access through that class when getting session variables. Page A $appClass = new AppClass(); $appClass -> specific_value = 1000; $this -> Session -> write( "appclass", appClass ); Page B $appClass = $this -> Session -> read( "appclass

Is there any way to incldue all models automatically

2011-01-27 Thread cake-learner
Is there any way to include all models by default. I run to the model issue so many times defining the relationship so i just want to join manually so i can cut some development time. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Q

Always having trouble adding new tables

2011-01-24 Thread cake-learner
When i add new table it sometimes say request address "/somepath/ somepath" was not found on this server. I know i configure model wrong because of this it takes time to find the problem. Is there any way to see proper error? -- Our newest site for the community: CakePHP Video Tutorials http://t

static function in model

2011-01-24 Thread cake-learner
I want to define the static function so that the user name ( firstname + lastname ) can be used everywhere in view. Class User{ static function getName( $id ){ $userObj = $userObj -> read( 'id', $id ); return $userObj[ 'User' ][ 'firstname' ] . ' ' . $userObj[ 'User' ] [ 'lastname' ]; } } a

it's not suitable for deep hyraphical structured system

2011-01-14 Thread cake-learner
I am feeling that cakephp is not suitable for system with data which describes deep hierarchical structure? things like deeling with big corporate organization map? I tested It only supports structure with 2/3 level deep when generating the form. It might be possible but takes more time to develop

access application wide variable from elements

2011-01-09 Thread cake-learner
How can i set up so that that variable can be referenced in the element? I have set up left_menu.ctp in the element and want to change the menu items depending on that what role the current user is. Where I can get the user object from the session so that user object is available in left_menu.ctp?

session problem or misunderstanding.

2010-12-19 Thread cake-learner
I am trying to pass a variale with session but without success for a while. within the same controller i go $this -> Session -> write( 'id', 1 ); $this -> Session -> read( 'id' ); i gotta nothing and empty when i go debug( $this -> Session ); I tried with $_SESSION so i guess within the same contr

how to assign form name when it is complicated

2010-12-18 Thread cake-learner
I am trying to design the form like this. http://skoizumi.com/cakephp/complicated-form.gif you can add categories to a survey, add questions to a category, and add selection values to a question. I saw some of documents where you can define the array of records by using classname and index with

possible to create a nested post with forms?

2010-12-15 Thread cake-learner
I am trying create a form so that when post that data this will still keep the relationships with other element. Say i have a category name and a subcategory name like shown in below. How can i define the form so that the relationship between this category and subcategory will be kept when submitte

how can i create a default selection

2010-12-15 Thread cake-learner
how i can insert the a little text on top of select form so that it goes Select category, cat1, cat2, cat3 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 "

ZendStudio php is not color coded

2010-12-13 Thread cake-learner
Based on this http://kb.zend.com/index.php?View=entry&EntryID=180 i change the setting for ctp but i don't see any of php code color- coded. Any of you have done this before? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You rece

multiple posts

2010-12-13 Thread cake-learner
I like to set up the form where i have a list of categories and list of sub categories. A new category can be added to this list and the same for sub category. A category and sub category should one-many relationship. How can i add extra form so that cakephp knows there are a couple sub categori

Do you use baker?

2010-12-12 Thread cake-learner
I was wondering if everyone is using baker to speed up development process? Since I am new to cakephp it take more time to learn and use 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

ModelBaker

2010-12-10 Thread cake-learner
I was looking for something like this and share with you guys http://www.youtube.com/watch?v=JOOhSQqANQs 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 "C

SSL implementatoin 1.2 or 1.3

2010-12-09 Thread cake-learner
I am working on my application and want to implement ssl later on the development I am with 1.2 but does it work better with 1.3? Also for authentication and authorization, I created customized one by myself without using ACL componets ( i studied the cakephp by myself for fun and didn't noticed

Re: Time Helper

2010-12-09 Thread cake-learner
$time->niceShort(parameters); 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.co

why i have to put another modal class name in $uses?

2010-12-09 Thread cake-learner
I found it very annoying that everytime i need use another model i have to define the table in $uses={}. Is this mean model classes(model.php) are not loaded? If all php classes are loaded when page is loaded, why limiting from using them without defining model names. Check out the new CakePHP Que

Re: how can i get the return value in classes

2010-12-06 Thread cake-learner
> You don't. However, as I understand, Cake 2.x will have that option. I see. Thanks for clearing out If that's the case i want to set up a class saying UserObj so that easier for me to pass around between Model, View, Contoller and I can use the autocomplete function of IDE so i don't have to re

how can i get the return value in classes

2010-12-06 Thread cake-learner
I want to get return values in object in stead of array. i just quickly go through the document for "find" but didn't see the object option. 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