I have an interesting problem with my yii install. I recently changed the yii framework files from 'Yii/framework' to 'Yii' folder and now it's attempting to include other php files that's not under the 'Yii' folder.
Example:
PHP Error
Description
YiiBase::include(BreadCrumb.php) [<a href='yiibase.include'>yiibase.include</a>]: failed to open stream: No such file or directory
Source File
/var/www/yii/YiiBase.php(310)
I'm not attempting to load BreadCrumb.php - this file is located under another folder under the parent /var/www.
Is this a bug in Yii or am I missing something here?
Thanks for the response! I forgot to mention, this is from running the blog demo that comes with Yii-1.0.6
could APC and it's caching cause any problems?
I tested this theory. It seems when I run another app that resides under /var/www (that uses BreadCrumb.php) and then go back to the blog demo, I am able to reproduce the error. It's possible that BreadCrumb.php is causing this … but would like your feedback.
BreadCrumb.php code:
<?php if (!defined('APPPATH')) exit('No direct script access allowed');
session_start();
/*
* @Author: Dean Ericson
* @Email: mail@deanericson.com
*
*/
final class BreadCrumb{
private $title;
private $url;
private $isRoot;
/*
* No need to set anything up. I autoload it and
* let the setters mutate the properties through the
* setBreadCrumb function
*/
function BreadCrumb(){}
/*
* Takes an array which represents this class (BreadCrumb)
* as a parameter. Sets the class through it mutators,
* then sets itself within the BreadCrumbList Object.
*/
function setBreadCrumb($bcObjArr){
$this->title=$bcObjArr['title'];
$this->url=$bcObjArr['url'];
$this->isRoot=$bcObjArr['isRoot'];
$CI =& get_Instance();
$CI->breadcrumblist->add($this);
$_SESSION['breadCrumbList'] = $CI->breadcrumblist->getBreadCrumbs();
}
function getTitle(){
return $this->title;
}
function setTitle($t){
$this->title=$t;
}
function getUrl(){
return $this->url;
}
function setUrl($u){
$this->url=$u;
}
function isRoot(){
return $this->isRoot;
}
function setIsRoot($r){
$this->isRoot=$r;
}
}
?>
You are serializing breadcrumb object into session. When session starts, it will try to unserialize data in it, and this is the cause of the problem, since your two applications under the same web folder may share the same session unless you do something about it.