PDA

View Full Version : cakephp install



balusamy
08-21-2008, 07:53 AM
HI

I have started cake php project. I have create file in this way but I get error 404 Not Found error

First I create database
/app/config/database.php

<?php
class DATABASE_CONFIG
{
var $default = array('driver' => 'mysql',
'connect' => 'mysql_pconnect',
'host' => 'localhost',
'login' => 'root',
'password' => '',
'database' => 'testcakephp' );

}
?>

2. I create models

/app/models/testcakephp.php
<?php
class Testcakephp extends AppModel {
var $name = 'testcakephp';
}
?>

3. I create controller
/app/controllers/testcakephp_controller.php

<?php
class TestcakephpController extends AppController {
var $name = 'testcakephp';
function index() {

$this->set("msg","Welcome");

//$this->set('testcakephp', $this->Post->find('all'));
}
}
?>

4. I create index file
/app/views/testcakephp/index.thtml
<?php echo $msg ?>

In the above way i created but when I run my application
http://localhost/mycake/testcakephp/index

I got this below error.
Not Found
The requested URL /mycake/testcakephp was not found on this server.

Apache/1.3.33 Server at localhost Port 80

Kindly let me know what I make mistake.


Thanks
Best regards
Balu

Sir P
05-04-2009, 10:08 PM
hi there

Eeek im rather late to reply to this thread and you have probably move on from this project now but incase anyone else stumbles across this...

You need to switch debugging on in cakephp by setting the debug value in config/core.php to 2, from 0.. it will then show you a full error on screen, and help you find out exactly what your problem is. A cakephp error debug tutorial is here (http://www.madcapsule.com/blog/index.php/how-to-debug-cakephp-errors).

Aslo, check you have your cake downloaded .htaccess file in your root web dir..if its missing you will get the message you are getting,

all the best,