need4speed Posted November 4, 2010 Share Posted November 4, 2010 Im not 100% sure but I think my webshop doesnt work after I activated the google analytics module.I have tried to deactivate it without any luck, but maybe it have damage something else?I can get access to the administration but the frontend is just loading and loading and then it times out.Im running prestashop 1.3.1 I will pay if someone can fix it! Link to comment Share on other sites More sharing options...
razaro Posted November 4, 2010 Share Posted November 4, 2010 That is strange.You tried to uninstall module, but nothing changed ?First try to delete all files from tools/smarty/compile folder except index.php.Then you can turn debug mode on change in config/config.inc.php /* Debug only */ @ini_set('display_errors', 'on'); maybe some error will come up in back office.Did you installed any other module ? Link to comment Share on other sites More sharing options...
need4speed Posted November 4, 2010 Author Share Posted November 4, 2010 It doesnt ruin anything if I delete those files "tools/smarty/compile folder" ? Link to comment Share on other sites More sharing options...
need4speed Posted November 4, 2010 Author Share Posted November 4, 2010 I turned the debug tool on and it says:Fatal error: Maximum execution time of 300 seconds exceeded in C:\inetpub\vhosts\xxx.com\httpdocs\tools\smarty\internals\core.write_file.php on line 27 Link to comment Share on other sites More sharing options...
razaro Posted November 4, 2010 Share Posted November 4, 2010 No they will be recreated again when you refresh your website. Link to comment Share on other sites More sharing options...
razaro Posted November 4, 2010 Share Posted November 4, 2010 Check write permission for /tools/smarty/compile and other folders like in installation process PrestaShop folders have ‘write’ permissions (also known as “CHMOD 777” – explanation of file permissions here) but do not apply these permissions recursively (to their subfolders): /config, /upload, /download, /tools/smarty/compile. Then make sure the following folders have ‘write’ permissions and apply these permissions recursively (to their subfolders): /img, /mails, /modules, /themes/prestashop/lang, /translations Just permissions should be 755.Same error like in this topic. Link to comment Share on other sites More sharing options...
need4speed Posted November 4, 2010 Author Share Posted November 4, 2010 Do do you think you could fix it, if I pay you? Link to comment Share on other sites More sharing options...
need4speed Posted November 4, 2010 Author Share Posted November 4, 2010 Everything was okay when I installed the shop and it has been running for weeks undtil today. Prestashop did say during the installation that the files had the right permissions. Link to comment Share on other sites More sharing options...
need4speed Posted November 4, 2010 Author Share Posted November 4, 2010 After i delete crazy many of those files in the compile folder I got the webshop back online.But isnt that a big "bug" in prestashop if that happens over time? Link to comment Share on other sites More sharing options...
razaro Posted November 4, 2010 Share Posted November 4, 2010 Glad you solved the problem and I think maybe it is not connected to PrestaShop.Like in topic i mentioned, there were web-host problems.And if it is resolved please edit your first post and add [sOLVED]. Link to comment Share on other sites More sharing options...
rocky Posted November 5, 2010 Share Posted November 5, 2010 I'm using Google Analytics on my website and haven't had any problems, so I don't think it is a bug in the module. Link to comment Share on other sites More sharing options...
need4speed Posted November 5, 2010 Author Share Posted November 5, 2010 The problem was solved after i delete all of the files in the libary tools/smarty/compile except from index.phpThere was like more than 1000 files I had to delete. I was just wondering how do I this problem fix so it wont happen again ? is it a server setting I have to add or something like that? Link to comment Share on other sites More sharing options...
rocky Posted November 5, 2010 Share Posted November 5, 2010 It's normal to have lots of file there. Each of your TPL files is compiled into a PHP file in that directory. Your website can't work without them. Link to comment Share on other sites More sharing options...
need4speed Posted November 5, 2010 Author Share Posted November 5, 2010 Yeah I can understand that but its not good if it slowly kills the webshop. So maybe there is way to clear the directory once a week ? Because it runs smoothly afterwards. Link to comment Share on other sites More sharing options...
rocky Posted November 5, 2010 Share Posted November 5, 2010 I'm not sure why it is a problem on your website, but not mine. The number of products shouldn't have an impact on how many PHP files are generated. I thought it was just one file for product.tpl. Are you frequently editing your TPL files?I suppose you could create a cron job that deletes all the files except index.php in tools/smarty/compile. Create a file called cron.php in the root directory of your PrestaShop with the following: <?php include(dirname(__FILE__).'/../../config/config.inc.php'); if (isset($_GET['password']) AND $_GET['password'] == 'apassword') { $files = scandir(_PS_ROOT_DIR_.'/tools/smarty/compile'); foreach ($files as $file) if ($file != 'index.php') unlink(_PS_ROOT_DIR_.'/tools/smarty/compile/'.$file); } ?> Change 'apassword' to a password only you know so that only you can run the cron job, then create a cron job in your cPanel with a URL like http://www.yoursite.com/cron.php?password=apassword and set how often you want it to run. You can enter the URL directly into your browser to test the code first. Link to comment Share on other sites More sharing options...
need4speed Posted November 5, 2010 Author Share Posted November 5, 2010 I have changed the TPL files for like 1.5 months ago so I whould say im changing them alot. But during the developement of the webshop I have been adding like 1000 products and at the same time been changing the tpl files. But it sounds like a good idea with the cron job if that can keep the webshop running smoothly Great tip! Link to comment Share on other sites More sharing options...
need4speed Posted November 16, 2010 Author Share Posted November 16, 2010 Now it happen again.Can it really be possible that the folder tools/smarty/compile has 65.000 files. (166mb)It sounds pretty crazy to me! Link to comment Share on other sites More sharing options...
need4speed Posted November 16, 2010 Author Share Posted November 16, 2010 I have added the cron.php file and it works But is there an option in the backend where I can add the url and tell it how often it should activate the URL?http://www.xxxx.com/cron.php?password=passs Link to comment Share on other sites More sharing options...
KasperFP Posted December 17, 2010 Share Posted December 17, 2010 The problem is solved (n4s, do you mind putting [sOLVED] in the topic name of your first post?).It seems that new(er) versions of PrestaShop comes with the smarty settting: $smarty->force_compile = true // to pass "false" when put into production set to TRUE as default, which somehow - in our case - made Smarty generate thousands of tmp files.Now, it might have something to do with the OPC module we've installed, since I guess most people would have known about this "bug" by now if it was a general issue.Anyway, setting it to FALSE worked and Smarty no longer generates .tmp files and leaves them on the server. On behalf on myself and N4S, thank you for helping us finding the error, which turned out to have nothing to do with Google Analytics. ;-) Link to comment Share on other sites More sharing options...
Recommended Posts