hi,
the importing of models, components in the config/main.php is not happening in the remote server. It was working fine in the localhost development system. When ran the YII REQUIREMENTs, everything is OK except warnings for APC and Memcache ( I have the same warnings in my localhost). The PHP version is the latest (5.4.24 ) and Apache server with server API CGI/fastCGI. Still I have not uploaded my files, but getting the result from the files generated by yiic. The only change I made in the config is to add the ‘UrlManager’ class in the configuration array components and adding the same file UrlManager.php in the components folder. Even the models are not getting autoloaded. I know my problem is unique as I could not find any similar problem reported when searched for a solution.
Error shown:
-
After logging in as demo/demo: include(User.php): failed to open stream: No such file or directory.
-
if including UrlManager.php the error shown is as follows:
[i]Warning: include(UrlManager.php): failed to open stream: No such file or directory in /home/mysite/framework/YiiBase.php on line 427
Warning: include(): Failed opening ‘UrlManager.php’ for inclusion color="#FF0000"[/color] in /home/mysite/framework/YiiBase.php on line 427
Warning: include(UrlManager.php): failed to open stream: No such file or directory in /home/mysite/framework/YiiBase.php on line 427
Warning: include(): Failed opening ‘UrlManager.php’ for inclusion color="#FF0000"[/color] in /home/mysite/framework/YiiBase.php on line 427
Fatal error: Class ‘UrlManager’ not found in /home/mysite/framework/YiiBase.php on line 217
[/i]
Following is the stack trace.
[i]PHP warning
include(UrlManager.php): failed to open stream: No such file or directory
/home/mysite/framework/YiiBase.php(427)
415 {
416 include($classFile);
417 if(YII_DEBUG && basename(realpath($classFile))!==$className.’.php’)
418 throw new CException(Yii::t(‘yii’,‘Class name “{class}” does not match class file “{file}”.’, array(
419 ‘{class}’=>$className,
420 ‘{file}’=>$classFile,
421 )));
422 break;
423 }
424 }
425 }
426 else
427 include($className.’.php’);
428 }
429 else // class name with namespace in PHP 5.3
430 {
431 $namespace=str_replace(’\\’,’.’,ltrim($className,’\\’));
432 if(($path=self::getPathOfAlias($namespace))!==false)
433 include($path.’.php’);
434 else
435 return false;
436 }
437 return class_exists($className,false) || interface_exists($className,false);
438 }
439 return true;
Stack Trace
#0 + /home/mysite/framework/YiiBase.php(427): YiiBase::autoload()
#1 + /home/mysite/framework/YiiBase.php(302): YiiBase::autoload("UrlManager")
#2 + /home/mysite/framework/YiiBase.php(196): YiiBase::import("UrlManager", true)
#3 + /home/mysite/framework/base/CModule.php(386): YiiBase::createComponent(array("urlFormat" => "path", "showScriptName" => false, "rules" => array("<controller:\w+>/<id:\d+>" => "<controller>/view", "<controller:\w+>/<action:\w+>/<id:\d+>/<title>" => "<controller>/<action>", "<controller:\w+>/<action:\w+>/<id:\d+>" => "<controller>/<action>", "<controller:\w+>/<action:\w+>/<title:\w+>" => "<controller>/<action>", …), "urlSuffix" => ".html", …))
#4 + /home/mysite/framework/base/CApplication.php(522): CModule->getComponent("urlManager")
#5 + /home/mysite/framework/web/CWebApplication.php(140): CApplication->getUrlManager()
#6 + /home/mysite/framework/base/CApplication.php(180): CWebApplication->processRequest()
#7 + /home/mysite/public_html/index.php(17): CApplication->run()
[/i]
The site is working fine in my Xampp windows local host. As I am new to remote server, I do not know what to do. I searched in the web and could not find any such thing happened to others. I look forward to some help.
Thanks in advance.