bugsylille Posted May 20, 2010 Share Posted May 20, 2010 bonjour à tousj'ai un problème sur mon site: ovh me remonte une trop grosse consommation de CPU, et coupe mon site.La page mise en cause est la page category.phpvoici le contenu de celle-ci (je pense pourtant utiliser la page initiale...)<?phpinclude(dirname(__FILE__).'/config/config.inc.php');include(dirname(__FILE__).'/init.php');//will be initialized bellow...if(intval(Configuration::get('PS_REWRITING_SETTINGS')) === 1) $rewrited_url = null;/* CSS ans JS files calls */$css_files = array(__PS_BASE_URI__.'css/jquery.cluetip.css' => 'all', _THEME_CSS_DIR_.'scenes.css' => 'all');include(dirname(__FILE__).'/header.php');include(dirname(__FILE__).'/product-sort.php');$errors = array();if (!isset($_GET['id_category']) OR !Validate::isUnsignedId($_GET['id_category'])) $errors[] = Tools::displayError('category ID is missing');else{ $category = new Category(intval(Tools::getValue('id_category')), intval($cookie->id_lang)); if (!Validate::isLoadedObject($category)) $errors[] = Tools::displayError('category does not exist'); elseif (!$category->checkAccess(intval($cookie->id_customer))) $errors[] = Tools::displayError('you do not have access to this category'); else { /* rewrited url set */ $rewrited_url = $link->getCategoryLink($category->id, $category->link_rewrite); /* Scenes (could be externalised to another controler if you need them $smarty->assign('scenes', Scene::getScenes(intval($category->id), intval($cookie->id_lang), true, false));*/ /* Scenes images formats if ($sceneImageTypes = ImageType::getImagesTypes('scenes')) { foreach ($sceneImageTypes AS $sceneImageType) { if ($sceneImageType['name'] == 'thumb_scene') $thumbSceneImageType = $sceneImageType; elseif ($sceneImageType['name'] == 'large_scene') $largeSceneImageType = $sceneImageType; } $smarty->assign('thumbSceneImageType', isset($thumbSceneImageType) ? $thumbSceneImageType : NULL); $smarty->assign('largeSceneImageType', isset($largeSceneImageType) ? $largeSceneImageType : NULL); }*/ $category->name = Category::hideCategoryPosition($category->name); $category->description = nl2br2($category->description); $subCategories = $category->getSubCategories(intval($cookie->id_lang)); $smarty->assign('category', $category); if (Db::getInstance()->numRows()) $smarty->assign('subcategories', $subCategories); if ($category->id != 1) { $nbProducts = $category->getProducts(NULL, NULL, NULL, $orderBy, $orderWay, true); include(dirname(__FILE__).'/pagination.php'); $smarty->assign('nb_products', $nbProducts); $cat_products = $category->getProducts(intval($cookie->id_lang), intval($p), intval($n), $orderBy, $orderWay); } $smarty->assign(array( 'products' => (isset($cat_products) AND $cat_products) ? $cat_products : NULL, 'id_category' => intval($category->id), 'id_category_parent' => intval($category->id_parent), 'return_category_name' => Tools::safeOutput(Category::hideCategoryPosition($category->name)), 'path' => Tools::getPath(intval($category->id), $category->name) )); }}$smarty->assign(array( 'allow_oosp' => intval(Configuration::get('PS_ORDER_OUT_OF_STOCK')), 'suppliers' => Supplier::getSuppliers(), 'errors' => $errors));if (isset($subCategories)) $smarty->assign(array( 'subcategories_nb_total' => sizeof($subCategories), 'subcategories_nb_half' => ceil(sizeof($subCategories) / 2)));$smarty->display(_PS_THEME_DIR_.'category.tpl');include(dirname(__FILE__).'/footer.php');?>Je vous la fournis en pièce jointe également.J'utilise le template black & white dont j'ai modifié la css.www.oilily-sac.comSi quelqu'un peut me filer un coup de main, ce serait franchement sympa ;-)merci d'avancetom category.php Link to comment Share on other sites More sharing options...
jeckyl Posted May 20, 2010 Share Posted May 20, 2010 Salut,et si tu utilises le template d'origine as tu le même problème ? Link to comment Share on other sites More sharing options...
bugsylille Posted May 21, 2010 Author Share Posted May 21, 2010 oui, j'ai eu les mêmes alertes.*** edit ***je n'ai plus ces alertes avec le template de base de la version 1.3j'avais du modifier un fichier d'origine..Le problème viendrait donc du template black & white ? Link to comment Share on other sites More sharing options...
BVince Posted May 22, 2010 Share Posted May 22, 2010 Bonjour,Il y a 2 possibilités pour les dépassements de pile :1 - Script javascript2 - Boucle infinie dans le phpSi ça peut aider... Link to comment Share on other sites More sharing options...
bugsylille Posted May 22, 2010 Author Share Posted May 22, 2010 mercimalheureusemet, je ne sais pas identifier ceci tout seul... :-( 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