Link to home
Create AccountLog in
PHP

PHP

--

Questions

--

Followers

Top Experts

Avatar of trowa
trowa

failed to open stream: No such file or directory
I'm helping my friend to troubleshoot this.

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

Open in new window


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:
User generated image
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
Avatar of arnoldarnold🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of trowatrowa

ASKER

Thank you for the replies.

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() {

	}

}

?>

Open in new window


The problem is I don't know which line is causing those errors and how to fix it. Any comments? Thank you.

ASKER CERTIFIED SOLUTION
Avatar of arnoldarnold🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

Avatar of trowatrowa

ASKER

Thank you.

I managed to solve the issue. Apparently it's linked to database settings

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.

PHP

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.