Results 1 to 2 of 2

Thread: cakephp install

  1. #1
    Join Date
    Oct 2007
    Location
    Chennai - India
    Posts
    24
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default cakephp install

    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
    Last edited by balusamy; 08-21-2008 at 07:59 AM.

  2. #2
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    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,

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •