Jump to content

Prestashop Local -> Serveur OVH


Recommended Posts

Bonjour.

 

En suivant des tutoriels sur internet, je rencontre d'énormes problèmes quant à la mise en ligne de mon site.

 

J'ai fait toutes les modifs qu'il fallait faire :

- Uploader mes fichiers.

- Uploader ma base de données.

- Changer le fichier /config/settings.inc.php comme il fallait.

- Changer le nom de domaine se trouvant dans la base de données (table: configuration).

 

Voici ce que j'obtiens comme erreur:

 

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /homez.461/aaa/www/index.php on line 29

 

J'ai cherché un peu plus sur internet, et certains disent qu'il faut mettre un fichier .htaccess à la racine, avec ce contenu:

 

SetEnv REGISTER_GLOBALS 0

SetEnv PHP_VER 5

# URL rewriting module activation

RewriteEngine on

# URL rewriting rules

RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [L,E]

RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [L,E]

RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [L,E]

RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang=$1$5 [L,E]

RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang=$1$4 [L,E]

RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang=$1 [QSA,L,E]

RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [L,E]

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [L,E]

RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E]

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E]

RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]

RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]

RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E]

# Catch 404 errors

ErrorDocument 404 /404.php

 

Mais du coup, j'obtiens ces erreurs:

 

Warning: Cannot modify header information - headers already sent by (output started at /homez.461/aaa/www/config/functions.perso.php:1) in /homez.461/aaa/www/classes/Cookie.php on line 300

 

Warning: Cannot modify header information - headers already sent by (output started at /homez.461/aaa/www/config/functions.perso.php:1) in /homez.461/aaa/www/classes/Cookie.php on line 300

 

Warning: Cannot modify header information - headers already sent by (output started at /homez.461/aaa/www/config/functions.perso.php:1) in /homez.461/aaa/www/classes/Tools.php on line 71

 

Je tiens à préciser qu'en local, ça marche parfaitement.

 

Merci de votre aide.

Sbizz.

Link to comment
Share on other sites

Salut Sbizz,

 

Je viens justement de passer 2h à résoudre exactement le même problème! Hébergeur OVH aussi, prestashop 1.4.

 

Solution que j'ai trouvée:

 

Créer un .htaccess à uploader à la racine avec les lignes suivantes seulement:

SetEnv PHP_VER 5

SetEnv REGISTER_GLOBALS 0

SetEnv MAGIC_QUOTES 0

 

Miracle, ça marche. J'avais oublié cette config spécifique requise par OVH mais pas par EasyPHP en local! Va ensuite dans l'admin > Outils > générateurs, recolle ces lignes dans le champs configuration spécifique si elles n'apparaissent pas et génère ton nouveau fichier .htaccess.

 

Problème résolu?

Link to comment
Share on other sites

En fait, j'ai résolu ce probleme... autrement.

 

J'ai tellement désespéré que j'ai changé l'encodage en fait.. Ouai parce que à la base, l'encodage Prestashop est en UTF-8. Du coup, j'ai changé de ANSI à UTF-8 mais apparemment ca a tout fait foiré.

 

Mais du coup, tu résolves un autre problème que j'avais avec un de mes modules de magic quote !

 

Merci donc ;D

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...