Jump to content

Page blanche [résolu]


Recommended Posts

Voilà, mon site n'est tout simplement plus en ligne, c'est la page blanche ! Même pas un message d'erreur. Je l'ai mis en maintenance pour voir si le message de maintenance s'affichait, rien non plus...

est-ce que ça vient de l'hébergeur ?

 

J'ai eu 3 visites il y a 2 heures d'un utilisateur aux USA, et depuis plus rien....

 

 

mon site www.vieux-bouquins.com

 

par contre j'ai accès au BO.

 

Quelqu'un a déjà vu ça ??

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

Bonjour

 

Selon la v ersion de votre prestashop 1.4.x ou 1.5x et +

 

La ligne sur une 1.4 dans config/config.inc.php
@ini_set('display_errors', 'off'); << mettez off à on >> @ini_set('display_errors', 'on');

La ligne sur une 1.5 / 1.6 dans config/defines.inc.php
define('_PS_MODE_DEV_', false); << mettez false à true >> define('_PS_MODE_DEV_', true);

 

Si c'est un problème d'interprétation, un message d'erreur s'affiche. Copiez Collez ici au moins la 1erer ligne.

 

Vous pouvez aussi faire :

sur la 1.4.x /tools/smarty/cache & /tools/smarty/compile
Supprimer tous les fichiers sauf le index.php s'il y est.

sur la 1.5.x 1.6.x  /cache/smarty/cache & /cache/smarty/compile
Supprimer tous les fichiers et dossiers sauf le index.php s'il y est.
 

 

 

 

Link to comment
Share on other sites

Entre-temps j'en avais parlé à mon Hébergeur, voilà sa réponse :

 

"En faisant des recherches plus approfondies j'ai trouvé d'où venait le problème. Comme vous pourrez voir dans l'image capture1 nous avons rendu actif le mode debbuging de prestashop ce qui nous a permis de remarquer que le problème vient de la ligne 112 de cart.php.

Dans la deuxième image vous verrez que la modification a été faite aujourd'hui. Est-ce que vous ou votre webmestre aurait fait des modifications dans ce document ? Sinon je conseillerai d'aller voir avec la communauté de prestashop pour vous aider à corriger la ligne de code défectueuse.
"

 

Je précise que je n'ai fait aucune modification aujourd'hui, tout ce que j'ai fait c'est ajouter le module "Google merchant center" à mes modules.

 

OK pour le mode débug que l'hébergeur a activé pour trouver.

Je met en PJ les 2 copies d'écran qu'il à bien voulu me faire pour expliquer.

 

Il y a un problème dans "cart.php"

 

post-136212-0-98460300-1407353552_thumb.jpg

post-136212-0-71111000-1407353564_thumb.jpg

 

Comment réparer cela ?

 

J'ai la version 1.6.0.8

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

J'ai vérifié dans mon CPANEL selon le message d'erreur que j'ai :

Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/kalikouf/public_html/vieux-bouquins.com/override/classes/Cart.php on line 112

 

voici ma ligne 112, qu'y a-t-il de faux la dedans ?? (voir image ci-dessous)

 

post-136212-0-55256900-1407427122_thumb.jpg

 

 

Je vois aussi que ce fichier PHP a été modifié hier, et ce que j'ai fait hier c'est installer un nouveau module "Export Google merchant center" de Mediacom87,

est-ce que ça a un rapport ?

 

post-136212-0-53596300-1407429924.txt

 

 

Merci de m'aider parce que là mes compétences s'arrêtent...

 

PS : J'ai vidé la cache mais sans effet....

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

Salut,

 

C'est certainement que "Export Google merchant center" override ce fichier Cart.php (Pourquoi ? je ne sais pas, je ne connais pas ce module)

 

Sur ton FTP, renomme le fichier autrement, du genre CartOLD.php et regarde si tu as toujours ta page blanche.

Link to comment
Share on other sites

dans ta signature tu mets que tu as la version 1.6.0.8 et il y a justement u bug qui quelque fois (pas toujours) installe et désinstalle les override n'importe comment et ça explique ton problème.

Regarde le fichier override/classes/Cart.php compare le au fichier override/classes/Cart.php qui est dans le module "Export Google merchant center"

Link to comment
Share on other sites

dans ta signature tu mets que tu as la version 1.6.0.8 et il y a justement u bug qui quelque fois (pas toujours) installe et désinstalle les override n'importe comment et ça explique ton problème.

Regarde le fichier override/classes/Cart.php compare le au fichier override/classes/Cart.php qui est dans le module "Export Google merchant center"

 

 

Merci pour la réponse. Ahhh un bug dans Prestashop, c'est bien ma veine .....quelle m....  je commençais mon référencement et voilà 2 jours de panne déjà !!

 

 

Je n'ai pas de fichier "overrride.cart.php" dans le module "Export Google merchant center".

 

voici mon erreur :

 

Parse error: syntax error, unexpected 'public' (T_PUBLIC) in /home/kalikouf/public_html/vieux-bouquins.com/override/classes/Cart.php on line 112

 

et voici ma ligne 112 :       public static function __set_state($attributes)

 

 

Si je comprends bien une "parse error" est une erreur d'écriture, mais on me dit aussi que l'erreur peut se trouver une ligne au-dessous ou une ligne en-dessous alors voici ce qui entoure cette erreur:

 

                return parent::isCarrierInRange($id_carrier, $id_zone);

 

            return false;

{

     public static function__set_state($attributes)

    {

        $cart = new Cart();

 

 

j'ai recopié ce script sur http://writecodeonline.com/php/ pour chercher l'erreur, il s'arrête sur cette même ligne (en rouge ci-dessus).

 

Il y a une erreur mais où ?? Où puis-je trouver le bon script ??

 

 

 

:(

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

Bonjour,

 

avez vous comparé le fichier présent sur votre hébergement à celui livré avec Prestashop ?

 

avez vous regardé si un override de ce fichier existait ?

 

Avez vous d'autres prestataires qui peuvent intervenir sur votre site ?

 

Avez vous changé les mots de passes depuis ce soucis ?

 

Avez vous un anti virus performant sur votre ordinateur ,

 

...

 

On peut en faire une liste longue comme le bras de tout ce qu'il faut contrôler, vérifier, comparer afin de trouver la réponse à votre problème.

 

Si vous désirez un rétablissement rapide je conseillerais de passer par un professionnel.

Link to comment
Share on other sites

Merci pour tous vos conseils maisavant de faire quelque chose j'aimerai savoir que c'est effectivement le truc à faire, autrement je risque de tout foirer encore plus. Si quelqu'un peut me donner le bon script ça aiderait bien....

 

voici le code complet de mon fichier :

 

<?php
/**
 * Shopgate GmbH
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file AFL_license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * @author    Shopgate GmbH, Schloßstraße 10, 35510 Butzbach <[email protected]>
 * @copyright Shopgate GmbH
 * @license   http://opensource.org/licenses/AFL-3.0 Academic Free License ("AFL"), in the version 3.0
*/

if (version_compare(_PS_VERSION_, '1.4.0.2', '>=') && version_compare(_PS_VERSION_, '1.4.1.0', '<=') && !class_exists('CartCore'))
{
    /**
     * load CartCore for extending it for overwritting methods in 1.4.0.2 to 1.4.1.0
     * in newer versions this is load automatically
     */
    include_once(dirname(__FILE__).'/../../../../classes/Cart.php');
}

if (version_compare(_PS_VERSION_, '1.4.0.2', '>='))
{
    /** CartCore only exists in version 1.4.0.2 and above */
    class Cart extends CartCore
    {

        public function getDeliveryOptionList(Country $default_country = null, $flush = false)
        {
            $r = parent::getDeliveryOptionList($default_country, $flush);

            if ($this->id_carrier == Configuration::get('SHOPGATE_CARRIER_ID'))
            {
                require_once(_PS_MODULE_DIR_.'shopgate/classes/PSShopgateOrder.php');

                $shopgateOrder = PSShopgateOrder::instanceByCartId($this->id);

                $r[$this->id_address_delivery][$this->id_carrier.',']['carrier_list'][$this->id_carrier] = array
                (
                    'price_with_tax' => $shopgateOrder->shipping_cost,
                    'price_without_tax' => 0,
                    'package_list' => array(0),
                    'product_list' => array(),
                    'instance' => new Carrier($this->id_carrier),
                );

                $r[$this->id_address_delivery][$this->id_carrier.',']['is_best_price'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['is_best_grade'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['unique_carrier'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['total_price_with_tax'] = $shopgateOrder->shipping_cost;
                $r[$this->id_address_delivery][$this->id_carrier.',']['total_price_without_tax'] = 0;
                $r[$this->id_address_delivery][$this->id_carrier.',']['position'] = 0;
            }
            return $r;
        }

        public function isCarrierInRange($id_carrier, $id_zone)
        {
            if (version_compare(_PS_VERSION_, '1.4.2.5', '==') || version_compare(_PS_VERSION_, '1.4.3.0', '=='))
            {
                /** fix a bug in Prestashop */
                $carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
                $shippingMethod = $carrier->getShippingMethod();

                ###### that is the bug BOF ######
                if (!$carrier->range_behavior)
                    return true;

                ###### that is the bug EOF ######

                if ($shippingMethod == Carrier::SHIPPING_METHOD_FREE)
                    return true;

                if ($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone)))
                    return true;

                if ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, (int)$this->id_currency)))
                    return true;

            }
            elseif (version_compare(_PS_VERSION_, '1.4.1.0', '=='))
            {
                // fix a bug in prestashop
                $carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
                $is_in_zone = false;
                $order_total = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);

                ###### that is the bug BOF ######
                if (!$carrier->range_behavior)
                    return true;

                ###### that is the bug EOF ######

                if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone))) || ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $order_total, $id_zone, (int)($this->id_currency)))))
                    $is_in_zone = true;

                unset($carrier);
                return $is_in_zone;
            }
            else
                return parent::isCarrierInRange($id_carrier, $id_zone);

            return false;
{
     public static function__set_state($attributes)
    {
        $cart = new Cart();

        foreach ($attributes as $name => $attribute)
            $cart->{$name} = $attribute;

        return $cart;
    }
        }
    }
}
?>

Link to comment
Share on other sites

essaye avec ça :
 

<?php
/**
 * Shopgate GmbH
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file AFL_license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * @author    Shopgate GmbH, Schloßstraße 10, 35510 Butzbach <[email protected]>
 * @copyright Shopgate GmbH
 * @license   http://opensource.org/licenses/AFL-3.0 Academic Free License ("AFL"), in the version 3.0
*/

class Cart extends CartCore
{
	public function getDeliveryOptionList(Country $default_country = null, $flush = false)
	{
		$r = parent::getDeliveryOptionList($default_country, $flush);

		if ($this->id_carrier == Configuration::get('SHOPGATE_CARRIER_ID'))
		{
			require_once(_PS_MODULE_DIR_.'shopgate/classes/PSShopgateOrder.php');

			$shopgateOrder = PSShopgateOrder::instanceByCartId($this->id);

			$r[$this->id_address_delivery][$this->id_carrier.',']['carrier_list'][$this->id_carrier] = array
			(
				'price_with_tax' => $shopgateOrder->shipping_cost,
				'price_without_tax' => 0,
				'package_list' => array(0),
				'product_list' => array(),
				'instance' => new Carrier($this->id_carrier),
			);

			$r[$this->id_address_delivery][$this->id_carrier.',']['is_best_price'] = 1;
			$r[$this->id_address_delivery][$this->id_carrier.',']['is_best_grade'] = 1;
			$r[$this->id_address_delivery][$this->id_carrier.',']['unique_carrier'] = 1;
			$r[$this->id_address_delivery][$this->id_carrier.',']['total_price_with_tax'] = $shopgateOrder->shipping_cost;
			$r[$this->id_address_delivery][$this->id_carrier.',']['total_price_without_tax'] = 0;
			$r[$this->id_address_delivery][$this->id_carrier.',']['position'] = 0;
		}
		return $r;
	}

	public function isCarrierInRange($id_carrier, $id_zone)
	{
		if (version_compare(_PS_VERSION_, '1.4.2.5', '==') || version_compare(_PS_VERSION_, '1.4.3.0', '=='))
		{
			/** fix a bug in Prestashop */
			$carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
			$shippingMethod = $carrier->getShippingMethod();

			###### that is the bug BOF ######
			if (!$carrier->range_behavior)
				return true;

			###### that is the bug EOF ######

			if ($shippingMethod == Carrier::SHIPPING_METHOD_FREE)
				return true;

			if ($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone)))
				return true;

			if ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, (int)$this->id_currency)))
				return true;

		}
		elseif (version_compare(_PS_VERSION_, '1.4.1.0', '=='))
		{
			// fix a bug in prestashop
			$carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
			$is_in_zone = false;
			$order_total = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);

			###### that is the bug BOF ######
			if (!$carrier->range_behavior)
				return true;

			###### that is the bug EOF ######

			if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone))) || ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $order_total, $id_zone, (int)($this->id_currency)))))
				$is_in_zone = true;

			unset($carrier);
			return $is_in_zone;
		}
		else
			return parent::isCarrierInRange($id_carrier, $id_zone);
		return false;
	}
	
	public static function set_state($attributes)
    {
        $cart = new Cart();
        foreach ($attributes as $name => $attribute)
            $cart->{$name} = $attribute;
        return $cart;
    }
}
Edited by coeos.pro (see edit history)
Link to comment
Share on other sites

la fin du fichier est pas bonne :/

<?php
/**
 * Shopgate GmbH
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file AFL_license.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * @author    Shopgate GmbH, Schloßstraße 10, 35510 Butzbach <[email protected]>
 * @copyright Shopgate GmbH
 * @license   http://opensource.org/licenses/AFL-3.0 Academic Free License ("AFL"), in the version 3.0
*/

if (version_compare(_PS_VERSION_, '1.4.0.2', '>=') && version_compare(_PS_VERSION_, '1.4.1.0', '<=') && !class_exists('CartCore'))
{
    /**
     * load CartCore for extending it for overwritting methods in 1.4.0.2 to 1.4.1.0
     * in newer versions this is load automatically
     */
    include_once(dirname(__FILE__).'/../../../../classes/Cart.php');
}

if (version_compare(_PS_VERSION_, '1.4.0.2', '>='))
{
    /** CartCore only exists in version 1.4.0.2 and above */
    class Cart extends CartCore
    {

        public function getDeliveryOptionList(Country $default_country = null, $flush = false)
        {
            $r = parent::getDeliveryOptionList($default_country, $flush);

            if ($this->id_carrier == Configuration::get('SHOPGATE_CARRIER_ID'))
            {
                require_once(_PS_MODULE_DIR_.'shopgate/classes/PSShopgateOrder.php');

                $shopgateOrder = PSShopgateOrder::instanceByCartId($this->id);

                $r[$this->id_address_delivery][$this->id_carrier.',']['carrier_list'][$this->id_carrier] = array
                (
                    'price_with_tax' => $shopgateOrder->shipping_cost,
                    'price_without_tax' => 0,
                    'package_list' => array(0),
                    'product_list' => array(),
                    'instance' => new Carrier($this->id_carrier),
                );

                $r[$this->id_address_delivery][$this->id_carrier.',']['is_best_price'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['is_best_grade'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['unique_carrier'] = 1;
                $r[$this->id_address_delivery][$this->id_carrier.',']['total_price_with_tax'] = $shopgateOrder->shipping_cost;
                $r[$this->id_address_delivery][$this->id_carrier.',']['total_price_without_tax'] = 0;
                $r[$this->id_address_delivery][$this->id_carrier.',']['position'] = 0;
            }
            return $r;
        }

        public function isCarrierInRange($id_carrier, $id_zone)
        {
            if (version_compare(_PS_VERSION_, '1.4.2.5', '==') || version_compare(_PS_VERSION_, '1.4.3.0', '=='))
            {
                /** fix a bug in Prestashop */
                $carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
                $shippingMethod = $carrier->getShippingMethod();

                ###### that is the bug BOF ######
                if (!$carrier->range_behavior)
                    return true;

                ###### that is the bug EOF ######

                if ($shippingMethod == Carrier::SHIPPING_METHOD_FREE)
                    return true;

                if ($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone)))
                    return true;

                if ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, (int)$this->id_currency)))
                    return true;

            }
            elseif (version_compare(_PS_VERSION_, '1.4.1.0', '=='))
            {
                // fix a bug in prestashop
                $carrier = new Carrier((int)$id_carrier, Configuration::get('PS_LANG_DEFAULT'));
                $is_in_zone = false;
                $order_total = $this->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING);

                ###### that is the bug BOF ######
                if (!$carrier->range_behavior)
                    return true;

                ###### that is the bug EOF ######

                if (($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_WEIGHT && (Carrier::checkDeliveryPriceByWeight((int)$id_carrier, $this->getTotalWeight(), $id_zone))) || ($carrier->getShippingMethod() == Carrier::SHIPPING_METHOD_PRICE && (Carrier::checkDeliveryPriceByPrice((int)$id_carrier, $order_total, $id_zone, (int)($this->id_currency)))))
                    $is_in_zone = true;

                unset($carrier);
                return $is_in_zone;
            }
            else
                return parent::isCarrierInRange($id_carrier, $id_zone);

            return false;
//ACCOLADE A L'ENVERS
//{
}
//MANQUE EN ESPACE ENTRE FUNCTION ET __SET_STATE
//     public static function__set_state($attributes)
	   public static function __set_state($attributes)

    {
        $cart = new Cart();

        foreach ($attributes as $name => $attribute)
            $cart->{$name} = $attribute;

        return $cart;
    }
//ACCOLADE EN TROP	
//        }
    }
}
?>
Edited by anteverce (see edit history)
Link to comment
Share on other sites

MERCI à vous tous !!  :P

 

 

Ça marche.....  !!!!

 

il y avait pas mal d'erreurs, et ça vient -parait-il- d'un bug qui a surgi suite à l'installation d'un nouveau module

 

ben dis.....

 

Je vais mettre ce sujet en 'résolu'.

 

 

MERCI encore .....

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Bonjour, je poursuis le sujet car j'ai le même problème mais la solution me donne de nouvelles erreurs.

Le problème vient de SHOPGATE.

Sans le vouloir, en cliquant sur une Pub shopgate :wacko: dans mon tableau de bord, le module c'est installé et depuis c'est le drame :(, page blanche....J'ai supprimé le module sur mon ftp et j'ai donc de nouvelles erreurs).

 

J'ai réctifié mon fichier "cart.php'' mais j'ai maintenant les erreurs suivantes :

Warning: require_once(/home/"site"/www/modules/shopgate/classes/PSShopgateOrder.php): failed to open stream: No such file or directory in /home/"site"/www/override/classes/Cart.php on line 41

Fatal error: require_once(): Failed opening required '/home/"site"/www/modules/shopgate/classes/PSShopgateOrder.php' (include_path='/home/"site"/www/tools/htmlpurifier/standalone:.:/usr/local/php5.4/lib/php') in /home/"site"/www/override/classes/Cart.php on line 41

 

Merci d'avance pour votre aide

Edited by gregos_presta (see edit history)
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...