BladeXR Posted July 24, 2009 Share Posted July 24, 2009 Hello guys,I'm very excited with this E-commerce solutio, but I'm a begineer, and I got stuck after completing installation of PS 1.2.0.7 beta. I'm receiving the following error message in IE and Firefox:Warning: require_once(/tools/smarty/Smarty.class.php) [function.require-once]: failed to open stream: No such file or directory in E:\Websites\XYZ\config\smarty.config.inc.php on line 3Fatal error: require_once() [function.require]: Failed opening required '/tools/smarty/Smarty.class.php' (include_path='.;c:\php\includes') in E:\Websites\XYZ\config\smarty.config.inc.php on line 3I'm trying to run this application in my own dedicated server with the following general specifications:Windows 2003 RC2IIS 6.0PHP 5.2.10MySQL 5.1.36I've searched a lot in the internet trying to figure out where the problem is, but I have no idea.Please help! :-S Link to comment Share on other sites More sharing options...
Patric Posted July 24, 2009 Share Posted July 24, 2009 The file /tools/smarty/Smarty.class.php may be missing or corrupted. Please try to copy it again from the original archive. Link to comment Share on other sites More sharing options...
BladeXR Posted July 24, 2009 Author Share Posted July 24, 2009 Thanks Patric for your answer. However I've just replaced the file as you suggested but the problem persist.There's anything else I can try to solve this? Link to comment Share on other sites More sharing options...
BladeXR Posted July 25, 2009 Author Share Posted July 25, 2009 Well, I've found the problem.It was related to file "config.inc.php" under "config" folder, at least for windows OS as in my case.The issue was in the entry:/* Directories */define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));It seems that windows isn't getting the path as expected, so, I replaced the function "realpath" with the function "dirname" that gives the "root path" of the application.The line must be as follows:define('_PS_ROOT_DIR_', dirname($currentDir));In my case, it solved all my headaches and now Prestashop is running smoothly on my own server.Hope this can help to others! Link to comment Share on other sites More sharing options...
Hani Posted September 17, 2009 Share Posted September 17, 2009 I'm having the same problem I searched the original archive but don't find it. Is it included in the prestashop_1.2.4.0.zip file? Please help. I gotta have this done by the end of this week. Thanks all Link to comment Share on other sites More sharing options...
BladeXR Posted September 18, 2009 Author Share Posted September 18, 2009 Actually, I think it could be related to IIS because I changed to Apache and the problem didn't appear anymore.I'm not pretty sure if the file still exist in the newest version. I will update my own version and see what happens. Link to comment Share on other sites More sharing options...
Hani Posted September 18, 2009 Share Posted September 18, 2009 Thank you for your prompt response, Blade Sorry I forgot to state that I use WAMPServer on WinXP.At installation, I have to create these folders: /themes/prestashop/lang, /tools/smarty/compile, /translations, /upload folder. Is it correct? Cos I didn't find it but the system required the folders. Link to comment Share on other sites More sharing options...
BladeXR Posted September 18, 2009 Author Share Posted September 18, 2009 Nope, those folders are found in the root path of your prestashop installation.The problem is in the way the path is solved by the function in PHP. You must search under folder "config" for the file “config.inc.php”, then edit the file (I used wordpad) and search for the line:/* Directories */define(’PS_ROOT_DIR‘, realpath($currentDir.’/..’));And then change it in this way:define(’PS_ROOT_DIR‘, dirname($currentDir));And save the file. It should work for you as it worked for me.Good luck!!! Link to comment Share on other sites More sharing options...
walxo Posted April 7, 2010 Share Posted April 7, 2010 on Windows 2008 server - /config/config.inc.phpreplace row:define('_PS_ROOT_DIR_', realpath($currentDir.'/..'));with: define('_PS_ROOT_DIR_', 'C:/../../wwwroot');Note: change backslashes '\' in windows path with slashes '/' Link to comment Share on other sites More sharing options...
Zuko Posted April 25, 2011 Share Posted April 25, 2011 Just an update.In newer prestashop versions the file you need to change is: /config/defines.inc.phpYou change this line: define('PS_ROOT_DIR', realpath($currentDir.'/..'));into this:define('PS_ROOT_DIR', dirname($currentDir)); Link to comment Share on other sites More sharing options...
redbeetle4403 Posted March 19, 2013 Share Posted March 19, 2013 (edited) Hi All, I have done as suggested above but still I get PHP Fatal error: require_once() [function.require]: Failed opening required 'D:\Domains\myURL\wwwroot\shop\config/tools/smarty/Smarty.class.php' (include_path='.;C:\php5\pear') in D:\Domains\myURL\wwwroot\shop\config\smarty.config.inc.php on line 29 I have changed the defines.inc line to define('_PS_ROOT_DIR_', dirname($currentDir.'/shop')); This is driving me crazy Edited March 19, 2013 by redbeetle4403 (see edit history) Link to comment Share on other sites More sharing options...
sworld Posted August 26, 2016 Share Posted August 26, 2016 How to Solve it ? Warning: require_once(/home1/sworld/public_html/wholesalestationery.in/tools/smarty/Smarty.class.php): failed to open stream: No such file or directory in/home1/sworld/public_html/wholesalestationery.in/config/smarty.config.inc.php on line 29Fatal error: require_once(): Failed opening required '/home1/sworld/public_html/wholesalestationery.in/tools/smarty/Smarty.class.php' (include_path='.:/opt/php55/lib/php') in/home1/sworld/public_html/wholesalestationery.in/config/smarty.config.inc.php on line 29 Link to comment Share on other sites More sharing options...
NemoPS Posted August 27, 2016 Share Posted August 27, 2016 Check if you have that smarty class file in the folder, or if the folder itself has enough access privileges. If the file is not there, download a clean prestashop version and grab it from there Link to comment Share on other sites More sharing options...
sworld Posted August 27, 2016 Share Posted August 27, 2016 I Did it not sure, How Link to comment Share on other sites More sharing options...
NemoPS Posted September 5, 2016 Share Posted September 5, 2016 You mean not sure how to download a clean version? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now