PHP
--
Questions
--
Followers
Top Experts
failed to open stream: No such file or directory
I'm helping my friend to troubleshoot this.
Apparently his website is facing these errors:
Knowing this was some mapping issue, but I couldn't solve it. I think the server is on Linux and I'm not familiar with it.
The directory structure is like below:

Do you have any suggestions for troubleshooting? Thank you.
Apparently his website is facing these errors:
Warning: include(application/views/themes/ecig/header.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 59
Warning: include(application/views/themes/ecig/header.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 59
Warning: include(): Failed opening 'application/views/themes/ecig/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 59
Warning: include(application/views/themes/ecig/notfound.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 60
Warning: include(application/views/themes/ecig/notfound.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 60
Warning: include(): Failed opening 'application/views/themes/ecig/notfound.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 60
Warning: include(application/views/themes/ecig/footer.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 61
Warning: include(application/views/themes/ecig/footer.php): failed to open stream: No such file or directory in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 61
Warning: include(): Failed opening 'application/views/themes/ecig/footer.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/cccccccccc/public_html/wwwwwwww.com/system/classes/loader.php on line 61
Knowing this was some mapping issue, but I couldn't solve it. I think the server is on Linux and I'm not familiar with it.
The directory structure is like below:

Do you have any suggestions for troubleshooting? Thank you.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Thank you for the replies.
And here's the codes for loader.php
The problem is I don't know which line is causing those errors and how to fix it. Any comments? Thank you.
And here's the codes for loader.php
<?php
class loader {
public $LibraryPath = classPath;
public $ClassValidation = true;
public $cls;
function __construct() {
$this->cls = $this;
}
public function __call($method, $arg){
if ($method == 'classes')
$this->LibraryPath = classPath;
if ($method == 'controller')
$this->LibraryPath = controller;
if ($method == 'model')
$this->LibraryPath = models;
if ($method == 'library')
$this->LibraryPath = library;
$this->NewObject($arg[0], $arg);
}
public function NewObject($Name, $Parameters = array()) {
if (!class_exists($Name) && !$this->LoadClass($Name))
if ($this->ClassValidation == true )
die('Library File `'.$this->LibraryPath.$Name.'.php` not found.');
if (class_exists($Name)){
$_SESSION['classes'][] = $this->LibraryPath.$Name;
return $this->cls->$Name = new $Name($this, $Parameters);
}
}
public function LoadClass($Name) {
$File = $this->LibraryPath.$Name.'.php';
if (file_exists($File))
return include($File);
else return false;
}
public function view($page, $data = NULL ) {
$this->load = new loader();
if( file_exists( temp_location.$page ) && $page != '' ) {
foreach ($data as $key => $value) {
$$key = (object) $value;
}
$this->db = new myDBC();
//unset($data);
$this->load->cls = $this;
if( in_array('header', explode(',', $setting->option )) )
include temp_location.headerpage;
include temp_location.$page;
if( in_array('footer', explode(',', $setting->option )) )
include temp_location.footerpage;
}
else {
include temp_location.headerpage;
include temp_location.'notfound.php';
include temp_location.footerpage;
}
die;
}
public function third_party($folder, $file) {
$ext = explode('.',$file);
if ( end($ext) == 'js' )
echo '<script src="'.thirdParty.$folder.'/'.$file.'" type="text/javascript"></script>';
if ( end($ext) == 'php' )
include appPath.'third_party/'.$folder.'/'.$file;
}
function __destruct() {
}
}
?>
The problem is I don't know which line is causing those errors and how to fix it. Any comments? Thank you.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Thank you.
I managed to solve the issue. Apparently it's linked to database settings
I managed to solve the issue. Apparently it's linked to database settings






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
PHP
--
Questions
--
Followers
Top Experts
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.