SpyrosT Posted July 23, 2010 Share Posted July 23, 2010 I have moved my site from subfolder into the root and Im gettinga blank front page. The BO works fine.The error I get is PHP Fatal error: Smarty error: the $compile_dir 'C:\Webs\......\DIGIWAY-CY.COM/tools/smarty/compile' does not exist, or is not a directory. in C:\Webs\.....\DIGIWAY-CY.COM\tools\smarty\Smarty.class.php on line 1095 I did a check and there is no "compile" directory in there.I also check the smarty.config.inc.php and here are the settings require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); $smarty = new Smarty(); $smarty->template_dir = _PS_THEME_DIR_.'tpl'; $smarty->compile_dir = _PS_SMARTY_DIR_.'compile'; $smarty->cache_dir = _PS_SMARTY_DIR_.'cache'; $smarty->config_dir = _PS_SMARTY_DIR_.'configs'; $smarty->caching = false; $smarty->force_compile = true; // to pass "false" when put into production $smarty->compile_check = false; //$smarty->debugging = true; $smarty->debug_tpl = _PS_ALL_THEMES_DIR_ . 'debug.tpl'; Any suggestions?Do I have to cretae that directory? Link to comment Share on other sites More sharing options...
SpyrosT Posted July 23, 2010 Author Share Posted July 23, 2010 I have created that directory and added a copy of index.php inside like the one in the "smatry" directory.Not sure if I did the right thing, but it seems to be working faultless...I think Link to comment Share on other sites More sharing options...
SpyrosT Posted July 25, 2010 Author Share Posted July 25, 2010 The things got worst.I am getting many errors like PHP Warning: include(C:\Webs\....\DIGIWAY-CY.COM/tools/smarty/compile\%`^60A^60AD786D%%header.tpl.php): failed to open stream: No such file or directory in C:\Webs\....\DIGIWAY-CY.COM\tools\smarty\Smarty.class.php on line 1266 PHP Warning: include(): Failed opening 'C:\Webs\....\DIGIWAY-CY.COM/tools/smarty/compile\%`^60A^60AD786D%%header.tpl.php' for inclusion (include_path='.;C:\php5\pear') in C:\Webs\....\DIGIWAY-CY.COM\tools\smarty\Smarty.class.php on line 1266 And an other 140 of these for all my modules. Link to comment Share on other sites More sharing options...
rocky Posted July 25, 2010 Share Posted July 25, 2010 I don't know how your compile directory got deleted when you moved PrestaShop. I suggest that you edit tools/Smarty.class.php and change 'force_compile' to true. Hopefully, that will recompile all the files into the compile directory for you. I hope no other directories were lost in the move.EDIT: I see that you've already done that. I can't think of any other solution other than to start over from scratch and then coping over your theme files and any other files you changed. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 25, 2010 Author Share Posted July 25, 2010 Thanks Rocky for the reply.I still have a copy of /shop/ and there wasn't a compile directory in there. This is really strange.Now the compile folder I created is full of files like 1.890 %^051^0514C9CF% Link to comment Share on other sites More sharing options...
SpyrosT Posted July 25, 2010 Author Share Posted July 25, 2010 EDIT: I see that you've already done that. I can't think of any other solution other than to start over from scratch and then coping over your theme files and any other files you changed. No I have not done that. The var $force_compile by default was false; and it still is.the Only change was var $compile_check that by default it was true and I changed it to false along withvar $caching from 0 to 1 as you suggested in performance tips. But now they are both as default.var $compile_check = true;var $force_compile = false;var $caching = 0; Link to comment Share on other sites More sharing options...
rocky Posted July 25, 2010 Share Posted July 25, 2010 It is normal for Smarty to compile your tpl files into php files like those you mentioned above. Have you tried changing "force_compile" to true to see whether that fixes all the missing compiled file errors? Link to comment Share on other sites More sharing options...
SpyrosT Posted July 25, 2010 Author Share Posted July 25, 2010 I will give it a try now.Do I have to clean the compile directory first? Link to comment Share on other sites More sharing options...
rocky Posted July 25, 2010 Share Posted July 25, 2010 You can delete everything in the compile folder except index.php if you like, since Smarty will just recompile the files. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 25, 2010 Author Share Posted July 25, 2010 The same time Im trying to delete these files there are new created and the folder is full again... Link to comment Share on other sites More sharing options...
rocky Posted July 25, 2010 Share Posted July 25, 2010 I guess someone is viewing your site, causing them to be recompiled. If your error messages have disappeared, then it's not a problem. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 26, 2010 Author Share Posted July 26, 2010 OK I have clean my error log and testing if the errors will come back.Settings now are var $compile_check = true; var $force_compile = true; var $caching = 0; There is a new error in BO when trying to delete a category image.object cannot be loadedand in error log it gives PHP Warning: unlink(C:\Webs\....\DIGIWAY-CY.COM/img/c/57.jpg): Permission denied in C:\Webs\....\DIGIWAY-CY.COM\classes\AdminTab.php on line 368 PHP Warning: imagejpeg(): Unable to open 'C:\Webs\....\DIGIWAY-CY.COM/img/c/57-category.jpg' for writing: Permission denied in C:\Webs\....\DIGIWAY-CY.COM\images.inc.php on line 236 PHP Warning: imagejpeg(): Unable to open 'C:\Webs\....\DIGIWAY-CY.COM/img/c/57-large.jpg' for writing: Permission denied in C:\Webs\....\DIGIWAY-CY.COM\images.inc.php on line 236 PHP Warning: imagejpeg(): Unable to open 'C:\Webs\....\DIGIWAY-CY.COM/img/c/57-medium.jpg' for writing: Permission denied in C:\Webs\....\DIGIWAY-CY.COM\images.inc.php on line 236 PHP Warning: imagejpeg(): Unable to open 'C:\Webs\....\DIGIWAY-CY.COM/img/c/57-small.jpg' for writing: Permission denied in C:\Webs\....\DIGIWAY-CY.COM\images.inc.php on line 236 Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2010 Share Posted July 26, 2010 Looks like a permissions issue. Make sure that img and img/c are chmod 755. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 26, 2010 Author Share Posted July 26, 2010 The image directory and all folders inside are 766.All permissions are the same as it the /shop/ was.I have checked them all one by one for about 3 times. Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2010 Share Posted July 26, 2010 I can't think of anything else that would cause an "unable to open for writing - permission denied" error. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 26, 2010 Author Share Posted July 26, 2010 Is there anything in the database that has to do with permissions?And Im thinking of one other thing. Maybe my account has o quota and because theimg directory is huge it can block me from editing. What do you think? Link to comment Share on other sites More sharing options...
rocky Posted July 26, 2010 Share Posted July 26, 2010 No, there are no permissions in the database.Yes, it is possible that there are too many images in your img/p directory or that you've reached the maximum file quota. You'll have to check your cPanel to see how much of your quota you have used. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 27, 2010 Author Share Posted July 27, 2010 The permission error has been fixed. It was an issue from my host and they fixed it.The smarty errors are almost gone. I got the last one 16 hours ago.Rocky, what should be the next step? Link to comment Share on other sites More sharing options...
rocky Posted July 27, 2010 Share Posted July 27, 2010 What problems are remaining? Link to comment Share on other sites More sharing options...
SpyrosT Posted July 27, 2010 Author Share Posted July 27, 2010 For the moment it seems to work fine but slow.Should I set the force compile back to false?The setting now are: var $compile_check = true; var $force_compile = true; var $caching = 0; And what about the settings in /config/smarty.inc.phpWill this do any conflict with the other settings? require_once(_PS_SMARTY_DIR_.'Smarty.class.php'); $smarty = new Smarty(); $smarty->template_dir = _PS_THEME_DIR_.'tpl'; $smarty->compile_dir = _PS_SMARTY_DIR_.'compile'; $smarty->cache_dir = _PS_SMARTY_DIR_.'cache'; $smarty->config_dir = _PS_SMARTY_DIR_.'configs'; $smarty->caching = false; $smarty->force_compile = true; // to pass "false" when put into production $smarty->compile_check = false; //$smarty->debugging = true; $smarty->debug_tpl = _PS_ALL_THEMES_DIR_ . 'debug.tpl'; Link to comment Share on other sites More sharing options...
rocky Posted July 27, 2010 Share Posted July 27, 2010 If everything is working again, then you should be able to turn force compile off and turn caching back on. I wasn't aware of those settings in config/smarty.config.inc.php. I'm not sure whether they override the options in tools/smarty/Smarty.class.php. From looking at the code, I would expect them to override the options, but then my performance tip to enable Smarty caching should never have worked. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 27, 2010 Author Share Posted July 27, 2010 Yes you are right that the tip does the job and it does not seem to be ignored from the other settings,but I just can't understand why the developers left a duplicated code. Is that the same in your files too?Now in case I need to make some changes, what should be the settings?i.e. I need to make this for now.Should I leave the settings as they are and change them after the modification? Link to comment Share on other sites More sharing options...
rocky Posted July 27, 2010 Share Posted July 27, 2010 It looks like the PrestaShop team created a Smarty configuration file to override the default Smarty settings. Now that I think about it, it does make more sense to override the default values rather than changing the default values.It should be safe to turn on Smarty caching like you had before now. Link to comment Share on other sites More sharing options...
SpyrosT Posted July 29, 2010 Author Share Posted July 29, 2010 A few and periodical errors left, but the smarty issue has gone (fingers crossed).A HUUUUUUGE TNX Rocky!!! Link to comment Share on other sites More sharing options...
overdoze Posted August 12, 2010 Share Posted August 12, 2010 HiMe 2 i have the some problem with smarty. i have errors message in my screen like Warning: Smarty error: [in C:\wamp\www\..../homefeatured.tpl line 19]: syntax error: plugin function smarty_compiler_continue() not found in C:\wamp\www\????\tools\smarty\plugins\compiler.continue.php (Smarty_Compiler.class.php, line 656) in C:\wamp\www\????\tools\smarty\Smarty.class.php on line 1095 and i can't find the origin of this problem may be coz i'm PS bigenner and i dont know the structure of PS.Plz helpThx 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