I have 2 installations of php for 2 versions of joomla on my windows computer.
I get this error when executing an application:
PHP Warning: Uncaught exception 'ErrorException' with message 'require_once(Cache/Lite.php): failed to open stream: No such file or directory' in C:\xampp\apps\joomla\htdocs\libraries\joomla\cache\storage\cachelite.php:79
The line is
require_once 'Cache/Lite.php';
Well there IS this file called Lite.php in:
C:\xampp\php\pear\Cache\Lite.php
I have a second php version installed, this might interfere. None the less, I removed the PATH entry of the second php version. I copied the folder to the second php installation, and I added the other php version to the path. Didn't help.
How can I find out where require_once ''
is actually looking for?
Or how would you try to fix this?
You can see the include path by:
<?php
echo get_include_path();
?>
If you need to change this, then you will need to modify your php.ini file or use set_include_path()
Remember to include your current include_path, when setting a new one:
<?php
$new_path = '/usr/lib/pear';
set_include_path(get_include_path() . PATH_SEPARATOR . $new_path);
?>
use echo getcwd() . " ";
to know the current working directory of a script, that will answer your question. more info here PHP Manual reference of getcwd()
From http://www.php.net/manual/en/function.include.php
Files are included based on the file path given or, if none is given, the include_path specified. If the file isn't found in the include_path, include will finally check in the calling script's own directory and the current working directory before failing. The include construct will emit a warning if it cannot find a file; this is different behavior from require, which will emit a fatal error.
If a path is defined — whether absolute (starting with a drive letter or \ on Windows, or / on Unix/Linux systems) or relative to the current directory (starting with . or ..) — the include_path will be ignored altogether. For example, if a filename begins with ../, the parser will look in the parent directory to find the requested file.