We help IT Professionals succeed at work.

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

isaami asked
Last Modified: 2013-12-13

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 .

// load Smarty library

Many Thanks in advance
Watch Question

Unlock this solution and get a sample of our free trial.
(No credit card required)


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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.