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
isaamiAsked:
Who is Participating?
 
MacAnthonyConnect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.