Filepath question

2009-06-16 Thread lakers fan

Hello,

   I have a form input of type 'file' to choose a file

 

 input('sourcedir', array('div' => false, 'label' => false, 
'class' => 'text', 'type' => 'file')); ?>

 

Is it possible to select a directory instead of file?. If not how can I get the 
full filepath..

 

i checked the $this->data['User']['sourcedir'].. there is no filepath in that 
array only name is there..

 

how do i get the full filepath?..

 

Thanks,

Bharani
 
> Date: Tue, 16 Jun 2009 05:27:31 -0700
> Subject: Re:
> From: martin.westin...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> This? As in $this->recfunction...
> 
> 
> 
> On Jun 16, 1:56 pm, lakers fan  wrote:
> > Hello,
> >
> >  I want to write a recursive function in my users controller which will 
> > be called from the url.
> >
> > http://localhost/cake/users/recfunction/param1/param2
> >
> > This recfunction will call itself if needed..
> >
> > function recfunction(param1, param2)
> >
> > {
> >
> >  if(condition == true)
> >
> >{
> >
> > recfunction(param1, param2); //get error in this line recfunction 
> > not defined.
> >
> >}
> >
> > }
> >
> > any ideas?
> >
> > Thanks,
> >
> > Bharani
> >
> > _
> > Lauren found her dream laptop. Find the PC that’s right for 
> > you.http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
> > 

_
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



[no subject]

2009-06-16 Thread lakers fan

Hello,

 I want to write a recursive function in my users controller which will be 
called from the url. 

 

http://localhost/cake/users/recfunction/param1/param2

 

This recfunction will call itself if needed.. 

 

function recfunction(param1, param2)

{

 if(condition == true)

   {

recfunction(param1, param2); //get error in this line recfunction not 
defined.

   }

}

 

any ideas?

 

Thanks,

Bharani

 

 

_
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



cake compatibility problem

2009-06-15 Thread lakers fan

Hello,

 I m working with cake 1.2.2 whereas my collegue works with cake 1.2.3. 
When he got the app folder from me, and run the website he got the following 
errors.. is it a compatibility issue?

 


Warning (512): Cache not configured properly. Please check Cache::config(); in 
APP/config/core.php [CORE\cake\libs\configure.php, line 663]

Code | Context

$boot = true

$shellPaths = null

$localePaths = null

$vendorPaths = null

$pluginPaths = null

$helperPaths = null

$viewPaths = null

$componentPaths = null

$controllerPaths = null

$behaviorPaths = null

$modelPaths = null

$cache = false



Warning (2): array_merge() [function.array-merge]: Argument #1 is not an array 
[CORE\cake\libs\configure.php, line 684]

Code | Context

$boot = true

$shellPaths = null

$localePaths = null

$vendorPaths = null

$pluginPaths = null

$helperPaths = null

$viewPaths = null

$componentPaths = null

$controllerPaths = null

$behaviorPaths = null

$modelPaths = null

$cache = false

$duration = "+10 seconds"

$pref

2): array_merge() [function.array-merge]: Argument #1 is not an array 
[CORE\cake\libs\configure.php, line 691]

Code | Context

$boot = true

$shellPaths = null

$localePaths = null

$vendorPaths = null

$pluginPaths = null

$helperPaths = null

$viewPaths = null

$componentPaths = null

$controllerPaths = null

$behaviorPaths = null

$modelPaths = null

$cache = false

$duration = "+10 seconds"

$prefix = null

 

Thanks,

Bharani

_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Auth problem

2009-06-11 Thread lakers fan

Hello,

  I have an AdminsController class that uses User model to validate the 
username and password. the app_controller's before filter looks like this

 

public function beforeFilter()
 {
  $this->set('site_url', 'http://localhost/cake/');
  
  //Override default fields used by Auth component
$this->Auth->fields = 
array('username'=>'email_address','password'=>'password');
  
  
  $this->Auth->loginAction = array('controller' => 'admins', 'action'=> 
'login');
  $this->Auth->logoutRedirect = array('controller'=> 'admins', 'action' 
=>'login');
  $this->Auth->loginError = __('Invalid username or password', true);
  //$this->Auth->authError = __(' ', true);  //this is for now.
  
  $this->Auth->loginRedirect = array(
   'controller' => 'admins',
   'action' => 'manage_users'
  );

  //$this->set('admin', false);
}

 

After it logs in I dont see Auth component setting User information in session. 
I want the user to login before using any other page.

 

My AdminsControllers beforeFilter and login() looks like this

 

 public function beforeFilter()
 {
  parent::beforeFilter();
  $this->Auth->allow('login');
 }
 
 function login()
 {
  $this->Session->write('userrole', '');

  if(isset($this->data))
  {
   //echo pr($this->data);
   $temp = 
$this->User->find(array('email_address'=>$this->data['User']['email_address']));
   //echo pr($this->Auth);
   $this->Session->write('userrole', $temp['Group'][0]['name']);
   //$this->Session->write('user_logged_id', $this->Auth['data']['username']);
   //once admin user logs in, he is redirected to manage users' page
   $this->redirect('/admins/manage_users');
  }
 }

 

Whats happening is everytime i login with correct password, I get Auth error '

You are not authorized to access that location.' and it goes back to login page 
again. In the function login, the echo pr($this->data); has empty string for 
password.
 
Any pointers?
 
Thanks,
Bharani
 
_
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Auth component question

2009-06-05 Thread lakers fan

Hello,

 Whenever I goto login page I get this auto error : Invalid username and 
password. Dont know why auth component automatically validates every time i go 
to login page.

Is there anything that i m missing?

 

Thanks,

Bharani

_
Hotmail® has ever-growing storage! Don’t worry about storage limits. 
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: LOGIN question

2009-06-04 Thread lakers fan

Then its a two stage authentication process. is there a way where i can just 
use username and email_address in the query using User Model..

 

SELECT * from users where username = 'xyz' or email_address = 'x...@test.com';

 

Thanks,

Bharani
 
> Date: Wed, 3 Jun 2009 22:57:02 -0700
> Subject: Re: LOGIN question
> From: j.andersen...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> I suggest that you turn of autoRedirect on login, as described in
> http://book.cakephp.org/view/395/autoRedirect and then use something
> like the following:
> 
> [code example]
> if ( !$this->Auth->user() ) {
> // The user is not logged in, so try with the email as the
> username!
> $this->Auth->fields['username'] = 'email';
> 
> if ( $this->Auth->login() == false ) {
> // Not logged in, so report errors!
> }
> }
> [/code example]
> 
> Enjoy,
> John
> 
> On Jun 4, 7:54 am, lakers fan  wrote:
> > Hello,
> >
> >  I have a login screen with username and password. I want to either use 
> > my username or email address in the username field. I tried setting the 
> > Auth fields as listed below but its not working.
> >
> > $this->Auth->fields = array('username'=>array('username', 
> > 'email_address'),'password'=>'password');
> >
> > The warning that i get is:
> >
> > Warning (2): Illegal offset type in isset or empty 
> > [CORE\cake\libs\controller\components\auth.php, line 845]
> >
> > Code | ContextWarning (2): Illegal offset type in isset or empty 
> > [CORE\cake\libs\controller\components\auth.php, line 313]
> >
> > Is there any other way of doing this??
> >
> > Thanks,
> >
> > Bharani
> >
> > _
> > Windows Live™ SkyDrive™: Get 25 GB of free online 
> > storage.http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
> > 

_
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: CONFIG question

2009-06-04 Thread lakers fan

Oh sorry. i didnt copy the entire code.. But I m not getting any parse error.. 
just that these variables are not working..Here is the full file.

 array(   'Subject' => array( 
'RegActivationMessage' => 'Activate your CueRoom Account'   
),  'contactAddress' => 'x...@zyz.net', 
'defaultFrom' => 'supp...@syx.com', 'defaultLayout' => 'default',   
'defaultSendAs' => 'text',  'defaultDelivery' => 'smtp',
'defaultSmtpOptions' => array(  'port'=>'25',   
'timeout'=>'30','host' => 'localhost',  
'username'=>'xyz',  'password'=>'xyz'   
)   )   ));

?>

Thanks,Bharani

> Date: Thu, 4 Jun 2009 01:50:56 -0700
> Subject: Re: CONFIG question
> From: martin.westin...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> How about:
> 
> Configure::write(array(
>  'Email' => array(
>   'Subject' => array(
>'RegActivationMessage' => 'Activate your CueRoom Account'
>   ),
>   'contactAddress' => 'x...@xyz.net',
>   'defaultFrom' => 'supp...@xyz.com',
>   'defaultLayout' => 'default',
>   'defaultSendAs' => 'text'
> )));
> 
> 
> And your config.php does not look like that, right?
> You do have the php tags there?
> 
> 
> On Jun 4, 10:27 am, lakers fan  wrote:
>> Hello,
>>
>>   I have some variables defined in config.php under /cake/app/config. I 
>> have also included require_once('config.php'); in bootstrap.php. But the 
>> variables that I defined is not working in my user controller.. The 
>> following returns an empty string..
>>
>> Configure::read('Email.defaultSendAs').
>>
>> my config.php looks like this
>>
>> Configure::write(array(
>>  'Email' => array(
>>   'Subject' => array(
>>'RegActivationMessage' => 'Activate your CueRoom Account'
>>   ),
>>   'contactAddress' => x...@xyz.net',
>>   'defaultFrom' => 'supp...@xyz.com',
>>   'defaultLayout' => 'default',
>>   'defaultSendAs' => 'text'
>>
>> )
>>
>> Thanks,
>>
>> Bharani
>>
>> _
>> Insert movie times and more without leaving 
>> Hotmail®.http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM...
> > 

_
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CONFIG question

2009-06-04 Thread lakers fan

Hello,

  I have some variables defined in config.php under /cake/app/config. I 
have also included require_once('config.php'); in bootstrap.php. But the 
variables that I defined is not working in my user controller.. The following 
returns an empty string.. 

 

Configure::read('Email.defaultSendAs').

 

my config.php looks like this

 

Configure::write(array(
 'Email' => array(
  'Subject' => array(
   'RegActivationMessage' => 'Activate your CueRoom Account'
  ),
  'contactAddress' => x...@xyz.net',
  'defaultFrom' => 'supp...@xyz.com',
  'defaultLayout' => 'default',
  'defaultSendAs' => 'text'

)

 

Thanks,

Bharani

_
Insert movie times and more without leaving Hotmail®. 
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



LOGIN question

2009-06-03 Thread lakers fan

Hello,

 I have a login screen with username and password. I want to either use my 
username or email address in the username field. I tried setting the Auth 
fields as listed below but its not working.

 

$this->Auth->fields = array('username'=>array('username', 
'email_address'),'password'=>'password');

 

The warning that i get is:

 
Warning (2): Illegal offset type in isset or empty 
[CORE\cake\libs\controller\components\auth.php, line 845]

Code | ContextWarning (2): Illegal offset type in isset or empty 
[CORE\cake\libs\controller\components\auth.php, line 313]

 

Is there any other way of doing this??

 

Thanks,

Bharani

_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Admin Login

2009-05-27 Thread lakers fan

Sorry let me refine my question.  I have a user model which has a list of 
groups. namely 'user', 'admin' etc.  Similarly the group has multiple users. I 
have an associate for this in my User model:

 

var $hasAndBelongsToMany = array(  
'Group' => array('className' => 'Group',  
'joinTable' => 'groups_users',  
'foreignKey' => 'user_id',  
'associationForeignKey' => 'group_id',  
'unique' => true  
)  
); 

 

 

Now I have two logins,

http://localhost/cake/admin/users/login for admin

http://localhost/cake/users/login for regular users.

 

when a user logins in say as admin, I need to get the groupid associated in 
groups_users table so that I can redirect him to appropriate admin page. Same 
is true for regular users..

Both admin and regular users use the same User model. Is there a way to 
differenciate between these two users?

 

Thanks,

Bharani

 


 
> Subject: Re: Admin Login
> From: bogdanbursu...@gmail.com
> To: cake-php@googlegroups.com
> Date: Wed, 27 May 2009 12:24:15 +0300
> 
> 
> Take a look at this:
> http://book.cakephp.org/view/172/Authentication
> and this:
> http://book.cakephp.org/view/46/Routes-Configuration at Prefix routing
> 
> On Wed, 2009-05-27 at 08:56 +, lakers fan wrote:
> > Hello,
> > I have a requirement, I have two logins .. one for normal users
> > and one for administrators. I have two login pages separately. In my
> > users' controller, I have login() and adminlogin() actions. For normal
> > users I want to use users table to check the username and password,
> > and for administrator, i want to use users table and groups table.
> > groups table is the user groups such as admin and www. How can i do
> > validation using Auth for both in users controller.
> > 
> > Thanks,
> > Bharani
> > 
> > 
> > __
> > Hotmail® has a new way to see what's up with your friends. Check it
> > out.
> > > 
> 
> 
> > 

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Admin Login

2009-05-27 Thread lakers fan

Hello,

 I have a requirement, I have two logins .. one for normal users and one 
for administrators. I have two login pages separately. In my users' controller, 
I have login() and adminlogin() actions. For normal users I want to use users 
table to check the username and password, and for administrator, i want to use 
users table and groups table. groups table is the user groups such as admin and 
www. How can i do validation using Auth for both in users controller.

 

Thanks,

Bharani

_
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to redirect to login page

2009-05-26 Thread lakers fan

Hello,

 I m new to cakephp.. I want to check in every page whether a user has 
logged in or not.. If not I want to redirect him to login page. Is there a way 
to do it in a common place like app_controller?

 

Thanks,

Bharani

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Database Record deletion problem

2009-05-24 Thread lakers fan

Is it because my controller name is : AdminsController that things are not 
working?. Right now addition of records to database works but not deletion.  
Will the deletion of records work if I change the controller to say 
ManageController?.I just want a controller to add, edit and delete records from 
database. 
 
> Date: Sat, 23 May 2009 13:46:40 -0400
> Subject: Re: Database Record deletion problem
> From: bally.z...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> It looks like you've fallen into the same trap that I have in the
> past: trying to use an AdminsController to do all admin stuff. I found
> that it became a real pain very quickly. I know that, with Cake, it
> can be very confusing to create an "admin section" for your site.
> 
> Anyway, I think you're far better off just linking to your
> GroupsController for this, calling admin_delete(). You can still have
> a main admin page, just point links to your other controllers in order
> to list, edit, delete, etc.
> 
> On Sat, May 23, 2009 at 2:00 AM, lakers fan  wrote:
> > do I need to name my action as delete() right now its called deletegroup().
> > because in the same admin controller i will deleting groups, users,
> > permissions etc.. The url looks like this:
> >
> > http://localhost/cake/admins/deletegroup/id
> >
> > controller: admins
> > action: deletegroup
> > parameter: id
> >
> > Thanks,
> > Bharani
> >
> >> Date: Fri, 22 May 2009 18:04:01 -0400
> >> Subject: Re: Database Record deletion problem
> >> From: bally.z...@gmail.com
> >> To: cake-php@googlegroups.com
> >>
> >>
> >> What's the URL in your links? Normally, the action would benamed
> >> delete() or admin_delete().
> >>
> >> As an aside, you should probably put that code inside an if block:
> >>
> >> if ($this->Group->del($id)
> >> {
> >> $this->redirect(...)
> >> }
> >>
> >> On Fri, May 22, 2009 at 6:14 AM, lakers fan  wrote:
> >> > Hello,
> >> > I have a page with list of groups and along with each item there is
> >> > a
> >> > link to delete that group.  But deletion is not working.. here is the
> >> > code
> >> >
> >> >  function deletegroup($id)
> >> >  {
> >> >   $this->Group->del($id);
> >> >   $this->redirect(array('action' =>'groups'));
> >> >  }
> >> >
> >> > when I move the mouse over the delete link, i see proper id value.. if i
> >> > use
> >> > the id to delete that record in phpmyadmin, it succeeds.. The Group
> >> > object
> >> > is valid too..  Am i missing anything?
> >> >
> >> > Thanks,
> >> > Bharani
> >> >
> >> > 
> >> > Windows Live™: Keep your life in sync. Check it out.
> >> > >
> >> >
> >>
> >> >
> >
> 
> > 

_
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Database Record deletion problem

2009-05-22 Thread lakers fan

do I need to name my action as delete() right now its called deletegroup(). 
because in the same admin controller i will deleting groups, users, permissions 
etc.. The url looks like this:

 

http://localhost/cake/admins/deletegroup/id

 

controller: admins

action: deletegroup

parameter: id

 

Thanks,

Bharani
 
> Date: Fri, 22 May 2009 18:04:01 -0400
> Subject: Re: Database Record deletion problem
> From: bally.z...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> What's the URL in your links? Normally, the action would benamed
> delete() or admin_delete().
> 
> As an aside, you should probably put that code inside an if block:
> 
> if ($this->Group->del($id)
> {
> $this->redirect(...)
> }
> 
> On Fri, May 22, 2009 at 6:14 AM, lakers fan  wrote:
> > Hello,
> > I have a page with list of groups and along with each item there is a
> > link to delete that group.  But deletion is not working.. here is the code
> >
> >  function deletegroup($id)
> >  {
> >   $this->Group->del($id);
> >   $this->redirect(array('action' =>'groups'));
> >  }
> >
> > when I move the mouse over the delete link, i see proper id value.. if i use
> > the id to delete that record in phpmyadmin, it succeeds.. The Group object
> > is valid too..  Am i missing anything?
> >
> > Thanks,
> > Bharani
> >
> > 
> > Windows Live™: Keep your life in sync. Check it out.
> > >
> >
> 
> > 

_
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Database Record deletion problem

2009-05-22 Thread lakers fan

Hello,

I have a page with list of groups and along with each item there is a link 
to delete that group.  But deletion is not working.. here is the code

 

 function deletegroup($id)
 {
  $this->Group->del($id);
  $this->redirect(array('action' =>'groups'));
 }

 

when I move the mouse over the delete link, i see proper id value.. if i use 
the id to delete that record in phpmyadmin, it succeeds.. The Group object is 
valid too..  Am i missing anything?

 

Thanks,

Bharani

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AppController issue

2009-05-21 Thread lakers fan

Hello,

I want to create a variable and initialize it in say AppController in 
beforeFilter() and use the variable in the view (ctp file). I created a 
variable $admin = false and tried to use it in view and I get error saying 
$admin is undeclared variable. Is there any other way of doing this?

 

Thanks,

Bharani

_
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Login Redirect Problem

2009-05-20 Thread lakers fan

it is redirected to somewhere else.. and $this->Auth->user() returns true.

 

I would like to know what happens when a form is submitted. Does it go to 
login() in user_controller.php again?.

 

Thanks,

Bharani
 
> Date: Tue, 19 May 2009 07:40:42 -0700
> Subject: Re: Login Redirect Problem
> From: greenmushroo...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> What happens when you submit? Stays there? Redirects somewhere else?
> Throws errors (if so, which ones)?
> 
> In the code you have provided, does "$this->Auth->user()" evaluate to
> true?
> > 

_
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Login Redirect Problem

2009-05-19 Thread lakers fan

Hello,

I have userid and password fields and a login button. When I press login 
button, if the userid and password are correct I want the page redirected to my 
accounts page.

 

So in app_controller.php, in beforeFilter() I have the following code.

 

$this->Auth->loginRedirect = '/users/myaccount';

 

In my users_controller, in login() I have the following code

 

  if($this->Auth->user())
  {
   echo "inside the if login()";
   $this->set('isLoggedin', true);
   $this->redirect($this->Auth->loginRedirect);
  }
  else
  {
   echo "Inside Else loop";
  }

 

But the page is not redirected to myaccount page.. Any pointers??

 

Thanks,

Bharani

_
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CAKEPHP UNDEFINED VARIABLE

2009-05-18 Thread lakers fan

Hello,

I get an error undefined variable $left_content. This variable has been 
defined in beforeFilter() of app_controller.php. In beforeFilter(), the code is:

 

  $this->set("left_content",$left_content);


Somehow the variable is not passed on to the view files.. Any clues??

 

Thanks,

Bharani

_
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



password field is empty

2009-05-15 Thread lakers fan

Hello,

 I have a form which has a password field..

 

$form->password('userpassword', 
array('id'=>'user_registration_password','label'=>'','class'=>'inputbox1', 
'value'=>''));

 

The above field with name userpassword works fine.. but when I change 
'userpassword' to just 'password' , the password field is empty.. When I echoed 
the $this->data in my user controller I get this..

 

 

Array
(
[User] => Array
(
[email_address] => 1...@test.com
[password] => 
)

)

 

Any help would be appreciated.

 

Thanks,

Bharani

_
Hotmail® has a new way to see what's up with your friends.
http://windowslive.com/Tutorial/Hotmail/WhatsNew?ocid=TXT_TAGLM_WL_HM_Tutorial_WhatsNew1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: password field

2009-05-13 Thread lakers fan

it didnt.. should I just use $uses = array('Auth');??

> Date: Wed, 13 May 2009 00:51:25 -0700
> Subject: Re: password field
> From: drlob...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> Auth component hashes password automatically.
> 
> On May 13, 2:38 pm, lakers fan  wrote:
>> Hello, Isnt password field automatically hashed??. if not can someone 
>> let me know how i can hash the password field automatically?
>> Thanks,Bharani
>> _
>> Windows Live™: Keep your life in 
>> sync.http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
> > 

_
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



password field

2009-05-13 Thread lakers fan

Hello, Isnt password field automatically hashed??. if not can someone let 
me know how i can hash the password field automatically?
Thanks,Bharani
_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



fileupload with curl

2009-04-21 Thread lakers fan

Hello, I m new to CakePhp, I want to do a simple file upload. I tried 
various samples and I havent been able to get it to working. Also I want to use 
a third party application like Curl to upload a file to webserver. Can someone 
tell me how can I do it using Curl.
Thanks,Bharani
_
Windows Live™ SkyDrive™: Get 25 GB of free online storage.  
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_042009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Webservice problem

2009-03-11 Thread lakers fan

Hello,

I followed the following tutorial and it worked fine.

 

http://www.littlehart.net/atthekeyboard/2007/03/13/how-easy-are-web-services-in-cakephp-12-really-easy/

 

 

Then I created a function validate() (which is same as index()) and created 
validate.ctp which is same as index.ctp. But I get the error 

 

Error: The action validate is not defined in controller FooController

 

Any help would be great. The code is on the bottom.

 

 

Thanks,

Bharani

 

Code:

 

class FooController extends AppController
{
var $components = array('RequestHandler');
var $uses = '';
var $helpers = array('Text', 'Xml');

function index()
{
$message = 'Testing';
$this->set('message', $message);
$this->RequestHandler->respondAs('xml');
$this->viewPath .= '/xml';
$this->layoutPath = 'xml';
}
function validate()
{
$message = 'Testing';
$this->set('message', $message);
$this->RequestHandler->respondAs('xml');
$this->viewPath .= '/xml';
$this->layoutPath = 'xml';
} 
} 

_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



REST web service problem

2009-03-09 Thread lakers fan

Hello,

  Has anyone tried REST webservice with CakePhp?. I tried the tutorial in 
bakery, which doesnt work.. I get Object not found error. Am I missing anything 
in routes?. I m new to cake. I thought I can just create the files as mentioned 
in tutorial and it will work.. but it didnt. Any help would be great. Or can 
someone give an alternate link to a working web service?

 

http://bakery.cakephp.org/articles/view/restful-web-services-with-cakephp

 

Thanks,

Bharani

_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



REST Web service not working

2009-03-09 Thread lakers fan

Hello,

I just did REST cakephp webservice at the following link

http://bakery.cakephp.org/articles/view/restful-web-services-with-cakephp

But when i tried this

http://localhost/rest/countries/listing 

It didnt work..Error was Object not found!.. So its not able to find the 
controller.

Dont know what i m doing wrong.. any help would be appreciated.

Thanks,
Bharani
_
Hotmail® is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



One directory for all view files.

2009-03-03 Thread lakers fan

Hello,

 Can I create all the view files inside one directory. Right now what I 
understood is you got to create a folder named after controller. if I have many 
controllers, does it mean that I have to create that many folders for view 
files? 

 

Thanks,

Bharani

_
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: Subsequent pages not working in Ubuntu.

2009-02-26 Thread lakers fan

I have cleaned up tmp folder and I have debug level set to 2.  There is no 
debug message but i get page not found.

I went to the following URL http://localhost/cake_1_2/posts/edit/2 and I get 
this error:
The requested URL /cake_1_2/posts/edit/2 was not found on this server.

But I see add.ctp under /home/user/cake_1_2/app

The home page http://localhost/cake_1_2 works fine and shows all three posts.


Also do you have instructions for installing CakePhP on Ubuntu?.

Thanks,
Bharani

> Date: Thu, 26 Feb 2009 01:24:34 -0800
> Subject: Re: Subsequent pages not working in Ubuntu.
> From: drlob...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> Did you clear tmp folder? Did you turn on debug? What exact error do
> you see?
> 
> On Feb 26, 2:18 pm, lakers fan  wrote:
> > Hello,
> >
> >  I just did Blog tutorial in windows it worked fine. But in ubuntu
> > its not working. I took the entire cake_1_2 folder and copied under
> > /home/user/cake_1_2 and linked this directory to
> > opt/lampp/httpdoc/cake_1_2. The first index page shows up fine, it
> > shows all the three default posts of the tutorial. If I click on any of
> > the links, I get an error that the URL doesnt exist.
> >
> > Thanks,
> >
> > Bharani
> > _
> > It’s the same Hotmail®. If by “same” you mean up to 70% 
> > faster.http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Same_02...
> > 

_
Windows Live™: Discover 10 secrets about the new Windows Live.  
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!7540.entry?ocid=TXT_TAGLM_WL_t2_ugc_post_022009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Subsequent pages not working in Ubuntu.

2009-02-26 Thread lakers fan

Hello,

 I just did Blog tutorial in windows it worked fine. But in ubuntu
its not working. I took the entire cake_1_2 folder and copied under
/home/user/cake_1_2 and linked this directory to
opt/lampp/httpdoc/cake_1_2. The first index page shows up fine, it
shows all the three default posts of the tutorial. If I click on any of
the links, I get an error that the URL doesnt exist.

 

Thanks,

Bharani
_
It’s the same Hotmail®. If by “same” you mean up to 70% faster. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Same_022009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



problem with subsequent pages.

2009-02-25 Thread lakers fan

Hello,

 I just did Blog tutorial in windows it worked fine. But in ubuntu its not 
working. I took the entire cake_1_2 folder and copied under /home/user/cake_1_2 
and linked this directory to opt/lampp/httpdoc/cake_1_2. The first index page 
shows up fine, it shows all the three default posts of the tutorial. If I click 
on any of the links, I get an error that the URL doesnt exist.

 

Thanks,

Bharani

_
It’s the same Hotmail®. If by “same” you mean up to 70% faster. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Same_022009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



RE: AuthComponent problem

2009-02-24 Thread lakers fan

What I want to accomplish is I have two screens. First is member login screen 
(users_controller.php) which takes userid and password. I want the password to 
be hashed. The second screen is change password 
screen(usersinfo_controller.php) . In that screen too the password needs to be 
hashed. In both the classes i defined

var $components = array('Auth'); The function to look for in 
usersinfo_controller.php is changepassword() and in users_controller.php its 
login().

 

Now what happens is: If I comment out the components variable in change 
password screen, then the password is hashed in member login screen otherwise 
the password is not hashed.

 

Hope I have been clear. The code is attached with this email.

 

Thanks,

Bharani
 
> Date: Tue, 24 Feb 2009 01:09:07 -0800
> Subject: Re: AuthComponent problem
> From: lecter...@gmail.com
> To: cake-php@googlegroups.com
> 
> 
> If you're having problem with a piece of your code, use the CakeBin
> (http://bin.cakephp.org/) to show us your code, give us a detailed
> description of your problem, i.e. what do you want to accomplish, what
> is the expected output and what is the output you're getting.
> 
> Then someone might try to answer your question.
> 
> On Feb 24, 8:05 am, lakersfan74  wrote:
> > Hello,
> >  I have a problem with AutoComponent. I want to use AutoComponent in two
> > different controllers. If I use it in only one controller its fine. If I use
> > it in the second controller, the AutoComponent in the first controller is
> > not valid and password field is not encrypted.
> >
> > Any help will be greatly appreciated.
> >
> > Thanks,
> > Bharani
> > --
> > View this message in 
> > context:http://www.nabble.com/AuthComponent-problem-tp22176142p22176142.html
> > Sent from the CakePHP mailing list archive at Nabble.com.
> > 

_
Windows Live™: Discover 10 secrets about the new Windows Live.  
http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!7540.entry?ocid=TXT_TAGLM_WL_t2_ugc_post_022009
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---

Auth->fields = array('username' => 'username', 'password' => 
'password');
$this->Auth->allow('register','kcaptcha' );
// count no of live users 
$n = $this->tbuser->findAll($conditions = 
"IsUserOnline=1","count(IsUserOnline ) as 'count'");
$this->set('live_user',$n[0][0]['count']);
}

function index()
   {
 $this->set('users', $this->User->findAll());
   }
function liveuser()
{
$comments = $this->tbuser->findAll($conditions = 
"IsUserOnline=1","count(IsUserOnline ) as 'count'");
$this->set('data', $comments); 
$this->layout = 'ajax';
}

/**
 * This method handle the user registration process.
 * It will first of all, get the user basic information.
 * After user submit the information, a hash key will be generated and 
 * stored in the database. An email will then send to user and pending
 * for user activation
 */
function register()
{
$this->set('error',$this->Session->read("language"));
$this->set('u_name',$this->Session->read("username"));

   if($_POST)
if ( !empty( $this->data ) )
{
   $this->data['tbuser']=$this->data['User'];
   
   if ($this->data['tbuser']['password'] ==  
$this->Auth->password($this->data['tbuser']['password1'])) 
   {
  
   if ( 
strtolower($this->data['tbuser']['captcha']) == strtolower( 
$this->Session->read('captcha')) ) {
$temp = array( 
'registerDate'=> date('Y-m-d'), 
'activation'=>0, 
'IsUserOnline' => 0 );
$this->data['tbuser'] = array_merge( 
$this->data['tbuser'], $temp );

$this->data['tbuser']['password'] = $this->Auth->password( 
$this->data['User']['password1']);

if($this->data['tbuser']['userphoto']['name']=="")

$this->data['tbuser']['userphoto']="no_img.jpg";
else
$fileOK = 
move_uploaded_file($this->data['tbu