• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2755
  • Last Modified:

Path Problem: Failed opening required 'Smarty.class.php' ????

Hi

I downloaded my working site from webserver yesterday and I tried setting it up on my local host. I installed xampp suite for easy php/apache setup. I then copied all files of the site in htdocs folder of xampp. I tried to browse it through http://localhost/ but it returned the following error:


Warning: require_once(Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\config.php on line 8

Fatal error: require_once() [function.require]: Failed opening required 'Smarty.class.php' (include_path='/home/dpt07/pear/lib:/home/dpt07/Smarty/libs;/home/dpt07/pear/lib:/home/dpt07/fpdf/;.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\config.php on line 8


which I think is a problem in the path reference of the required files. I'm a novice person in PHP and don't know anything more than echo. I also tried googling it but couldn't find a suitable solution. Your help will be highly appreciated.


Following is the code which returned this error.


ini_set('include_path', '/home/dpt07/pear/lib:/home/dpt07/Smarty/libs' . PATH_SEPARATOR .
      '/home/dpt07/pear/lib:/home/dpt07/fpdf/' . PATH_SEPARATOR .
      ini_get('include_path'));

// load Smarty library
require_once('Smarty.class.php');
require_once('Mail.php');


Many Thanks in advance
0
isaami
Asked:
isaami
1 Solution
 
MacAnthonyCommented:
ini_set('include_path', '/home/dpt07/pear/lib:/home/dpt07/Smarty/libs' . PATH_SEPARATOR .
      '/home/dpt07/pear/lib:/home/dpt07/fpdf/' . PATH_SEPARATOR .
      ini_get('include_path'));

You are using windows and these paths are in linux/unix style directory references.

You can either change the call of ini_set() and put the path that smarty is installed in, or a better option would be to append the include_path directive in the php.ini file with the path that smarty is installed in.
0
 
isaamiAuthor Commented:
I figured it out that smarty was not installed on my computer and secondly I corrected the Paths in php.ini as suggested here http://smarty.incutio.com/?page=SmartyInstallationWindows

Thanks anyways
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now