include(User.php) failed to open stream: No such file or directory

I got this error and can not solve it. please help.

My program, which is very similar to testdrive + some dao was working fine in my development environment (wamp)

but when I upload everything the same to Linux ubuntu server

it no longer good.

the welcome page is successfully rendered in the linux environment. The problem starts I filled out the login form and press submit button. Then I see this.(see below)

I imported all database tables to new machine. I don’t know what wrong with this problem because in my notebook, everything is working fine.

please help.


PHP Error


include(User.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory

Source File


00312: * @param string class name

00313: * @return boolean whether the class has been loaded successfully

00314: */

00315: public static function autoload($className)

00316: {

00317: // use include so that the error PHP file may appear

00318: if(isset(self::$_coreClasses[$className]))

00319: include(YII_PATH.self::$_coreClasses[$className]);

00320: else if(isset(self::$_classes[$className]))

00321: include(self::$_classes[$className]);

00322: else

00323: {

00324: include($className.’.php’);

00325: return class_exists($className,false) || interface_exists($className,false);

00326: }

00327: return true;

00328: }


00330: /**

00331: * Writes a trace message.

00332: * This method will only log a message when the application is in debug mode.

00333: * @param string message to be logged

00334: * @param string category of the message

00335: * @see log

00336: */

Stack Trace

#0 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/YiiBase.php(324): autoload()

#1 unknown(0): autoload()

#2 /opt/lampp/htdocs/yiiapartment/protected/components/UserIdentity.php(17): spl_autoload_call()

#3 /opt/lampp/htdocs/yiiapartment/protected/models/LoginForm.php(48): UserIdentity->authenticate()

#4 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/validators/CInlineValidator.php(39): LoginForm->authenticate()

#5 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/validators/CValidator.php(161): CInlineValidator->validateAttribute()

#6 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/base/CModel.php(187): CInlineValidator->validate()

#7 /opt/lampp/htdocs/yiiapartment/protected/controllers/SiteController.php(62): LoginForm->validate()

#8 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/actions/CInlineAction.php(32): SiteController->actionLogin()

#9 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/CController.php(300): CInlineAction->run()

#10 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/CController.php(278): SiteController->runAction()

#11 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/CController.php(257): SiteController->runActionWithFilters()

#12 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/CWebApplication.php(332): SiteController->run()

#13 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/web/CWebApplication.php(120): CWebApplication->runController()

#14 /opt/lampp/htdocs/yiiapartment/yiiframework/framework/base/CApplication.php(134): CWebApplication->processRequest()

#15 /opt/lampp/htdocs/yiiapartment/index.php(11): CWebApplication->run()


Dev Environment

Os: vista Home service pack1

system: WampServer 2.0i [07/11/09] its normal wamp default installation

    Includes :

     - Apache 2.2.11

     - MySQL 5.1.36

     - PHP 5.3.0 

Linux Server Environment

  • Apache 2.2.12

    • MySQL 5.1.37

    • PHP 5.3.0

First thing to check is file names (case sensitive in Linux).


Thanks. Key is that (case sensitive in Linux).

To be more accurate, on Unix system, I have a class ‘Note’ for the table ‘note’ in $PROJECT/protected/models/Note.php

In $PROJECT/controllers/NoteController.php


	public function actionList()








gave the "autoload" error. While the code below works


	public function actionList()


		$models=Note::model()->findAll(); // look out the capital N !!!






I runned out through the same problem about 10 minutes a go… just some misstyping of an object in lowercase and ‘bang’ application error occurs in Linux.

I have a same problem.What is solution./I am a beginner. :)

Welcome to the forum. :)

I can’t think of any other way of explaining the issue other than what people already said in this topic.

You know what case sensitivity means, don’t you?

I have same problem while using relationship name in view like:‘manufactures.manufacturers_name’ I have defined relationship in Model,which Gives this Warning:

include(manufacturers.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory




i am also facing this problem while sending fiend request…please help me

Thanks in Advance

Anand Neema