cakephp-1.3

What are the best sources to learn CakePhp for beginners?

Hello, I want to learn where developers here learned CakePhp. Cookbook is good at most points but not clear enough to teach I think. Thanks, ...

Authentication in CakePHP

how can i use myown login function to authenticate users in cakePHP because my users table structure is different from the cakePHP structure. even i overridden the login function it still executing the login function in parent class can any one provide me a solution for this?? thanks in advance ...

How to use sql 'between' command with CakePhp requestAction()

Hello, I have an element that grabs data from mysql. Here is my working code: $this->requestAction('posts/index/sort:id/direction:desc'); I want to grab only posts between id 1 and 6. How can I run that query via requestAction? Some of scripts that I have tried are below. None is working: $this->requestAction('posts/index/sort:id/di...

Will cakephp 1.3.2 work on php 5.3 ?

Will cakephp 1.3.2 work on php 5.3 ? ...

cron job with CakePHP

Hello I have referred http://bakery.cakephp.org/articles/view/calling-controller-actions-from-cron-and-the-command-line and created cron_dispatcher.php and placed it in the app folder. I have return some test email function for the cron job to run in my users controller's test method. And i have created a Cron job in my web server's c...

how to make pagination of result in cakephp

hi i am using cakephp for my project in this here i get the result from the join query but by this i wanna make pagination on this result by using my way its not possible. so please help me. thanks in advance. my code is following. $id= $this->Session->read('id'); $this->layout='ui_defualt'; $options['joins'] = array(array('table' => '...

How to use one controller for more than one sql query in Cakephp?

Hello, I have a serious deadlock about my project. I am looking for a solution for days but there is nothing. My index page have 4 different mysql queries. I tried to code this at first inside 1 controller and 1 view. It was not the right way. Then somebody suggested using 4 elements with requestAction() function. It was very good at f...

Validation of radio button in cakephp

I want to validate radio button, when i checked radio button textbox will be disabled, but it cant happens. what will be the exact js for validate radio button. My JS code is : function selection_project_phd() { var phds = document.getElementById('EmployeeGuidedProjectPhd').value; var projs = document.getElementById('Em...

custom cakephp error messages not showing

I have created a custom page for error messages in my web application. I have created these two files in the views/errors/ directory named 'missing_action.ctp' and 'missing_controller.ctp'. On server the error message is shown as follows: and on localhost the error is shown properly like as follows: I want to show the error messag...

Duplicate entry when trying to edit a record

When i try to a edit a entry.. its creating a duplicate entry in the database. i have made sure i add an hidden id field when i go to the edit form. Restaurant RestaurantAttribute RestaurantContact these are the models i am using. tried reinitialize the id $this->Restaurant->id = $this->Restaurant->id; strange... in the db the ex...

cakephp .htaccess configuration on godaddy with subdomain

Hello All, I have one domain on godaddy (www.mydomain.com). I have placed my cakephp application on this domain. It is working fine for me. But i have created a subdomain blog.mydomain.com for this godaddy has created a directory named blog inside the www.mydomain.com now how can i redirect the request coming for blog.mydomain.com to ...

CakePHP 1.3 associations

I've started writing a project using CakePHP (1.3) and am finding it difficult to return results using the CakePHP style of querying. The project is an issue tracker. So far I only have the following tables - 'users', 'projects' and a link table 'projects_users' because any users can be associated with one or more projects. There is als...

scaffolding error in cakephp 1.3

i've just started to work on cakephp i've just created the models and in the controller i just have 2 lines class BlogController extends AppController{ var $name='BlogController'; var $scaffold; } i'm getting this error in the view Undefined property: BlogController::$primaryKey [CORE/cake/libs/controller/scaffold.php, line 182] Un...

How to override the public images directory in CakePHP?

/cake/config/paths.php /** * Path to the public images directory. */ define('IMAGES', WWW_ROOT.'images'.DS); /** * Web path to the public images directory. */ if (!defined('IMAGES_URL')) { define('IMAGES_URL', 'images/'); } How do I override the above constants that are set in /cake/config/paths.php ? Would I set them in ...

use mysql inbuilt functions with cakePHP find()

can any one help me to use the mysql inbuilt function in cakePHP????? ...

how to read cookie value in cakephp view file

hi i am using cakephp in this i write the cookie value in controller file. i wanna read that cookie value in view file than how it possible. ...

Using Cron with Cake Console on Ubuntu

I need this cron job to execute my shell just as it does when I run it on the command line. I read through the one other question I found about this, but my console-based cron job still is not working. I want to post some code and what it outputs, maybe someone can tell me what's going on. First off, this is on Cake 1.3. I am running o...

How to create new records in multiple tables at the same time ?

Hello all, I was wondering how can I implement a view that allows the user to enter multiple(unknown) number of records in related models.. for example, I have two models called groups and users. And I want to implement a view that allows me to create a group ( which is easy ) and in the same view let me create multiple number of users...

cakePHP routing help

Hello folks, Here I am trying to route a page without showing its action in URL, Eg: URL is http://localhost/brands/1/xyz Router::connect( '/brands/:id/:name', array( 'controller' => 'brands', 'action' => 'index', 'id' => '[0-9]{1,}', 'name' => '[a-z]{1,}' ) ); it works fine.... But I nee...

CakePHP Searchable Plugin of Neil Crookes

I have a problem with the routing while using the Searchable Plugin of Neil Crookes. When I search for something the URL looks like this: http://localhost/search/All/sunshine But now all the other links have the name of the plugin in their URL. For example this: $html->link(__('News', true), array('controller'=>'news', 'action'=>'index...