Jump to content

Probleme Sur Mon Site


MrMod62

Recommended Posts

Bonsoir,

 

j'ai voulu faire un tour sur mon site et j'ai vu une erreur en haut de ma page d'acceuil et d'admin

 

Voici l'erreur :

 

 

/** @var _isActive Flag to know if the module is active or note */ public static $_isActive = -1; /** @var _isActive Flag to know if the module is active or note */ public static $_isActive = -1; public function addCSS($css_uri, $css_media_type = 'all') { if (self::_isActive()) { if (!is_array($css_uri)) $css_uri = array($css_uri); $new_uri = array(); foreach ($css_uri as $uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri) && preg_match('#.css$#', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; // Pass as reference, do not move $proto $new_uri[] = $proto.$uri; } else $new_uri[] = $uri; return parent::addCSS($new_uri, $css_media_type); } return parent::addCSS($css_uri, $css_media_type); } public function addJS($js_uri) { if (self::_isActive()) { if (!is_array($js_uri)) $js_uri = array($js_uri); foreach ($js_uri as &$uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; $uri = $proto.$uri; } } return parent::addJS($js_uri); } private static function _isActive() { if (self::$_isActive == -1) { // This override is part of the cloudcache module, so the cloudcache.php file exists require_once(dirname(__FILE__).'/../../../modules/cloudcache/cloudcache.php'); $module = new CloudCache(); self::$_isActive = $module->active; } return self::$_isActive && Configuration::get('CLOUDCACHE_API_ACTIVE'); } // Override for 1.5 public function init() { if (parent::$initialized) return; $ret = parent::init(); if (!self::_isActive()) return $ret; $assign_array = array( 'img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_store_dir' => _THEME_STORE_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'pic_dir' => _THEME_PROD_PIC_DIR_ ); /* // Add the images directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; */ /* // Add the CSS directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_; */ $httHost = Tools::getHttpHost(); $protocol_content = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? 'https://' : 'http://'; foreach ($assign_array as $assignKey => $assignValue) if (substr($assignValue, 0, 1) == '/' || $protocol_content == 'https://') $this->context->smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue); else $this->context->smarty->assign($assignKey, $assignValue); return $ret; } public function addCSS($css_uri, $css_media_type = 'all') { if (self::_isActive()) { if (!is_array($css_uri)) $css_uri = array($css_uri); $new_uri = array(); foreach ($css_uri as $uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri) && preg_match('#.css$#', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; // Pass as reference, do not move $proto $new_uri[] = $proto.$uri; } else $new_uri[] = $uri; return parent::addCSS($new_uri, $css_media_type); } return parent::addCSS($css_uri, $css_media_type); } public function addJS($js_uri) { if (self::_isActive()) { if (!is_array($js_uri)) $js_uri = array($js_uri); foreach ($js_uri as &$uri) if ($uri && !preg_match('/^http(s?):\/\//', $uri)) { $proto = 'http://'; $uri = Tools::getMediaServer($uri, $proto).$uri; $uri = $proto.$uri; } } return parent::addJS($js_uri); } private static function _isActive() { if (self::$_isActive == -1) { // This override is part of the cloudcache module, so the cloudcache.php file exists require_once(dirname(__FILE__).'/../../../modules/cloudcache/cloudcache.php'); $module = new CloudCache(); self::$_isActive = $module->active; } return self::$_isActive && Configuration::get('CLOUDCACHE_API_ACTIVE'); } // Override for 1.5 public function init() { if (parent::$initialized) return; $ret = parent::init(); if (!self::_isActive()) return $ret; $assign_array = array( 'img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_store_dir' => _THEME_STORE_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'pic_dir' => _THEME_PROD_PIC_DIR_ ); /* // Add the images directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['img_mobile_dir'] = _THEME_MOBILE_IMG_DIR_; */ /* // Add the CSS directory for mobile */ /* if ($this->context->getMobileDevice() != false) */ /* $assign_array['css_mobile_dir'] = _THEME_MOBILE_CSS_DIR_; */ $httHost = Tools::getHttpHost(); $protocol_content = ((isset($this->ssl) && $this->ssl && Configuration::get('PS_SSL_ENABLED')) || Tools::usingSecureMode()) ? 'https://' : 'http://'; foreach ($assign_array as $assignKey => $assignValue) if (substr($assignValue, 0, 1) == '/' || $protocol_content == 'https://') $this->context->smarty->assign($assignKey, $protocol_content.Tools::getMediaServer($assignValue).$assignValue); else $this->context->smarty->assign($assignKey, $assignValue); return $ret; }

 

Je suis sous prestashop 1.5, je ne vois pas du tout de ou se peut venir ?

 

http://custom-controllers.fr/index.php

 

Merci d'avance,

Cordialement,

MrMod62.

Edited by MrMod62 (see edit history)
Link to comment
Share on other sites

Oui, un beau bordel ^^

 

je ne sais pas si il est activé ou pas.Je ne connais pas vraiment le panel du site et je touche seulement a se que je suis sur.

 

j'ai pas ajouté de produit depuis 2 jours.

 

Je espere que je vais pas devoir recommancé le site )=

Edited by MrMod62 (see edit history)
Link to comment
Share on other sites

Pour qu'une classe php s'affiche de la sorte (mode listing), il faut nécessairement qu'il ne soit pas reconnu comme tel.

Souvent c'est parce qu'il manque la balise <?php au début du fichier (et en principe ?> à la fin de ce même fichier bien que ce ne soit pas obligatoire).

Il serait aussi possible que l'extension .php ne soit pas parfaitement gérée comme script executable, mais ce serais le cas de tous les autres fichiers à priori.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...