1

I have an existing project. I have configured this project on my personal pc but when i try to configure it on other pc i am getting following error.

( ! ) Fatal error: Class 'Controller' not found in C:\wamp\www\gal\protected\controllers\SiteController.php on line 3
Call Stack
#   Time    Memory  Function    Location
1   0.0000  131192  {main}( )   ...\index.php:0
2   0.0110  1167128 CApplication->run( )    ...\index.php:15
3   0.0110  1167752 CWebApplication->processRequest( )  ...\CApplication.php:185
4   0.0120  1295328 CWebApplication->runController( )   ...\CWebApplication.php:141
5   0.0120  1295496 CWebApplication->createController( )    ...\CWebApplication.php:276
6   0.0120  1334120 require( 'C:\wamp\www\gal\protected\controllers\LoginController.php' )  ...\CWebApplication.php:354
7   0.0120  1334280 spl_autoload_call ( )   ...\CWebApplication.php:8
8   0.0120  1334304 YiiBase::autoload( )    ...\CWebApplication.php:8
9   0.0120  1335464 CApplication->handleError( )    ...\CWebApplication.php:442
10  0.0160  1800752 CErrorHandler->handle( )    ...\CApplication.php:834
11  0.0160  1792904 CErrorHandler->handleError( )   ...\CErrorHandler.php:133
12  0.0160  1801992 CErrorHandler->renderError( )   ...\CErrorHandler.php:296
13  0.0160  1802024 CWebApplication->runController( )   ...\CErrorHandler.php:368
14  0.0160  1802024 CWebApplication->createController( )    ...\CWebApplication.php:276
15  0.0160  1819904 require( 'C:\wamp\www\gal\protected\controllers\SiteController.php' )   ...\CWebApplication.php:354

My folder structure is

myproject
  protected
    command
    components
    config
    controllers
    data
    extensions
    messages
    migrations
    models
    modules
    test
    views


Main.php has 
'import'=>array(
  'application.models.*',

  'application.components.*'

),

Regards, Ashok

1 Answers1

2

Check "Controller" for Strict Errors.

For example in my case help corrected from

public function beforeRender()

to

public function beforeRender($view)

or turn off error_reporting for STRICT and check if it helps, then you know for sure that are similar problem.

Box Box Box Box
  • 5,094
  • 10
  • 49
  • 67