Giter VIP home page Giter VIP logo

Comments (27)

dbarzin avatar dbarzin commented on May 22, 2024 1

Il semble que la DB ne soit pas créée. La commande à lancer dans le répertoire de mercator est : "php artisan migrate --seed".

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Quel est le message d'erreur ? (voir dans mercator/storage/logs/laravel.log)
L'utilisation admin existe t-il dans la DB ? ( sudo mysql mercator -e "select * from users;" )

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

:/var/www/html/mercator$ php artisan migrate --seed
Migrating: 2021_05_08_191249_create_activities_table

Illuminate\Database\QueryException

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'activities' already exists (SQL: create table activities (id int unsigned not null auto_increment primary key, name varchar(255) not null, description longtext null, created_at timestamp null, updated_at timestamp null, deleted_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

at vendor/laravel/framework/src/Illuminate/Database/Connection.php:692
688▕ // If an exception occurs when attempting to run a query, we'll format the error
689▕ // message to include the bindings with SQL, which will make this exception a
690▕ // lot more helpful to the developer instead of just the database's errors.
691▕ catch (Exception $e) {
➜ 692▕ throw new QueryException(
693▕ $query, $this->prepareBindings($bindings), $e
694▕ );
695▕ }
696▕

  +12 vendor frames 

13 database/migrations/2021_05_08_191249_create_activities_table.php:23
Illuminate\Support\Facades\Facade::__callStatic()

  +21 vendor frames 

35 artisan:37
Illuminate\Foundation\Console\Kernel::handle()

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Quel est le type et la version de la base de données ? (mysql --version)

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

mysql Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Mercator ne fonctionne pas sous MariaDB. Il faut installer mySQL.

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

ok

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

je vais repartir sur une autre

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

j'ai crée une nouvelle VM ubuntu et suivi le déroulé de l'install et cela bloque à la création du .env il me dit que je n'ai pas les droits:

cp .env.example .env
cp: impossible de créer le fichier standard '.env': Permission non accordée

avec sudo c'est pas mieux.
Il m'a fait quelques erreurs de droit qui m'ont forcé a utiliser sudo alors que sur la première install(avec mariaDB), cela était passé sans sudo...

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Tu n'as pas des droits d'écriture dans le répertoire courant.
Va dans le répertoire de mercator et fait : sudo chown -R mon_userid .

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

je me suis donné les droits sur www
j'ai supprimé le dossier mercator
je repris le process depuis Project sans encombre.

quand je me connecte sur l'interface web :
j'ai ces messages :

APP_DEBUG is set to true while APP_ENV is not local

This could make your application vulnerable to remote execution. Read more about Ignition security.
/var/www/mercator/
Illuminate\Encryption\MissingAppKeyException
No application encryption key has been specified.
http://127.0.0.1:8000/
Hide solutions
Your app key is missing

Generate your application encryption key using php artisan key:generate.
Read more

Laravel installation

quand je fais générer la clé cela me dit que ça le fait sans problème :
/var/www/mercator$ php artisan key:generate
Application key set successfully.

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

la clé de l'application est manquante. Pour générer la clé :
php artisan key:generate
C'est dans la procédure d'installation.

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

je suis reparti à zéro, vm réinitialisée avec Ubuntu standard.
j'ai suivi tous les items.

  • il faut se donner les droits sur www, pour pouvoir réalisé l'item "git clone ... " sinon err fatal permission non accordée pour créer copie d etravail mercator
  • arrivé à la fin de l'installation sans erreur, mais a nouveau problème de clé : "No application encryption key has been specified"

Pourtant la clé a bien été générée. j'ai eu le retour : " Application key set successfully

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Je vais essayer de reproduire le problème.

  • Quelle version de Ubuntu as-tu utilisé ?
  • Quelles commandes supplémentaire qui ne sont pas dans la procédure as-tu utilisé pour l'installation ?

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

j'ai refait :

  • php artisan config:clear

  • php artisan serve
    => toujours problème de cle

  • php artisan key:generate

  • php artisan serve
    => toujours problème de clé

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

ma version : ubuntu 20.04 installé sur une VM hyper-V
ma première install c'était une vm existante avec maria DB
ma deuxième avec ubuntu 20.04 en version minimale
l'actuelle ubuntu avec toutes les applis
une fois les mises a jour effectuées, je n'ai rien fait d'autre que de suivre la procédure d'install .

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

après l'install d'ubuntu je n'ai fait que suivre la procédure, sauf pour le clone de git.
quand on part de zéro on a pas les droits d'écriture sur www

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

et j'ai suivi le lien "install composer globally"
et installer le premier script

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

As-tu importé les données de test ?
Quelle commande as-tu utilisé pour changer les droits sur www ?

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

oui j'ai importé les données de test (mais peut être après mon premier essai de connexion)

la commande avec laquelle je me suis donné les droits :
cyril@SRVLINUX2:/var/www/mercator$ sudo chown -R cyril /var/www/

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Je viens de retester la procédure d'installation sous Ubuntu et l'application se lance.
Il y avait quelques changements à faire concernant les droits d'accès au répertoire /var/www/mercator.

Concernant ton problème, peux-tu vérifier que la clé de l'application a bien été généré dans le fichier .env ?
APP_KEY=....

As-tu exécuté la commande git avec un sudo ?
Lorsque tu t'es donné les droits, si tu as fait : sudo chown -R cyril /var/www/mercator/*
cela peut expliquer le problème car le fichier .env ne t’appartient par et Laravel ne peut pas le lire au démarrage.

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

je n'ai pas de ligne qui commence par APP_KEY= dans le fichier .env (qui est un fichier caché)
les seules lignes qui commencent par APP_ sont celles-ci :
APP_DEBUG=true
APP_URL=http://localhost

Sinon j'ai ça dans le .env :
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

pour la commande git je n'ai pas fait de sudo.
je me suis donné les droits sur www et du coup le commande est passée

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

et j'ai vraiment tapé ça :
sudo chown -R cyril /var/www/

j'ai regardé dans l'historique du terminal

from mercator.

dbarzin avatar dbarzin commented on May 22, 2024

Dans le fichier .env.example cette variable est pourtant bien présente. Peux-tu refaire ceci :
cd /var/www/mercator
cp .env.example .env
php artisan key:generate
Vérifier que la clé de l'application a bien été générée (APP_KEY=....)
Vider la cache et lancer l'application
php artisan config:clear
php artisan serve

from mercator.

ChevaucheurDeVague avatar ChevaucheurDeVague commented on May 22, 2024

ok super ! cela fonctionne.
je suis connecté en admin
je vais pouvoir regarder l'appli.
merci du support

from mercator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.