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

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

include(User.php) failed to open stream: No such file or directory Rate Topic: ***** 1 Votes

#1 User is offline   szworker 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 01-September 09

Posted 28 September 2009 - 11:52 AM

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

Description

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

Source File

/opt/lampp/htdocs/yiiapartment/yiiframework/framework/YiiBase.php(324)

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: }
00329:
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
0

#2 User is offline   tri 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,651
  • Joined: 20-November 08
  • Location:Stockholm, Sweden

Posted 28 September 2009 - 12:08 PM

View Postszworker, on 28 September 2009 - 11:52 AM, said:

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


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

/Tommy
Don't forget to read The Definitive Guide to Yii (en) (sv) | The class reference has the details
1

#3 User is offline   szworker 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 01-September 09

Posted 29 September 2009 - 11:48 PM

View Posttri, on 28 September 2009 - 12:08 PM, said:

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

/Tommy

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

#4 User is offline   matkaz 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 10-August 09

Posted 13 October 2009 - 10:41 AM

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()
	{
		$models=note::model()->findAll();

		$this->render("list",array(
			"model"=>$models,
		));
	}
...

gave the "autoload" error. While the code below works
...
	public function actionList()
	{
		$models=Note::model()->findAll(); // look out the capital N !!!

		$this->render("list",array(
			"model"=>$models,
		));
	}
...

0

#5 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,450
  • Joined: 04-October 10

Posted 02 November 2010 - 08:54 AM

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.
┬┐How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#6 User is offline   kani 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 25-December 10

Posted 25 December 2010 - 05:51 AM

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

View Postszworker, on 29 September 2009 - 11:48 PM, said:

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

0

#7 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 25 December 2010 - 06:26 AM

View Postkani, on 25 December 2010 - 05:51 AM, said:

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?
"Less noise - more signal"
0

#8 User is offline   sefburhan 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 137
  • Joined: 08-February 12
  • Location:islamabad

Posted 01 March 2012 - 03:59 AM

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
.
.
.
0

#9 User is offline   Anand Neema 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 20
  • Joined: 12-May 12

Posted 14 May 2012 - 07:21 AM

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

Thanks in Advance
Anand Neema
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users