Jump to content

500 Server Error depuis cette nuit


Recommended Posts

Bonjour,

le sujet n'est pas nouveau mais il l'est pour moi depuis cette nuit 😞

"500 server Error"

Depuis cette nuit j'ai une erreur 500, les logs précisent :"500 2454" est ce que le 2454 signifie quelque chose pour quelqu'un ?
L'assistance d'Ovh me répond que ça fonctionne !!!
Le problème tombe au bon moment décembre pour un site marchand :-((((
Le display_error m'affiche ceci :"

[PrestaShopException]
Shop not found
at line 404 in file classes/shop/Shop.php
399. // No shop found ... too bad, let's redirect to default shop
400. $default_shop = new Shop(Configuration::get('PS_SHOP_DEFAULT'));
401. 
402. // Hmm there is something really bad in your Prestashop !
403. if (!Validate::isLoadedObject($default_shop)) {
404. throw new PrestaShopException('Shop not found');
405. }
406. 
407. $params = $_GET;
408. unset($params['id_shop']);
409. $url = $default_shop->domain;
• ShopCore::initialize - [line 114 - config/config.inc.php]
• require - [line 27 - index.php] - [1 Arguments]

Si vous avez un conseil merci d'avance.
Je précise que cette nuit je dormais et qu'il n'y a pas eu de modifications et que j'ai passé ma matinée en essayant tout ce que j'ai trouvé pour me dépanner, htaccess, tout le dossier config (config.inc.php, etc...), le PS_SHOP_DEFAULT à 1 sans succès

Link to comment
Share on other sites

Pouvez-vous effectuer cette requête dans phpmyadmin et nous donner le résultat ?

SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
FROM 'ps_shop_url su
LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
 WHERE (su.domain = "shop.cadreapart.com" OR su.domain_ssl = "shop.cadreapart.com")
AND s.active = 1
AND s.deleted = 0
ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC

Link to comment
Share on other sites

  1. Un guillemet ' était attendu. (near "" at position 352)
    Requête SQL :  Documentation
    
    SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main FROM 'ps_shop_url su LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop) WHERE (su.domain = "shop.cadreapart.com" OR su.domain_ssl = "shop.cadreapart.com") AND s.active = 1 AND s.deleted = 0 ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC LIMIT 0, 30
    
    MySQL a répondu : Documentation
    
    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''ps_shop_url su
    LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
    WHERE (su.dom' at line 2

     

Link to comment
Share on other sites

avec ça :

SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
FROM 'ps_shop_url' su
LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
 WHERE (su.domain = "shop.cadreapart.com" OR su.domain_ssl = "shop.cadreapart.com")
AND s.active = 1
AND s.deleted = 0
ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC

j'ai ça :

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''ps_shop_url' su
LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
WHERE (su.do' at line 2

Link to comment
Share on other sites

SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main
FROM ps_shop_url su
LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop)
 WHERE (su.domain = "shop.cadreapart.com" OR su.domain_ssl = "shop.cadreapart.com")
AND s.active = 1
AND s.deleted = 0
ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC

Link to comment
Share on other sites

Ok donc le problème vient bien d'OVH (un cache cdn ou un truc du genre) car cette requete est celle appellée par la classe Shop.php au début du fichier:

image.png.53d37b481781ef08ded0765c44d27d3b.png

Sur votre boutique elle retourne un vide.

Supprimez le fichier /cache/class_index.php sur votre ftp pour obliger Prestashop a tout recharger

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

Shop Object ( [id_shop_group] => [id_category] => [id_theme] => [name] => [active] => 1 [deleted] => [theme_name] => [theme_directory] => [physical_uri] => [virtual_uri] => [domain] => [domain_ssl] => [group:protected] => [webserviceParameters:protected] => Array ( [fields] => Array ( [id_shop_group] => Array ( [xlink_resource] => shop_groups ) [id_category] => Array ( ) [id_theme] => Array ( ) ) ) [id] => [id_lang:protected] => [id_shop:protected] => [id_shop_list] => [get_shop_from_context:protected] => 1 [table:protected] => shop [identifier:protected] => id_shop [fieldsRequired:protected] => Array ( [0] => name [1] => id_theme [2] => id_category [3] => id_shop_group ) [fieldsSize:protected] => Array ( [name] => 64 ) [fieldsValidate:protected] => Array ( [active] => isBool [deleted] => isBool [name] => isGenericName ) [fieldsRequiredLang:protected] => Array ( ) [fieldsSizeLang:protected] => Array ( ) [fieldsValidateLang:protected] => Array ( ) [tables:protected] => Array ( ) [image_dir:protected] => [image_format:protected] => jpg [def:protected] => Array ( [table] => shop [primary] => id_shop [fields] => Array ( [active] => Array ( [type] => 2 [validate] => isBool ) [deleted] => Array ( [type] => 2 [validate] => isBool ) [name] => Array ( [type] => 3 [validate] => isGenericName [required] => 1 => 64 ) [id_theme] => Array ( [type] => 1 [required] => 1 ) [id_category] => Array ( [type] => 1 [required] => 1 ) [id_shop_group] => Array ( [type] => 1 [required] => 1 ) ) [classname] => Shop ) [update_fields:protected] => [force_id] => )
END

Link to comment
Share on other sites

Bah ce n'est pas possible...

A la ligne 340 tu as bien 

if (preg_match('#^'.preg_quote($row['uri'], '#').'#i', $request_uri)) {

Car cette ligne dit: est-ce que $row['uri'] vaut bien $request_uri et dans ton cas, c'est bien "/" = "/"

Donc il devrait rentrer dans la condition.

Link to comment
Share on other sites

j'ai 

/ An URL matching current shop was found
                if (preg_match('#^'.preg_quote($row['uri'], '#').'#i', $request_uri)) {
                    $through = true;
                    $id_shop = $row['id_shop'];
                    $found_uri = $row['uri'];
                    if ($row['main']) {
                        $is_main_uri = true;
                    }

 

Link to comment
Share on other sites

Ok boutique en ligne^^

Donc c'est bien ce que je disais quand j'ai demandé s'il y avait un cache...

Votre boutique avait le cache serveur activé.

OVH a crashé cette nuit et un robot ou un client a du passer à ce moment

L'objet shop a donc été crée de manière corrompue et depuis le serveur memcache renvoie le même objet invalide...

NE PAS UTILISER DE CACHE SERVEUR AVEC PRESTASHOP !!! (l'option en bas de page "Performances") JAMAIS ! JAMAIS ! JAMAIS !

Ok ?

  • Like 1
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...