Search the Community
Showing results for tags 'max execution time'.
-
Hello everyone ! I'm very disapointed with some prestashop issues I encounter for those tasks : - Combination generation - Image regeneration - Module traduction The fact is that on small servers offer(OVH or Gandi) the php.ini file limits the php max_execution_time to 120s. So when we have many products the script takes to long and gives a 503 errror... I know that module exits to avoid those issues but I think this issues are more like to be improved in the prestashop core. I actually managed to do it with cron task for image regeneration in this post (thanks to Juanmaria) : http://www.prestashop.com/forums/topic/239917-php-code-to-regenerate-thumbnails-by-image-id/ Here's the how to : 1. Create this file -> /override/controllers/admin/AdminImagesController.php : class AdminImagesController extends AdminImagesControllerCore { public function regenerateThumbnails($type = 'all', $deleteOldImages = false) { return parent::_regenerateThumbnails($type, $deleteOldImages); } } 2. Create this file -> /myadminfolder/thumbnailscron.php : if ($argc != 3) die('Usage: php thumbnailscron_cli.php my_admin_directory my_token'); $myDir=$argv[1]; $myToken=$argv[2]; if (!chdir($myDir)) die($myDir . ' is not a valid directory!'); define('_PS_ADMIN_DIR_', getcwd()); include(dirname(__FILE__).'/../config/config.inc.php'); Context::getContext()->shop->setContext(Shop::CONTEXT_ALL); if (substr(_COOKIE_KEY_, 34, 8) != $myToken) die ("bad token"); ini_set('max_execution_time', 7200); $ic = new AdminImagesController; $ic->regenerateThumbnails(); The token is the same as the one in the searchcron -> go to your BO -> preferences -> search In french préférences -> recherche 3. Launch the php script with cron like this : php thumbnailscron.php my_admin_directory my_token Now if somebody knows or aimed to improve combination generation without paying for a module, it would be great to have your experience shared ! We have the same problem for module traductions either !! There are actually 2 module to avoid it : - for the module traduction -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5615-traduction-simplifiee-de-prestashop.html - for the combination -> http://addons.prestashop.com/fr/outils-administration-modules-prestashop/5052-generateur-combinaisons-declinaisons-illimites-plus-3.html The aim of this topic is to improve that part of prestashop once at all ^^ I will post my research for those two points. Thanks in advance for your contribution !!! Best regards
-
- 1
-
-
- max execution time
- server limits
- (and 4 more)
-
Bonjour à tous, Voilà, j'ai décidé de mettre mon site sur un serveur dédié, j'ai pris un kimsufi chez Ovh pour un mois, pour faire l'essai. Afin de rester en sécurité, et de pouvoir importer des produits sans être bloqué (comme c'est le cas sur un serveur mutualisé), je sais qu'il faut paramétrer le php.ini, notamment au niveau des 3 lignes suivantes: max_execution_time = 30 max_input_time = 120 memory_limit = 128M Quelles seraient les bonnes valeur svp ? En mettant 0 / 120 / 256 ça fonctionne, mais est-ce en sécurité ? (Si je laisse à 30 / 120 / 128, alors je ne peux pas importer de nouveaux produits, et surtout le backoffice ne s'affiche pas en entier) Merci à tous pour ces indications qui me semblent précieuses.
- 18 replies
-
- memory limit
- max inout imt
-
(and 1 more)
Tagged with: