Jump to content

Recommended Posts

Hi,

 

I installed cakePHH on my win 7 , apache, easyphp laptop.

php files work fine but I cant get anything to run with cakephp which is extracted where I can run html files.

I set fatabase config file, ran index.php and everything seemed fine until i tried to do something

 

my error is

Missing Controller

Error: UserController could not be found.

Error: Create the class UserController below in file: app\Controller\UserController.php

 

And I followed

 

http://www.grasphub.com/2013/01/print-hello-world-in-cakephp/

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/288630-cant-run-hello-world/
Share on other sites

I don't have any experience working with CakePHP, but in the example you followed: 

 

 

Create users_controller.php in your app/controllers folder with following codeset.

<?php
class UsersController extends AppController
{
var $name='Users';
function index()
{
}
}

?> 

 

 

Since the error is pretty straightforward, you should check that you have named your controller right. 

Let me explain better.

 

Just because it reads WAMP(windows,apache,mysql,php) does not mean it's wampserver

 

you:

easyphp uses php version 5.4.10

cakephp is oop and mvc (advanced,must use cakephp framework, have an idea about classes and objects,create a model,view,controller structure)

 

suggestion:

wampserver uses php version 5.5.12

actually learn php coding at php.net and start out using procedural style

then move onto oop

learn a framework optionally after you feel confident enough, can then decide if actually need all the bloat and to learn a framework

cakephp is not the most preferred framework, something like zend or symphony would most likely benefit you more.

 

If you still want to continue with cakephp, I suggest using from cakephp's site and not some random website and code.

These actually work, I can attest to the fact because have done them all.

http://book.cakephp.org/2.0/en/index.html

Edited by QuickOldCar
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.