Re: Problems with ErrorHandler not extending AppController

2009-08-09 Thread Dr. Loboto

AppError have controller reference: $this->controller - it is not
surely some of your controllers but an AppController at least. You can
call beforeFilter() on it. Same for beforeRender(). I solve this
problem such way.

On Aug 9, 10:45 am, David  wrote:
> I had been wondering why my error page caused certain pages of my site
> not to render, but then I realized that it's because AppError extends
> ErrorHandler instead of AppController.  This caused some variables
> that I set in AppController's beforeFilter method not to be sent to
> the view.  Since I can't access session variables from AppError, I
> thought that I might be able to get away with using the classRegistry
> to instantiate something that could and simply copying and pasting the
> rest of my code from AppController's beforeFilter... but that didn't
> seem like a very elegant fix.  Does anyone have any clues as to what
> would be the best way to approach this?  Thanks, David.
--~--~-~--~~~---~--~~
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: Silent errors when model's table is not found??

2009-08-09 Thread Abhi

Thanks for all replies. Here is what finally worked (if it might be
useful for you):

I overwrote the cakeError in app_model.php

// if this trigger - SILENT_MODEL_ERRORS is on, 'missing db table'
error wont produce and stop your stuff
function cakeError($error, $params)
{
if(defined('SILENT_MODEL_ERRORS') && SILENT_MODEL_ERRORS==true)
throw new Exception($error.' error in '.$this->name.' 
model');
else
return parent::cakeError($error, $params);
}

And caught exception on ClassRegistry::init() using try-catch
statements.


On Aug 9, 5:03 am, JamesF  wrote:
> why not just add some check while loading your models to see if they
> exist
>
> if(ClassRegistry::init($modelName)){
>
> }
>
> as an example (im sure there are better methods, check the api)
>
> On Aug 8, 3:09 pm, Abhimanyu Grover  wrote:
>
> > Right now, If a table for a specific model is not found, CakePHP
> > execution stops with big "Missing database table" error - however
> > sometimes you may run into scenario where you need not following code
> > to run.. We ran into a similar scenario in a project which has like 30
> > models, out of which some are not always required on different client
> > setups. The problem occurred when we made a shell script which
> > performs some stuff on every model of system. So, whenever it tries to
> > load a model, say:
>
> > foreach($models as $modelName) {
> > $model = ClassRegistry::init($modelName);
>
> > }
>
> > So when a model whose db table doesn't exists, is being loaded - it
> > exits saying "Missing database table" and doesnt go beyond. I went
> > a step ahead a tried overwriting Object::_stop() but that'll just
> > produce more warnings, and it just didnt worked.
>
> > Anyone faced this issue before? or Any ideas on getting ahead of the
> > problem?
>
> > Thanks guys.
> > Abhimanyu
--~--~-~--~~~---~--~~
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: URL some page .../id disappeared ?

2009-08-09 Thread arif hossen
Please follow below this code:

function admin_edit($id = null)
{

   if(empty($this->data))
   {
  $where = array('Product.id'=>$id);
  $this->data = $this->Product->find($where);

   }

   if(!empty($this->data))
   {
  if($this->data->save($this->data))
 {
  $this->redirect(array('index'));


  }
 else
 {
$this->redirect(array('edit',$this->data['Product']['id']));

  }


   }



}


admin_edit.ctp

 create('Product',array('action'=>'edit'));
echo $form->input('id',array('type'=>'hidden');
echo $form->input('name',array('label'=>'Product name'));
echo $form->submit('Submit');

?>



On Fri, Aug 7, 2009 at 4:13 PM, leafchild  wrote:

>
> URL some page  .../id disappeared ?
>
> I have site there are different form pages to organize products.
>
> Some form page such as admin_edit page - URL:  ... admin/product/edit/
> 1
> After I submit URL still same either there is an error or not.
>
> However, some form page lose id from URL after submit,
> and showing index error.
>
> for example, URL: ...admin/category/customer/edit/1 -> ...admin/
> category/customer/edit
> ==
> if (!empty($this->data)) {
>   // empty
> }
> ==
> I deleted all the code inside of if statement for taking care of
> submitting data.
> The one keep same URL doesn't show error but other does.
>
> Not sure difference between these two has.
> I don't know why? Does anyone know what's the issue?
> >
>


-- 


Regards,
Mohammad Arif Hossen
Web Developer
United Group International(UGIBD)
www.ugibd.net
Mobile no:  +88 01714355911
Mobile no:  +88 01922110308

--~--~-~--~~~---~--~~
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: URL some page .../id disappeared ?

2009-08-09 Thread leafchild book
thanks you, euromark (munich) and JamesF
My form was
create('Product', array('action'=>'admin_edit'));?>

That's why causing wired error. After I changed to
create('ProProduct', array('action'=>'edit'));?>

everything went to fine :)


*
*
*
*
*
*
*
*
On Sat, Aug 8, 2009 at 6:53 PM, euromark (munich) <
dereurom...@googlemail.com> wrote:

>
> as i said, i would go with JUST "url"=>"/".$this->params['url]['url']
> in this case there is no need to use "action" or the manually built
> url like james suggested
>
> be aware of the "/" in front of it though (otherwise the url is not
> built correctly)
>
>
> On 9 Aug., 02:06, JamesF  wrote:
> > make sure you $form->create is submitting to the id as a parameter as
> > well
> >
> > echo $form->create('FormName', array('url'=>array
> > ('controller'=>'myController', 'action'=>'myAction', $id,
> > 'admin'=>true)));
> >
> > On Aug 7, 7:13 pm, leafchild  wrote:
> >
> > > URL some page  .../id disappeared ?
> >
> > > I have site there are different form pages to organize products.
> >
> > > Some form page such as admin_edit page - URL:  ... admin/product/edit/
> > > 1
> > > After I submit URL still same either there is an error or not.
> >
> > > However, some form page lose id from URL after submit,
> > > and showing index error.
> >
> > > for example, URL: ...admin/category/customer/edit/1 -> ...admin/
> > > category/customer/edit
> > > ==
> > > if (!empty($this->data)) {
> > >// empty}
> >
> > > ==
> > > I deleted all the code inside of if statement for taking care of
> > > submitting data.
> > > The one keep same URL doesn't show error but other does.
> >
> > > Not sure difference between these two has.
> > > I don't know why? Does anyone know what's the issue?
> >
>

--~--~-~--~~~---~--~~
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: Fatal error: Class 'User' not found in PROJECT_HOME/cake/libs/class_registry.php on line 140

2009-08-09 Thread arif hossen
You have mistake class name your class name below :





On Sun, Aug 9, 2009 at 3:19 AM, free  wrote:

>
> It happens when I write a very simple page script.
> I just create the a model, controller and view just as the Cake
> tutorial say,
>
> related codes:
>
> - app/models/user.php 
>  class UserModel extends AppModel{
>var $name = 'User';
> }
> ?>
>
>  app/controllers/users_controller.php -
>  class UsersController extends AppController {
>var $name = 'Users';
>function register(){}
> }
> ?>
>
>
>  app/views/users/register.ctp ---
>
> 
> Just a test page
> 
> Test
> 
> 
>
>
> every is so simple, but when i input the url:
> http://mysite.com/users/register,
> I just got this error:
>
> Fatal error: Class 'User' not found in /home/free/dev/webc/trunk/cake/
> libs/class_registry.php on line 140
>
>
> I don't know what's wrong with this, or it's my fault
> any advice  appreciated, thanks
>
> >
>


-- 


Regards,
Mohammad Arif Hossen
Web Developer
United Group International(UGIBD)
www.ugibd.net
Mobile no:  +88 01714355911
Mobile no:  +88 01922110308

--~--~-~--~~~---~--~~
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: Using Javascript link

2009-08-09 Thread brian

You have a  in your view? No the layout? Does the HTML source look right?

Anyway, your onHover function won't work because you're not passing
the full path to the image. Remember that HtmlHelper expectes a
relative path from webroot/img. However, you're only passing the
filename, instead of '/img/'+filename.

Also, if you're going to do your rollovers like this, you'd be better
off preloading them by creating Image objects and assigning the src to
them. eg.

var foo = new Image();
foo.src = '/img/foo.gif';
var foo_hover = new Image();
foo_hover.src = '/img/foo_hover.gif';

In reality, it'd be better t create an array of those. Pass the name
or key, plus the stat--on or off--to your function, where you swap
element.src with src of whichever Image is required.

On Sun, Aug 9, 2009 at 8:09 PM, Sarah wrote:
>
> I assume you want only the relevant parts.
>
> In my view I have:
>
> 
>        
>    Animal Tlatoque
>    link('evoicesindex'); ?>
>    css('evoices'); ?>
>  
>
>
>    
>        link($html->image('Library3Sized.gif', array
> ('alt'=>'Library', 'onmouseover'=>'onHover(this)',
> 'onmouseout'=>'onUnHover(this)')), array('controller'=>'evoices',
> 'action'=>'library'), array('escape'=>false)); ?>
>    
>
> Then I use it like so (I have an onUnHover written too )in my
> evoicesindex.js which is located in webroot/js
>
> function onHover(element){
>
>    if(element.alt == "Games")
>        element.src = "images/mesogamesHover.gif";
>
>    if(element.alt == "House")
>        element.src = "images/mesohouseHover.gif";
>
>    if(element.alt == "Library")
>        element.src = "Library3Sized.gif";
>
>    if(element.alt == "Adventure Game")
>        element.src = "images/forestHover.gif";
>
>    if(element.alt == "School House")
>        element.src = "images/mesoschoolHover1.gif";
>
> }
>
> Please let me know if I should just post the whole files...
>
> Thanks for you help,
> ~S
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



cPanel shared hosting

2009-08-09 Thread brian

I have to move a site from my server to another, which is a
shared-hosting acct. with cPanel. Currently, the setup is as follows
(in /var/www/vhosts/SITE):

app/
webroot
cake -> cake_1.2.3.8166

... where cake is a soft link to the libs. Normally, the libs point to
/var/lib/php/cake but, fot this site, I've left everything bundled
together as I know it's being taken away to another server.

I'm having some difficulty figuring out where to put things on the
other server, and how to configure index.php as well as the .htaccess
files. Or, actually, someone else with no Cake experience is. And my
experience with cPanel is quite minimal, so we're not making much
headway. I assume that the cake dir will reside next to app, as it is
now. But, from reading some vague instructions online, it seems that I
have to put webroot somewhere else. Or, do I just drop everything into
cPanel's public_html dir?

To complicate things, I need to access this other site through an IP,
not a domain. If anyone has done this, could you please post some
hints?

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



access cakephp sessions outside of cake

2009-08-09 Thread Parris

Hi everyone,
I was wondering if anyone has been able to successfully get cakephp
sessions to work outside of the framework? I had seen that article in
the bakery, but that didn't turn out to be very helpful.

Any guidance would be much appreciated... Right now I am trying to
access session vars with:

session_name("CAKEPHP"); //Same as the value you have for
'Session.cookie' in core.php
session_start();
print_r($_SESSION);

which outputs Array( )
--~--~-~--~~~---~--~~
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: Using Javascript link

2009-08-09 Thread Sarah

I assume you want only the relevant parts.

In my view I have:



Animal Tlatoque
link('evoicesindex'); ?>
css('evoices'); ?>
  



link($html->image('Library3Sized.gif', array
('alt'=>'Library', 'onmouseover'=>'onHover(this)',
'onmouseout'=>'onUnHover(this)')), array('controller'=>'evoices',
'action'=>'library'), array('escape'=>false)); ?>


Then I use it like so (I have an onUnHover written too )in my
evoicesindex.js which is located in webroot/js

function onHover(element){

if(element.alt == "Games")
element.src = "images/mesogamesHover.gif";

if(element.alt == "House")
element.src = "images/mesohouseHover.gif";

if(element.alt == "Library")
element.src = "Library3Sized.gif";

if(element.alt == "Adventure Game")
element.src = "images/forestHover.gif";

if(element.alt == "School House")
element.src = "images/mesoschoolHover1.gif";

}

Please let me know if I should just post the whole files...

Thanks for you help,
~S

--~--~-~--~~~---~--~~
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: Works with debug 2 - I got it!

2009-08-09 Thread Dave Maharaj :: WidePixels.com

Something so simple...

Was missing exit; in the controller.
Looks like it was trying to pull up the address of the id after it was
deleted, hence the not found error

Thanks,

Dave

-Original Message-
From: brian [mailto:bally.z...@gmail.com] 
Sent: August-09-09 7:12 PM
To: cake-php@googlegroups.com
Subject: Re: Works with debug 2


Is the Bookmark deleted? Do you have any code referencing Debugger? In
beforeFilter or index action, perhaps?

On Sun, Aug 9, 2009 at 5:27 PM, Dave Maharaj ::
WidePixels.com wrote:
> I have this in the controller:
>
> function delete($id = null) {
>   if ($this->RequestHandler->isAjax()) {
>   if ($this->Bookmark->validBookmark($id,
> $this->Auth->user('id')) == true) {
>   $this->Bookmark->del($id);
>   } else {
>   $this->redirect(array('controller' => 'users', 
> 'action' => 'index'));
>   }
>   }
>   }
>
> and some simple js code to delete the bookmark
>
> $("a.bookmark").click(function() {
>    var url_id = $(this).attr('href');
>    var x_id = $(this).attr('id').split('_');
>
>
>    $.ajax({
>  type: "POST",
>  url: url_id,
>  success: function(){
>   $('#bookmark_'+ x_id[1]).fadeTo('slow' , 0.0).slideUp('fast',
> function() {
>    $(this).remove();
>    });
>  }
>   });
>    return false;
>   });
>
> Now when debug is set to 2 it works fine
>
> Change debug to 0 and inspecting the browser activity i see response 
> from the server
>
> 
> Not Found
> 
>   Error: 
>   The requested address 
> '/bookmarks/delete/cf0c3ef3937' was not found on this
server. 
>   
>  Can anyone see something wrong with the code or am I missing something?
>
> Dave
> >
>



--~--~-~--~~~---~--~~
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: Works with debug 2

2009-08-09 Thread Dave Maharaj :: WidePixels.com

The bookmark does get deleted in any debug setting 0 1 2.

No debug(); in the controller or model.

All the other js works on the Bookmark page...just the delete seems to have
a hick up somewhere.

Dave

-Original Message-
From: brian [mailto:bally.z...@gmail.com] 
Sent: August-09-09 7:12 PM
To: cake-php@googlegroups.com
Subject: Re: Works with debug 2


Is the Bookmark deleted? Do you have any code referencing Debugger? In
beforeFilter or index action, perhaps?

On Sun, Aug 9, 2009 at 5:27 PM, Dave Maharaj ::
WidePixels.com wrote:
> I have this in the controller:
>
> function delete($id = null) {
>   if ($this->RequestHandler->isAjax()) {
>   if ($this->Bookmark->validBookmark($id,
> $this->Auth->user('id')) == true) {
>   $this->Bookmark->del($id);
>   } else {
>   $this->redirect(array('controller' => 'users', 
> 'action' => 'index'));
>   }
>   }
>   }
>
> and some simple js code to delete the bookmark
>
> $("a.bookmark").click(function() {
>    var url_id = $(this).attr('href');
>    var x_id = $(this).attr('id').split('_');
>
>
>    $.ajax({
>  type: "POST",
>  url: url_id,
>  success: function(){
>   $('#bookmark_'+ x_id[1]).fadeTo('slow' , 0.0).slideUp('fast',
> function() {
>    $(this).remove();
>    });
>  }
>   });
>    return false;
>   });
>
> Now when debug is set to 2 it works fine
>
> Change debug to 0 and inspecting the browser activity i see response 
> from the server
>
> 
> Not Found
> 
>   Error: 
>   The requested address 
> '/bookmarks/delete/cf0c3ef3937' was not found on this
server. 
>   
>  Can anyone see something wrong with the code or am I missing something?
>
> Dave
> >
>



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



sql WHERE NOT EXISTS

2009-08-09 Thread euromark (munich)

does anybody know if there is a cake function for the WHERE NOT EXISTS
functionality?

i have "users" who have many "roles" in the join table "role_users" -
and i want to display the ones not having any roles yet

id user_id role_id
1  2  3
2  3  3
etc
(user 1 not in the list yet, so does not have any role)

with mysql itself if would say:
select * from users left join role_users where not exists (select *
from role_users where user_id = 3)
for example

i could do some complex reversing - but was looking for some more
convinient way to do it :)

thx, mark
--~--~-~--~~~---~--~~
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: Works with debug 2

2009-08-09 Thread brian

Is the Bookmark deleted? Do you have any code referencing Debugger? In
beforeFilter or index action, perhaps?

On Sun, Aug 9, 2009 at 5:27 PM, Dave Maharaj ::
WidePixels.com wrote:
> I have this in the controller:
>
> function delete($id = null) {
>   if ($this->RequestHandler->isAjax()) {
>   if ($this->Bookmark->validBookmark($id,
> $this->Auth->user('id')) == true) {
>   $this->Bookmark->del($id);
>   } else {
>   $this->redirect(array('controller' => 'users', 'action' =>
> 'index'));
>   }
>   }
>   }
>
> and some simple js code to delete the bookmark
>
> $("a.bookmark").click(function() {
>    var url_id = $(this).attr('href');
>    var x_id = $(this).attr('id').split('_');
>
>
>    $.ajax({
>  type: "POST",
>  url: url_id,
>  success: function(){
>   $('#bookmark_'+ x_id[1]).fadeTo('slow' , 0.0).slideUp('fast',
> function() {
>    $(this).remove();
>    });
>  }
>   });
>    return false;
>   });
>
> Now when debug is set to 2 it works fine
>
> Change debug to 0 and inspecting the browser activity i see response from
> the server
>
> 
> Not Found
> 
>   Error: 
>   The requested address '/bookmarks/delete/cf0c3ef3937' 
> was
> not found on this server. 
>   
>  Can anyone see something wrong with the code or am I missing something?
>
> Dave
> >
>

--~--~-~--~~~---~--~~
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: Fatal error: Class 'User' not found in PROJECT_HOME/cake/libs/class_registry.php on line 140

2009-08-09 Thread Jogi Silalahi

try to write:
class User extends AppModel

On 8/9/09, free  wrote:
>
> It happens when I write a very simple page script.
> I just create the a model, controller and view just as the Cake
> tutorial say,
>
> related codes:
>
> - app/models/user.php 
>  class UserModel extends AppModel{
> var $name = 'User';
> }
> ?>
>
>  app/controllers/users_controller.php -
>  class UsersController extends AppController {
> var $name = 'Users';
> function register(){}
> }
> ?>
>
>
>  app/views/users/register.ctp ---
>
> 
> Just a test page
> 
>  Test
> 
> 
>
>
> every is so simple, but when i input the url:
> http://mysite.com/users/register,
> I just got this error:
>
> Fatal error: Class 'User' not found in /home/free/dev/webc/trunk/cake/
> libs/class_registry.php on line 140
>
>
> I don't know what's wrong with this, or it's my fault
> any advice  appreciated, thanks
>
> >
>


-- 
- Jogi Henra Ersa Silalahi -
Del Polytechnic of Informatics
Tobasa - North Sumatera
Mobile : +6281361702670
http://jogisilalahi.wordpress.com

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Works with debug 2

2009-08-09 Thread Dave Maharaj :: WidePixels.com
I have this in the controller:
 
function delete($id = null) {
  if ($this->RequestHandler->isAjax()) {
  if ($this->Bookmark->validBookmark($id,
$this->Auth->user('id')) == true) {
  $this->Bookmark->del($id);
  } else {
  $this->redirect(array('controller' => 'users', 'action' =>
'index'));
  }
  }
  }
 
and some simple js code to delete the bookmark
 
$("a.bookmark").click(function() {
   var url_id = $(this).attr('href');
   var x_id = $(this).attr('id').split('_');

  
   $.ajax({
 type: "POST",
 url: url_id,
 success: function(){
  $('#bookmark_'+ x_id[1]).fadeTo('slow' , 0.0).slideUp('fast',
function() { 
   $(this).remove();
   });
 }
  });
   return false;
  });
 
Now when debug is set to 2 it works fine
 
Change debug to 0 and inspecting the browser activity i see response from
the server 


Not Found



Error: 

The requested address
'/bookmarks/delete/cf0c3ef3937' was not found on this
server. 

  

 Can anyone see something wrong with the code or am I missing something?
Dave 

--~--~-~--~~~---~--~~
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: Using Javascript link

2009-08-09 Thread Vijay Kumbhar
Hello Sarah,

Can you please paste the code here so that we can help you right a
way.

On Sun, Aug 9, 2009 at 9:38 PM, brian  wrote:

>
> It could be a lot of things. Can you post your code?
>
> On Sat, Aug 8, 2009 at 9:32 PM, Sarah wrote:
> >
> > I'm having trouble getting my javascript to work.
> >
> > The api recommends using link and putting the scripts and contents
> > into the webroot/js folder.  I tried this, but it isn't working.
> >
> > I'm trying to create a hover for an image...I included the functions
> > in the second parameter of $html->image().
> >
> > Is there something I'm missing?
> >
> > I would appreciate any advice.
> >
> > Thanks,
> > ~S
> > >
> >
>
> >
>


-- 
Thanks & Regards,
Vijayk.
Co-founder (www.weboniselab.com)

"You Bring the Dreams, We'll Bring the Means"

--~--~-~--~~~---~--~~
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: Using Javascript link

2009-08-09 Thread Vijay Kumbhar
Hello Sarah,

Can you please paste your code here so that we can help you right a way.
With out telling the pros & cons for that...

On Sun, Aug 9, 2009 at 9:38 PM, brian  wrote:

>
> It could be a lot of things. Can you post your code?
>
> On Sat, Aug 8, 2009 at 9:32 PM, Sarah wrote:
> >
> > I'm having trouble getting my javascript to work.
> >
> > The api recommends using link and putting the scripts and contents
> > into the webroot/js folder.  I tried this, but it isn't working.
> >
> > I'm trying to create a hover for an image...I included the functions
> > in the second parameter of $html->image().
> >
> > Is there something I'm missing?
> >
> > I would appreciate any advice.
> >
> > Thanks,
> > ~S
> > >
> >
>
> >
>


-- 
Thanks & Regards,
Vijayk.
Co-founder (www.weboniselab.com)

"You Bring the Dreams, We'll Bring the Means"

--~--~-~--~~~---~--~~
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 match two form->select?

2009-08-09 Thread Persivo Cunha

Hi, I have two form->select and i want that after option of one be
choice, values of other select change.

For example,

select 1:
 option: A
 option: B

if I choose option A, select 2 will show C and D
if I choose option B, select 2 will show E and F

what should I do?
--~--~-~--~~~---~--~~
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: Fatal error: Class 'User' not found in PROJECT_HOME/cake/libs/class_registry.php on line 140

2009-08-09 Thread Persivo Cunha

If you note, your classname is UserModel, and not User, because this
cake can't find it. Your model's name must be User.

On 9 ago, 06:19, free  wrote:
> It happens when I write a very simple page script.
> I just create the a model, controller and view just as the Cake
> tutorial say,
>
> related codes:
>
> - app/models/user.php 
>  class UserModel extends AppModel{
>     var $name = 'User';}
>
> ?>
>
>  app/controllers/users_controller.php -
>  class UsersController extends AppController {
>     var $name = 'Users';
>     function register(){}}
>
> ?>
>
>  app/views/users/register.ctp ---
>
> 
> Just a test page
> 
>          Test
> 
> 
>
> every is so simple, but when i input the url:  
> http://mysite.com/users/register,
> I just got this error:
>
> Fatal error: Class 'User' not found in /home/free/dev/webc/trunk/cake/
> libs/class_registry.php on line 140
>
> I don't know what's wrong with this, or it's my fault
> any advice  appreciated, thanks
--~--~-~--~~~---~--~~
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: If submitted file size is bigger than post_max_size value, no validation takes place

2009-08-09 Thread Matthew

I just wrote this whole long explanation, does it take time to be
approved or something

On Aug 7, 10:44 am, OmarC  wrote:
> Thanks for the reply Vijay.
>
> The problem is, when the form with the large file is submitted, the
> code in the controller is not executed. This only happens when the
> file is larger than the post_max_size, if the file is equal or smaller
> than the post_max_size, I can handle the data pretty well.
>
> Thanks again
>
> On Aug 6, 7:52 pm, Vijay Kumbhar  wrote:
>
> > You can check this in the controller action from where you are saving the
> > data.
>
> > Before saving data please calculate the size (*filesize() function*) of the
> > uploaded file & then do the appropriate action.
>
> > On Thu, Aug 6, 2009 at 8:04 PM, OmarC  wrote:
>
> > > Hi everyone.
>
> > > I've got a form, some fields are mandatory and the validation for
> > > these fields works fine, including a file that must be attached to the
> > > form.
> > > If the file is smaller than 5MB the form is saved.
> > > But, if the submitted file is larger than the php.ini value of
> > > 'post_max_size', all of the form's data is lost, the validation
> > > doesn't take place, and I'm taken to the form's page, as if it was
> > > loaded for the first time.
>
> > > How can I fix this?
> > > Or, how can I restrict the file's size, before the form is submitted?
>
> > > Any help will be much appreciated.
>
> > > Many thanks.
>
> > --
> > Thanks & Regards,
> > Vijayk.
> > Co-founder (www.weboniselab.com)
>
> > "You Bring the Dreams, We'll Bring the Means"

--~--~-~--~~~---~--~~
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: If submitted file size is bigger than post_max_size value, no validation takes place

2009-08-09 Thread Matthew

I have recently battled with the same problem as you OmarC I can
explain whats happening to you but unfortunately there is no real
solution.

The two major php.ini settings which can be explained for uploads are
as follows:
post_max_size - sets max size of post data allowed. (We will work on
8M default)
upload_max_filesize - contains the maximum size of a file which can be
uploaded via a form. (We will work on 2M default);
The post_max_size is generally higher than the upload_max_filesize as
the post_max_size must encompass all the other form inputs as well as
the file to upload. This being said please follow on below.

Firstly the code in the controller can execute but you cant do a check
on $this->data in the scenario you propose cause the $_POST and
$_FILES globals will be emtpy. Consider these four scenarios

Scenario 1
The user does not upload anything then cakes validation fires on your
other form inputs and you are a happy man. In this scenario the $this-
>data array contains info and the $_POST and $_FILES contain
information as well.
In this Scenario the post_max_size is never reached so the global
variables $_POST and $_FILES exist and errors can be captured.
UPLOAD_ERR_OK is set (Value: 0; There is no error, the file uploaded
with success).

Scenario 2
The user uploads a file size less than 2M in which case the
upload_max_filesize validates, the post_max_size is never reached,
cakes validation fires on the rest of your data and again you are a
happy man. Again the $_POST and $_FILES is set.
UPLOAD_ERR_OK is set (Value: 0; There is no error, the file uploaded
with success).

Scenario 3
The user uploads a file size greater than the upload_max_filesize BUT
less than the post_max_size. Again the $_POST and $_FILES are set and
the error can be captured
UPLOAD_ERR_INI_SIZE (Value: 1; The uploaded file exceeds the
upload_max_filesize directive in php.ini.)

Scenario 4 (the one you are experiencing)
The user uploads a file which is greater than the post_max_size (in
this example is 8M), now here is where the headache begins, because
the file being uploaded exceeds the post_max_size the $_POST and
$_FILES globals ARE NOT SET AT ALL. This means that all the data which
was submitted from your form is empty, this means that because cakes
functions generally checks for if(!empty($this->data)) it loads the
page as if the user just requested the url.

Solution
The only solution i can offer you is how to catch the error if a user
exceeds the post_max_size.
//uploads_controller.php
function add() {
if($this->referer() == '/uploads/uploadFile'){
$this->set('msg', 'please choose a file smaller 
than.'.ini_get
('upload_max_filesize'));
}
}
function uploadFile(){
if (!empty($this->data)) {
if($this->data['Upload']['source']['error'] == 
UPLOAD_ERR_OK){
$this->Session->setFlash(__('Work your magic', 
true));
}else{
$errorMsg = 
$this->fileUploadErrorMessage($this->data['Upload']
['source']['error']);
$this->Session->setFlash(__('Error: 
'.$errorMsg));
}
}else{

if(!is_uploaded_file($this->data['Upload']['source']['tmp_name'])
&& ($this->referer() == '/uploads/add')){
$this->Session->setFlash(__('Form data greater 
than php.ini
allows', true));
$this->redirect('add');
}
}
}
//views/uploads/add.ctp

create('Upload', array('type' => 'file', 'action'
=> ('uploadFile')));?>


input('source', array('type' => 'file'));
echo $form->input('dummy');
?>

end('Submit');?>


Hope this helps ya.



--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Custom Form

2009-08-09 Thread hmvrulz


i am embedding a custom forum in cake.

it has the following code

HTML Code:

  Name
  
  Successful message
  
  
  A small description of the field 




as we knw we use some thing like this to producce the input box

PHP Code:
echo $form->input('lat'); 


which produces



HTML Code:
Lat





i wanna know how to embedd is with the input with


Code:
input class="text-input small-input" type="text" id="small-input"
name="small-input"


i tried this but its not working


PHP Code:
echo $form->input('lat', array('class'=> 'text-input small-input',
'id'=>'small-input' )); 
__
-- 
View this message in context: 
http://www.nabble.com/Custom-Form-tp24887735p24887735.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Custom Form

2009-08-09 Thread hmv

 i am embedding a custom forum in cake.

it has the following code

HTML Code:

 
  Name
  
  Successful message
  
  
  A small description of the field 


as we knw we use some thing like this to producce the input box


PHP Code:
echo $form->input('lat');


which produces


HTML Code:
Lat





i wanna know how to embedd is with the input with

Code:
input class="text-input small-input" type="text" id="small-input"
name="small-input"


i tried this but its not working


PHP Code:
echo $form->input('lat', array('class'=> 'text-input small-input',
'id'=>'small-input' ));


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Fatal error: Class 'User' not found in PROJECT_HOME/cake/libs/class_registry.php on line 140

2009-08-09 Thread free

It happens when I write a very simple page script.
I just create the a model, controller and view just as the Cake
tutorial say,

related codes:

- app/models/user.php 


 app/controllers/users_controller.php -



 app/views/users/register.ctp ---


Just a test page

 Test




every is so simple, but when i input the url:   
http://mysite.com/users/register,
I just got this error:

Fatal error: Class 'User' not found in /home/free/dev/webc/trunk/cake/
libs/class_registry.php on line 140


I don't know what's wrong with this, or it's my fault
any advice  appreciated, thanks

--~--~-~--~~~---~--~~
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: creating database.php removes css

2009-08-09 Thread davids190

That didn't do it for me...

On Aug 8, 6:26 am, brian  wrote:
> Open database.php and remove the last "?>". There have been others
> who've reported the same trouble and it turned out to be whitespace
> after the closing tag. PHP doesn't require it so it's safer to remove
> it.
>
> On Sat, Aug 8, 2009 at 2:41 AM, davids190 wrote:
>
> > So I setup Apache's config. with the needed AllowOverride and
> > everything initially works fine when I view index.php from localhost.
> > But as soon as I create the database.php file in the config folder,
> > all css is gone.  It does mention that everything is ok, but there are
> > no colors or styling to the page, just plain text.
>
> > If I remove database.php, css comes back fine.
>
> > What's wrong...?
>
> > Thanks.

--~--~-~--~~~---~--~~
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: creating database.php removes css

2009-08-09 Thread davids190

It works ok if debug = 0
But how can I make it work if debug > 0?

On Aug 8, 3:30 am, Dibyendu Mitra Roy  wrote:
> You need to check 3 more things:
>
> - mod_rewrite is enabled in httpd.conf
> - You are using correct database info
> - If the above 2 does not solve then toggle the debug level from 0 to 2 and
> vice-versa once.
>
> Thanks
>
>
>
> On Sat, Aug 8, 2009 at 12:11 PM, davids190  wrote:
>
> > So I setup Apache's config. with the needed AllowOverride and
> > everything initially works fine when I view index.php from localhost.
> > But as soon as I create the database.php file in the config folder,
> > all css is gone.  It does mention that everything is ok, but there are
> > no colors or styling to the page, just plain text.
>
> > If I remove database.php, css comes back fine.
>
> > What's wrong...?
>
> > Thanks.
>
> --
> Dibyendu Mitra Roy
> Web Development Consultant
> Kolkata
> India
> Alt. E-mail: dmroy2...@yahoo.com
> Mobile: +919830811327
> Residence: 91-33-30422096

--~--~-~--~~~---~--~~
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: CakePHP (and other leading php frameworks) vs. Drupal custom modules

2009-08-09 Thread Robert P

Drupal is a highly extensible CMS with a fairly powerful API, and the
progress from Zengine made it easy to theme as well

Jake (for Joomla) and Drake (for Drupal) are plugins that allow a Cake
application to be called from certain URIs within the CMS, but this
has a much greater overhead and there are major stumbling blocks
trying to integrate the seperate systems. On the other hand if the
application was moved from Drupal to CakePHP then all the basic
functionality would have to be planned and developed, since Cake is
not a CMS.

Since Drupal 5 the module API has been fairly robust, and if there is
an application already running on Drupal there would have to be a good
reason to move away from it.

On Aug 10, 1:50 am, Parris  wrote:
> As i understand it... drupal isn't so much of a framework and more of
> a cms. Of course it probably does have an api. I have worked with
> drupal once. I got frustrated and moved on. It is really hard to
> create a theme in it, if you ask me.
>
> Cake is a framework much like ruby on rails.
>
> If you don't want to create a full on cms in cake, you may want to
> check out jake for joomla. I am sure there is something similar for
> drupal also.
>
> On Aug 9, 9:14 am, Josh  wrote:
>
> > Does anyone have CakePHP experience and Drupal custom module
> > experience?
>
> > If so, what is your opinion of the Drupal API for writing custom
> > modules?
>
> > I have a friend that is about to do a re-design for his Drupal app and
> > is considering changing frameworks. They would have to design 3-4
> > custom modules. Any thoughts?
>
> > Thanks.
--~--~-~--~~~---~--~~
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: CakePHP (and other leading php frameworks) vs. Drupal custom modules

2009-08-09 Thread Parris

As i understand it... drupal isn't so much of a framework and more of
a cms. Of course it probably does have an api. I have worked with
drupal once. I got frustrated and moved on. It is really hard to
create a theme in it, if you ask me.

Cake is a framework much like ruby on rails.

If you don't want to create a full on cms in cake, you may want to
check out jake for joomla. I am sure there is something similar for
drupal also.

On Aug 9, 9:14 am, Josh  wrote:
> Does anyone have CakePHP experience and Drupal custom module
> experience?
>
> If so, what is your opinion of the Drupal API for writing custom
> modules?
>
> I have a friend that is about to do a re-design for his Drupal app and
> is considering changing frameworks. They would have to design 3-4
> custom modules. Any thoughts?
>
> Thanks.
--~--~-~--~~~---~--~~
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: After graph create page will redirect to another page.

2009-08-09 Thread brian

Probably, your script is sending image headers to the browser. You'll
have to post some code, though, before anyone can say for sure.

On Sun, Aug 9, 2009 at 12:27 AM, arif hossen wrote:
> Dear All,
>
> Please help me.
>
> I Create a graph by cakephp.My problem is when graph create then a message
> appears say:
> The image "http://localhost/auctionsite/postauctions/analysispdf/24".Could
> be displayed because it contains error.
>
> But my graph already created ,Now  i want to not show this image in this
> page and not show above message.
> I would like redirect to another page after graph create.
>
> --
>
>
> Regards,
> Mohammad Arif Hossen
> Web Developer
> United Group International(UGIBD)
> www.ugibd.net
> Mobile no:  +88 01714355911
> Mobile no:  +88 01922110308
>
> >
>

--~--~-~--~~~---~--~~
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 (and other leading php frameworks) vs. Drupal custom modules

2009-08-09 Thread Josh

Does anyone have CakePHP experience and Drupal custom module
experience?

If so, what is your opinion of the Drupal API for writing custom
modules?

I have a friend that is about to do a re-design for his Drupal app and
is considering changing frameworks. They would have to design 3-4
custom modules. Any thoughts?

Thanks.
--~--~-~--~~~---~--~~
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: Using Javascript link

2009-08-09 Thread brian

It could be a lot of things. Can you post your code?

On Sat, Aug 8, 2009 at 9:32 PM, Sarah wrote:
>
> I'm having trouble getting my javascript to work.
>
> The api recommends using link and putting the scripts and contents
> into the webroot/js folder.  I tried this, but it isn't working.
>
> I'm trying to create a hover for an image...I included the functions
> in the second parameter of $html->image().
>
> Is there something I'm missing?
>
> I would appreciate any advice.
>
> Thanks,
> ~S
> >
>

--~--~-~--~~~---~--~~
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: After graph create page will redirect to another page.

2009-08-09 Thread Dibyendu Mitra Roy
There could be problem with image generation

On Sun, Aug 9, 2009 at 9:57 AM, arif hossen wrote:

> Dear All,
>
> Please help me.
>
> I Create a graph by cakephp.My problem is when graph create then a message
> appears say:
> The image "http://localhost/auctionsite/postauctions/analysispdf/24".Could
> be displayed because it contains error.
>
> But my graph already created ,Now  i want to not show this image in this
> page and not show above message.
> I would like redirect to another page after graph create.
>
> --
>
>
> Regards,
> Mohammad Arif Hossen
> Web Developer
> United Group International(UGIBD)
> www.ugibd.net
> Mobile no:  +88 01714355911
> Mobile no:  +88 01922110308
>
> >
>


-- 
Dibyendu Mitra Roy
Web Development Consultant
Kolkata
India
Alt. E-mail: dmroy2...@yahoo.com
Mobile: +919830811327
Residence: 91-33-30422096

--~--~-~--~~~---~--~~
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: error database table missing

2009-08-09 Thread Dibyendu Mitra Roy
Instread of writing var $useTable = false; you can write it var $useTable =
array();

On Sun, Aug 9, 2009 at 10:38 AM, arif hossen wrote:

> Please send your controller code: otherwise check properly anywhere you
> have used this model for query.
>
> On Sun, Aug 2, 2009 at 4:56 AM, Dr. Loboto  wrote:
>
>>
>> Check model filename and every your access to this model for
>> misspellings.
>>
>> On Aug 1, 11:08 pm, pete123456  wrote:
>> > hi,
>> > i have a simple view and controller and im doing useTable=false, but i
>> still
>> > get the error Database table missing. anyone knows why? thanks pete
>> >
>> > class Administration extends AppModel {
>> > var $name = 'Administration';
>> > var $useTable = false;}
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/error-database-table-missing-tp24770374p2477037...
>> > Sent from the CakePHP mailing list archive at Nabble.com.
>>
>>
>
>
> --
>
>
> Regards,
> Mohammad Arif Hossen
> Web Developer
> United Group International(UGIBD)
> www.ugibd.net
> Mobile no:  +88 01714355911
> Mobile no:  +88 01922110308
>
> >
>


-- 
Dibyendu Mitra Roy
Web Development Consultant
Kolkata
India
Alt. E-mail: dmroy2...@yahoo.com
Mobile: +919830811327
Residence: 91-33-30422096

--~--~-~--~~~---~--~~
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 - Need more explanation about "$this->Auth->authorize"

2009-08-09 Thread FrederickD

Hello!

It took me a while, but I was finally able to understand and implement
a good system for the Auth component. This tutorial helped to explain
what I was reading in book.cakephp.org:

http://www.jbcrawford.net/archives/45

In the near future I will possibly be upgrading what I have done to
ACL. This tutorial looked like the best for my needs:

http://brolly.ca/blog/web-development/cakephp-acl-tutorial/

For my application (groups, user, distributors, dealers, technicians,
etc.) I may not need ACL just yet. With model associations I have been
able to limit access to just the rows for a logged in distributor, for
example. That yields the dealers associated with that distributor via
choices set in "recursive" on the find(all) and paginate functions.

I am going for simple right now, and may expand the application to ACL
after my base knowledge is more solid.

Hopefully this helps a bit. Keep on it! You can do it!

On Aug 9, 12:24 am, delocalizer  wrote:
> Hi Miguel
> Remember that Acl and Auth are quite different things - Acl only
> establishes the *rules* for what can control what, Auth does the
> actual authentication (permits or denies). Having said that, Auth is
> designed to work with Acl, and it can do that in a couple of different
> ways - if you set the authorize property to 'actions' (easiest to do
> this in your AppController::beforeFilter, so it's set for all your
> controllers) then Auth will expect to validate against aros_acos table
> where acos are aliases for controllers/actions. You don't need to use
> mapActions if you're doing that. The example in the manual (http://
> book.cakephp.org/view/641/Simple-Acl-controlled-Application) is
> excellent. If you set authorize to 'crud' then it expects that the
> acos are database objects.
>
> On Aug 8, 5:05 am, mig_akira  wrote:
>
> > Hello everyone!
>
> > I've been trying to make a simple site using Acl/Auth. Everything is going
> > fine, except that I don't quite understand the differences between the 4
> > kinds of 'authorizes', nor how to implement them.
>
> > For example, I don't understand how can I use the AclComponent::check() to
> > authenticate the user when using authorize->'actions'. The same with
> > authorize->'crud'. Where do I put the mapAction? In appController, or in
> > every controller? What does it exactly do?
>
> > Sorry, but every blog I found about this say that they don't really know how
> > to use those, and the manual is very briefly about this!
>
> > Thanks!!!
>
> > (By the way, I'm using authorize->'actions' and I keep getting
> > [code]
> >  DbAcl::check() - Failed ARO/ACO node lookup in permissions check.  Node
> > references:
> > Aro: Array
> > (
> >     [User] => Array
> >       (
> >             [id] => 3
> >             [username] => normaluser
> >             [name] => miguel
> >             [email] => d...@d.com
> >             [group_id] => 2
> >             [active] => 1
> >             [created] => -00-00 00:00:00
> >             [modified] => -00-00 00:00:00
> >         )
>
> > )
> > [/code]
> > )
>
> > --
> > View this message in 
> > context:http://www.nabble.com/AuthComponent---Need-more-explanation-about-%22...
> > Sent from the CakePHP mailing list archive at Nabble.com.
>
>
--~--~-~--~~~---~--~~
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: CakePHP Editor/IDE

2009-08-09 Thread Paolo Portaluri


Il giorno 06/ago/09, alle ore 22:12, pomares ha scritto:

> I use Coda. No code autocompletion specific to CakePHP as far as I
> know on any IDE. If there is, I would love to find out about it.


Look at this:
http://code621.com/content/6/a-collection-of-coda-clips-for-cakephp

Ciao
Paolo

--
Paolo Portaluri
mail: poweru...@work.to.it
  web: http://work.to.it/
  AIM: poweruser82




--~--~-~--~~~---~--~~
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: what's the best, most current book available in English?

2009-08-09 Thread FrederickD

I am a newbie to CakePHP also. I've found the book mentioned above
good also, up to a point. The book gives me ideas and concepts and
mostly concise examples with lots of explanation. From that, I
(usually) am able to understand what I had read previously on the
book.CakePHP.org site.

What is difficult is searching with Google. There is a LOT of
information on CakePHP out there, but you have to spend time sifting
through a lot. I tend not to read much that is not at least from 2008
and specifically mentions CakePHP 1.2. Apparently the 'point' upgrade
was quite major and several often-used functions were deprecated.
(Never had used that word before...)

I find almost as much relevant information, often more to the point I
need, by reading the comments left on a tutorial posted on the web.

Don't give up! I recently made several breakthroughs in knowledge and
application. If I can do it you can too!

On Aug 8, 7:14 pm, JamesF  wrote:
> http://www.amazon.com/CakePHP-Application-Development-Step-step/dp/18...
>
> was a good read when i first started.i find the docs to be good
> but too verbose for a quick start sometimes.
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---