Page 1 of 1

changement nom de domaine sur OVH

Posted: Mon Oct 09, 2023 12:29 pm
by steph
Bonjour à tous,

voilà j'ai mon site qui est actuellement en meteoestaimpuis.ddns.net

j'aimerais le passé en meteo-estaimpuis.be ( nom de domaine déjà acheté avec hébergement car j'aimerais bien passé Template là-bas ensuite)

Cependant je pensais qu'il fallait juste modifier l'adresse dans config.php mais ça n'a pas l'air si simple en fait car cela ne fonctionne pas.

Y a-t-il des personnes sur OVH qui pourrait m'aider ?

Merci beaucoup.

Re: changement nom de domaine sur OVH

Posted: Mon Oct 09, 2023 2:58 pm
by davidefa
Yes, you can move your site quite easily:
1) zip the original site
2) unzip the archive on the new site ( I know you already imagined these two points ; - )
3) on the new site edit config.php, you need to change the $pageURL and $path lines to reflect the new site url
4) if you changed database, you need to update, also, database parameters ( a few lines above ), $dbName and $con ( the parameters on mysqli_connect are: ip address of the database server, username, password and database name )
4a) in this case you should also backup your original database and restore it on the new one database server
I think the last two steps is all you need.
If you point your browser to ( note the ?errors at the end ):
https://www.meteo-estaimpuis.be/templat ... php?errors
you can see the error that is blocking your new site ( usefull for debugging )


config.png
config.png (224.14 KiB) Viewed 24159 times

Re: changement nom de domaine sur OVH

Posted: Mon Oct 09, 2023 6:09 pm
by steph
Merci beaucoup de ta réponse j'essai de multitudes de solutions depuis tout à l'heure mais je suis toujours bloqué je vais réessayer demain a tête reposé peut-être que ça ira mieux.

Je reviens vers toi si je trouve la solution.

Bonne soirée ;)

Re: changement nom de domaine sur OVH

Posted: Wed Oct 11, 2023 5:45 am
by steph
Bon j'y arrive pas je vais essayer de demander de l'aide a un proche il s'y connais un peu mieux pour tout ça.
J'ai modifier les lignes $pageURL et $path mais déjà ça sans aucun résultat est ce que il y a pas une manip a faire via OVH.
Et la base de données je n'ai rien sur la nouvelle donc forcément ça ne peux pas marcher non plus.

Je voulais déjà changer mon nom de domaine mais même ça c'est prise de tête :lol:

Doucement mais surement je vais y arriver.

Re: changement nom de domaine sur OVH

Posted: Wed Oct 11, 2023 1:05 pm
by davidefa
Yes you have to create the database.
If you have previous data to import ( as in your case I think ) you can create it directly in the backup/restore process:
1) in the old database manager ( phpmyadmin I assume ) export the database ( make sure the 'create database' option is checked/on, it is available once the Custom option is selected )
2) in the new database manager import the previously saved data ( the database will be created and data imported )
Now you should be good to go ( remember to set, in config.php, the ip address of new database server, database name, user and password )

P.S.
Forgot to add, once everything is ok:
- you should update the database method you selected
- if you have cron jobs on the old site you should update their urls

dbexport02.png
dbexport02.png (147.23 KiB) Viewed 24082 times
dbexport01.png
dbexport01.png (167.03 KiB) Viewed 24082 times

Re: changement nom de domaine sur OVH

Posted: Wed Oct 11, 2023 6:41 pm
by steph
Bon ça avance déjà j'ai déjà le site bon rien n'ai afficher mais je pense ca doit etre à cause de la base de données ça et encore j'ai un doute.

Et pour la base de données j'ai bien suivi la procédure il me met une erreur dessus :o
Capture d'écran 2023-10-11 203918.png
Capture d'écran 2023-10-11 203918.png (16.32 KiB) Viewed 24076 times
Capture d'écran 2023-10-11 203924.png
Capture d'écran 2023-10-11 203924.png (142.74 KiB) Viewed 24076 times

Re: changement nom de domaine sur OVH

Posted: Wed Oct 11, 2023 8:57 pm
by davidefa
It seems you don't have privileges to create a database.
In this case your hosting provider has already created a database for you.
If this is the case:
- in previous point 1) do not check create database option
- in previous point 2) select the database your provider has crated for you, and then import the file created in point 1)

Regarding your site not showing properly, double check in config.php you sould have:

Code: Select all

$path = '/template/';
if I'm not wrong you have instead:

Code: Select all

$path = '/meteoej107/';

Re: changement nom de domaine sur OVH

Posted: Thu Oct 12, 2023 6:18 am
by steph
Salut,

bon la base de données c'est ok tout est niquel
je vais essayer de voir pourquoi le site ne charge pas maintenant car il est bien en

$path = '/meteoej107/';

donc je vais regarder ça aujourd'hui ; )

Re: changement nom de domaine sur OVH

Posted: Thu Oct 12, 2023 4:42 pm
by steph
Salut,

bon j'ai accès au site maintenant il est extrêmement mais vraiment très long à charger peut-être un réglage sur OVH je vais regarder ça.
https://meteo-estaimpuis.be/template/indexDesktop.php
Quand ça ira normalement je ferait ma redirection de mon gw1100 vers le site directement pour les données en temps réel.

Re: changement nom de domaine sur OVH

Posted: Fri Oct 13, 2023 9:29 am
by steph
Bon c'est pas pour moi l'hébergement web :lol:

Je vais juste essayer de modifié le nom de domaine et laisser ça sur mon Raspberry au moins le serveur reste chez moi car la je me tire un peu les cheveux :roll:

Re: changement nom de domaine sur OVH

Posted: Thu Oct 19, 2023 5:56 am
by steph
Bonjour,
je tenais juste à vous remercier de m'avoir aider pour le changement de domaine :D

Bonne journée
Steph