Re: bigner for cake

2008-09-30 Thread anjum

I am also getting same error on this example I putted the file into
app/view/tasks/index.ctp

But it gives up can't load page error.

Secondly if i go through this way
http://localhost/CakeTooDoo/app/views/tasks/index.ctp

It only shows up the plain HTML form. After adding the add method in
controller its UI totally messes up. Please some one provide step by
step version to run this example for new bies.

with Regards
Anjum

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bigner for cake

2008-09-30 Thread villas

Hi,  As you have already created a table,  why not try to use the
commandline 'Cake Bake' script?
This should give you a flying start and create everything you
need  :-)


On Sep 23, 12:31 pm, akhilesh [EMAIL PROTECTED] wrote:
 http://localhost/myfirstcake/
 this is my cake folder name
 --

 i have set in httpd.conf both

 Apache mod_rewrite module is switched on
 AllowOverride is set to all

 temp dir is writable
 -
 table sturucture is

 CREATE TABLE tasks (
 id int(10) unsigned NOT NULL auto_increment,
 title varchar(255) NOT NULL,
 done tinyint(1) default NULL,
 created datetime default NULL,
 modified datetime default NULL,
 PRIMARY KEY (id)
 );

 database.php.default. Rename to database.php

 my database configuration file is present and Cake is able to connect
 to the database
 -

 my cake module file is CakeTooDoo/app/models/task.php, write the
 following code:

 ?php
 class Task extends AppModel {
 var $name = 'Task';}

 ?
 -

 Controller file is CakeTooDoo/app/controllers/tasks_controller.php,
 with the following code:

 ?php
 class TasksController extends AppController {
 var $name = 'Tasks';
 function index() {
 $this-set('tasks', $this-Task-find('all'));}
 }

 ?

 -

 CakeTooDoo/app/views/index.ctp

 h2Tasks/h2
 ?php if(empty($tasks)): ?
 There are no tasks in this list
 ?php else: ?
 table
 tr
 thTitle/th
 thStatus/th
 thCreated/th
 thModified/th
 thActions/th
 /tr
 ?php foreach ($tasks as $task): ?
 tr
 td
 ?php echo $task['Task']['title'] ?
 /td
 td
 ?php
 if($task['Task']['done']) echo Done;
 else echo Pending;
 ?
 /td
 td
 ?php echo $task['Task']['created'] ?
 /td
 td
 ?php echo $task['Task']['modified'] ?
 /td
 td
 !-- actions on tasks will be added later --
 /td
 /tr
 ?php endforeach; ?
 /table
 ?php endif; ?

 -

 i am trying to run with this link but it is not 
 runhttp://localhost/CakeTooDoo/tasks/index

 i am new for this frame work
 can any one tell me what is the problem in this cake application
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bigner for cake

2008-09-30 Thread PaulW

On Sep 30, 8:28 am, anjum [EMAIL PROTECTED] wrote:
 I am also getting same error on this example I putted the file into
 app/view/tasks/index.ctp

Hi I assume you are both working through the samples in the book
CakePHP Application Development by Ahsanul Bari and Anupom Syam? If so
I have done these and they do work.

anjum - It might just be a typo in your message but that should be
'views' not 'view'...

app/views/tasks/index.ctp

akhilesh - I agree with Donkeybob your index.ctp should be in a sub
folder called...

app/views/tasks/index.ctp
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



bigner for cake

2008-09-23 Thread akhilesh

http://localhost/myfirstcake/
this is my cake folder name
--

i have set in httpd.conf both

Apache mod_rewrite module is switched on
AllowOverride is set to all

temp dir is writable
-
table sturucture is

CREATE TABLE tasks (
id int(10) unsigned NOT NULL auto_increment,
title varchar(255) NOT NULL,
done tinyint(1) default NULL,
created datetime default NULL,
modified datetime default NULL,
PRIMARY KEY (id)
);

database.php.default. Rename to database.php


my database configuration file is present and Cake is able to connect
to the database
-


my cake module file is CakeTooDoo/app/models/task.php, write the
following code:

?php
class Task extends AppModel {
var $name = 'Task';
}
?
-



Controller file is CakeTooDoo/app/controllers/tasks_controller.php,
with the following code:

?php
class TasksController extends AppController {
var $name = 'Tasks';
function index() {
$this-set('tasks', $this-Task-find('all'));
}
}
?

-

CakeTooDoo/app/views/index.ctp

h2Tasks/h2
?php if(empty($tasks)): ?
There are no tasks in this list
?php else: ?
table
tr
thTitle/th
thStatus/th
thCreated/th
thModified/th
thActions/th
/tr
?php foreach ($tasks as $task): ?
tr
td
?php echo $task['Task']['title'] ?
/td
td
?php
if($task['Task']['done']) echo Done;
else echo Pending;
?
/td
td
?php echo $task['Task']['created'] ?
/td
td
?php echo $task['Task']['modified'] ?
/td
td
!-- actions on tasks will be added later --
/td
/tr
?php endforeach; ?
/table
?php endif; ?

-

i am trying to run with this link but it is not run
http://localhost/CakeTooDoo/tasks/index


i am new for this frame work
can any one tell me what is the problem in this cake application


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bigner for cake

2008-09-23 Thread dr. Hannibal Lecter

Do you get an error message when you try to open that in your browser?
Did you check your log files for any errors?

On Sep 23, 1:31 pm, akhilesh [EMAIL PROTECTED] wrote:
 http://localhost/myfirstcake/
 this is my cake folder name
 --

 i have set in httpd.conf both

 Apache mod_rewrite module is switched on
 AllowOverride is set to all

 temp dir is writable
 -
 table sturucture is

 CREATE TABLE tasks (
 id int(10) unsigned NOT NULL auto_increment,
 title varchar(255) NOT NULL,
 done tinyint(1) default NULL,
 created datetime default NULL,
 modified datetime default NULL,
 PRIMARY KEY (id)
 );

 database.php.default. Rename to database.php

 my database configuration file is present and Cake is able to connect
 to the database
 -

 my cake module file is CakeTooDoo/app/models/task.php, write the
 following code:

 ?php
 class Task extends AppModel {
 var $name = 'Task';}

 ?
 -

 Controller file is CakeTooDoo/app/controllers/tasks_controller.php,
 with the following code:

 ?php
 class TasksController extends AppController {
 var $name = 'Tasks';
 function index() {
 $this-set('tasks', $this-Task-find('all'));}
 }

 ?

 -

 CakeTooDoo/app/views/index.ctp

 h2Tasks/h2
 ?php if(empty($tasks)): ?
 There are no tasks in this list
 ?php else: ?
 table
 tr
 thTitle/th
 thStatus/th
 thCreated/th
 thModified/th
 thActions/th
 /tr
 ?php foreach ($tasks as $task): ?
 tr
 td
 ?php echo $task['Task']['title'] ?
 /td
 td
 ?php
 if($task['Task']['done']) echo Done;
 else echo Pending;
 ?
 /td
 td
 ?php echo $task['Task']['created'] ?
 /td
 td
 ?php echo $task['Task']['modified'] ?
 /td
 td
 !-- actions on tasks will be added later --
 /td
 /tr
 ?php endforeach; ?
 /table
 ?php endif; ?

 -

 i am trying to run with this link but it is not 
 runhttp://localhost/CakeTooDoo/tasks/index

 i am new for this frame work
 can any one tell me what is the problem in this cake application
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: bigner for cake

2008-09-23 Thread Donkeybob

Have you tried creating a  tasks folder under your view directory
and put your index.ctp file in there??

On Sep 23, 10:30 am, dr. Hannibal Lecter [EMAIL PROTECTED]
wrote:
 Do you get an error message when you try to open that in your browser?
 Did you check your log files for any errors?

 On Sep 23, 1:31 pm, akhilesh [EMAIL PROTECTED] wrote:

 http://localhost/myfirstcake/
  this is my cake folder name
  --

  i have set in httpd.conf both

  Apache mod_rewrite module is switched on
  AllowOverride is set to all

  temp dir is writable
  -
  table sturucture is

  CREATE TABLE tasks (
  id int(10) unsigned NOT NULL auto_increment,
  title varchar(255) NOT NULL,
  done tinyint(1) default NULL,
  created datetime default NULL,
  modified datetime default NULL,
  PRIMARY KEY (id)
  );

  database.php.default. Rename to database.php

  my database configuration file is present and Cake is able to connect
  to the database
  -

  my cake module file is CakeTooDoo/app/models/task.php, write the
  following code:

  ?php
  class Task extends AppModel {
  var $name = 'Task';}

  ?
  -

  Controller file is CakeTooDoo/app/controllers/tasks_controller.php,
  with the following code:

  ?php
  class TasksController extends AppController {
  var $name = 'Tasks';
  function index() {
  $this-set('tasks', $this-Task-find('all'));}
  }

  ?

  -

  CakeTooDoo/app/views/index.ctp

  h2Tasks/h2
  ?php if(empty($tasks)): ?
  There are no tasks in this list
  ?php else: ?
  table
  tr
  thTitle/th
  thStatus/th
  thCreated/th
  thModified/th
  thActions/th
  /tr
  ?php foreach ($tasks as $task): ?
  tr
  td
  ?php echo $task['Task']['title'] ?
  /td
  td
  ?php
  if($task['Task']['done']) echo Done;
  else echo Pending;
  ?
  /td
  td
  ?php echo $task['Task']['created'] ?
  /td
  td
  ?php echo $task['Task']['modified'] ?
  /td
  td
  !-- actions on tasks will be added later --
  /td
  /tr
  ?php endforeach; ?
  /table
  ?php endif; ?

  -

  i am trying to run with this link but it is not 
  runhttp://localhost/CakeTooDoo/tasks/index

  i am new for this frame work
  can any one tell me what is the problem in this cake application
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---