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

Posted on 2007-09-30
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
Question by:isaami
    LVL 11

    Accepted Solution

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

    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.

    Author Comment

    I figured it out that smarty was not installed on my computer and secondly I corrected the Paths in php.ini as suggested here

    Thanks anyways

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Suggested Solutions

    Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now