Jump to content

hideo

Members
  • Posts

    13
  • Joined

  • Last visited

Profile Information

  • Location
    France
  • Activity
    Developer

hideo's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Hi Somit, If you are on a dedicated server, you can check your php.ini and change the value of max_execution_time, which should be in your case, set at 60. If not, you can add this in your index.php: ini_set('max_execution_time', 300); or in your .htaccess: php_value max_execution_time 30. Here's more informations about "max_execution_time": http://us2.php.net/manual/en/info.configuration.php#ini.max-execution-time Hideo
  2. Merci à vous pour votre feedback, ça fait plaisir que cela puisse servir à d'autres ! Hideo
  3. Bonjour, Merci beaucoup pour l'explication et la solution. Je n'ai pas encore creusé mais vu que j'ai aussi l'erreur avec le module de paiement ATOS, je suppose qu'il faut modifier le module... Cdt, Hideo
  4. Hi again, The problem is due to the memcached configuration: >> vi /etc/memcached.conf Comment the line "-l 127.0.0.1" and add "-l xx.xxx.xxx.xx", where "xx.xxx.xxx.xx" is the IP of your server. >> service memcached restart >> service apache2 restart (not sure this one is needed) I've seen this here: http://serverfault.com/questions/64007/failed-to-connect-to-memcache-host Hope this helps. Hideo
  5. Hi, I saw that when you add a server (the IP of your dedicated server), you have another error message: [error] [client xx.xxx.xxx.xxx] PHP Notice: MemcachePool::get(): Server xx.xxx.xxx.xxx (tcp 11211, udp 0) failed with: Connection refused (111) But this might be fixed by authorising connexion on 11211 port of your server. I try to fix it and I post if this works. Hideo
  6. Hi again, I've upgraded prestashop from 1.5.4 to 1.5.5 but that didn't change anything. But, because of cache problem related to cms categories, I had deactivated smarty cache. After activating this, the CPU load has decreased but it should be between 0% and 5%. Now, it is between 30% and 76%. Still very high but not full! I have an idea where this can come but not sure.. In "blockcategories.php", I've changed the hookleftcolumn function and created several objects to load cms categories. Well, I continue investigating but that's really weird.. Hideo
  7. Hi, I have seen this just after enabling cache "memcache" today. I have troubles with CPU usage in 1.5.4.1, same after upgrading to 1.5.5. So I'm trying everything to solve this. Enabling memcache was one of my action I keep you posted if I find something. Hideo
  8. Hi, Kevin78 What do you mean by "deactivate this option"? Which option is it? I have the same problem and I don't know how to fix it... First of all, I thought that this was related to "zend_mm_heap corrputed" I found on apache error.log, but it seems to be something else... I already posted something here: - http://www.prestashop.com/forums/topic/275337-segmentation-fault-and-zend-mm-heap-corrupted-errors/?do=findComment&comment=1400933 If you have any suggestion, I would appreciate! Many thanks, Hideo
  9. Hi again, To complete my post, I saw that the CPU is at 100, even if there aren't many simultaneous visits. To make sure that it's only that website on prestashop 1.5.4.1 which causes troubles, I've deactivated only this website and check monitors, it has decreased between 0% and 1%. Enabling the prestashop website again, the CPU immediately increased to 100%! I've seen on this topic (http://www.prestashop.com/forums/topic/244621-154-slowness-a-possible-solution/) that it seems to be related to this version. What do you think about this? Reading the changelog between the 1.5.4.1 and 1.5.5.0 version (http://www.prestashop.com/en/developers-versions/changelog/1.5.5.0), they didn't mentionned anything about the CPU... I think I will try this update and keep you posted if this works better! Of course, if you have any suggestion, I would love to hear them Many thanks, Hideo
  10. Sure! http://www.laroutedescomptoirs.com I'm on a dedicated hosting, Debian 7 Stable. I've installed: - apache2 - php5 - mysql-server - fail2ban - module memcache(d?) Many thanks for your reactivity! Hideo
  11. Hi, Thanks for your reply. I tried this first and then I tried to set this value to "On", which is equivalent to "no-limit". That did not change anything. I have this error too, which might be one of the cause: [error] server reached MaxClients setting, consider raising the MaxClients setting. Also, before the site becomes inaccessible, I noticed that the loading time increased gradually. Because of another issue on cms categories, I couldn't activate the cache. Can it be related to my problem? Thanks again for considering my post. Hideo
  12. Hi Spoonman, I would love to know what was wrong and which third-party module causes this... I have actually the same problem and the website goes down. I need to restart apache to solve this every time this happend Many thanks, for your answer! Hideo
  13. Bonjour, Tout d'abord, le code ci-dessous fonctionne sur la version 1.5.4.1 de Prestashop. Après une bonne demi-journée de recherche, j'ai finalement bidouillé la fonction "hookLeftColumn" du fichier "/modules/blockcategories/blockcategories.php" pour afficher la catégorie courante à partir du niveau 2. En prenant l'exemple de cette navigation : Accueil -- categorie 1 -- sous-categorie 1-1 -- sous-categorie 1-2 -- sous-categorie 1-2-A -- sous-categorie 1-2-B -- sous-categorie 1-2-C -- sous-categorie 1-3 -- sous-categorie 1-3-A -- sous-categorie 1-3-B -- sous-categorie 1-4 -- sous-categorie 1-5 -- categorie 2 -- categorie 3 -- sous-categorie 3-1 -- sous-categorie 3-2 -- sous-categorie 3-3 -- sous-categorie 3-3-A -- sous-categorie 3-3-B -- categorie 4 Scénario 1 : On est sur "categorie 1", on affiche : -- categorie 1 (selected) -- sous-categorie 1-1 -- sous-categorie 1-2 -- sous-categorie 1-3 -- sous-categorie 1-4 -- sous-categorie 1-5 Scénario 2 : On est sur "categorie 3", on affiche : -- categorie 3 (selected) -- sous-categorie 3-1 -- sous-categorie 3-2 -- sous-categorie 3-3 Scénario 3 : On est sur "categorie 1-3", on affiche : -- categorie 1 -- sous-categorie 1-1 -- sous-categorie 1-2 -- sous-categorie 1-3 (selected) -- sous-categorie 1-3-A -- sous-categorie 1-3-B -- sous-categorie 1-4 -- sous-categorie 1-5 ... Et ainsi de suite en fonction de la profondeur... Voici la fonction : public function hookLeftColumn($params) { $id_customer = (int)$params['cookie']->id_customer; // Get all groups for this customer and concatenate them as a string: "1,2,3..." // It is necessary to keep the group query separate from the main select query because it is used for the cache $groups = $id_customer ? implode(', ', Customer::getGroupsStatic($id_customer)) : Configuration::get('PS_UNIDENTIFIED_GROUP'); $id_product = (int)Tools::getValue('id_product', 0); $id_category = (int)Tools::getValue('id_category', 0); $id_lang = (int)$params['cookie']->id_lang; $smartyCacheId = 'blockcategories|'.$this->context->shop->id.'_'.$groups.'_'.$id_lang.'_'.$id_product.'_'.$id_category; $this->context->smarty->cache_lifetime = 31536000; // 1 Year Tools::enableCache(); if (!$this->isCached('blockcategories.tpl', $smartyCacheId)) { $maxdepth = Configuration::get('BLOCK_CATEG_MAX_DEPTH'); if (!$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite FROM `'._DB_PREFIX_.'category` c INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = '.$id_lang.Shop::addSqlRestrictionOnLang('cl').') INNER JOIN `'._DB_PREFIX_.'category_shop` cs ON (cs.`id_category` = c.`id_category` AND cs.`id_shop` = '.(int)$this->context->shop->id.') WHERE (c.`active` = 1 OR c.`id_category` = '.(int)Configuration::get('PS_HOME_CATEGORY').') AND c.`id_category` != '.(int)Configuration::get('PS_ROOT_CATEGORY').' '.((int)$maxdepth != 0 ? ' AND `level_depth` <= '.(int)$maxdepth : '').' AND c.id_category IN (SELECT id_category FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` IN ('.pSQL($groups).')) ORDER BY `level_depth` ASC, '.(Configuration::get('BLOCK_CATEG_SORT') ? 'cl.`name`' : 'cs.`position`').' '.(Configuration::get('BLOCK_CATEG_SORT_WAY') ? 'DESC' : 'ASC'))) return Tools::restoreCacheSettings(); $resultParents = array(); $resultIds = array(); foreach ($result as &$row) { $resultParents[$row['id_parent']][] = &$row; $resultIds[$row['id_category']] = &$row; } $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH')); $isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false); if (Tools::isSubmit('id_category')) { $this->context->cookie->last_visited_category = $id_category; $this->smarty->assign('currentCategoryId', $this->context->cookie->last_visited_category); } if (Tools::isSubmit('id_product')) { if (!isset($this->context->cookie->last_visited_category) || !Product::idIsOnCategoryId($id_product, array('0' => array('id_category' => $this->context->cookie->last_visited_category))) || !Category::inShopStatic($this->context->cookie->last_visited_category, $this->context->shop)) { $product = new Product($id_product); if (isset($product) && Validate::isLoadedObject($product)) $this->context->cookie->last_visited_category = (int)$product->id_category_default; } $this->smarty->assign('currentCategoryId', (int)$this->context->cookie->last_visited_category); } $oCategory = new CategoryCore((int)$this->context->cookie->last_visited_category, $id_lang); $sCurrentCateogry = $oCategory->id; $parentId = $oCategory->id_parent; if ( $parentId != 2 ) // Je fais un test sur 2 car c'est l'ID de la Home chez moi { while ( $parentId != 2) { $oCategory = new CategoryCore($parentId,$id_lang); $sCatId = $oCategory->id; $parentId = $oCategory->id_parent; } $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'), $sCatId); } else $blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'), $sCurrentCateogry); unset($resultParents, $resultIds); $this->smarty->assign('blockCategTree', $blockCategTree); if (file_exists(_PS_THEME_DIR_.'modules/blockcategories/blockcategories.tpl')) $this->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl'); else $this->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl'); $this->smarty->assign('isDhtml', $isDhtml); } $display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId); Tools::restoreCacheSettings(); return $display; } --------- Et une micro modif au .tpl qui se trouve dans le même répertoire "/modules/blockcategories/blockcategories.tpl" : <!-- Block categories module --> <div id="categories_block_left" class="block"> <!-- <p class="title_block">{l s='Categories' mod='blockcategories'}</p> --> <h4>{$blockCategTree.name}</h4> <div class="block_content"> <ul class="tree {if $isDhtml}dhtml{/if}"> {foreach from=$blockCategTree.children item=child name=blockCategTree} {if $smarty.foreach.blockCategTree.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child} {/if} {/foreach} </ul> {* Javascript moved here to fix bug #PSCFI-151 *} <script type="text/javascript"> // <![CDATA[ // we hide the tree only if JavaScript is activated $('div#categories_block_left ul.dhtml').hide(); // ]]> </script> </div> </div> <!-- /Block categories module --> --------- En espérant que cela serve Hideo
×
×
  • Create New...