[Résolu] Échec installation SPIP 7.3 sur hestia

J’ai une erreur en essayant d’installer SPIP dans un panel d’hébergement LAMP Hestia. Le téléchargement, la décompression et le lancement de l’install avec spip_loader.php se déroulent sans problème, mais après saisir login et mot de passe de la base de données, j’ai l’erreur suivante:
Echec install SPIP étape 2

La base de données est créé, mais vide. Pan d’erreur php dans les logs apache, pas encore de log spip.

Hestia propose le choix de la version php, j’ai essayé la 7.3 et la 7.4.

Dans une autre instance hestia, j’avais réussi à finir l’install, mais avec l’erreur de .htaccess non opérationel.

J’ai essayé de configurer dans ce fichier:

RewriteBase /

rien n’a fait… Merci pour l’aide que vous pourrez me donner!

Il faudrait regarder si le fournisseur fournit des logs d’erreurs PHP.

Sur cette page, il y a les compatibilité php : Versions maintenues - SPIP
PHP 7.3 ne fonctionne plus depuis spip 4.1.
Le htaccess non opérationnel est toujours indiqué à la fin. Il faut renommer htaccess.txt en .htaccess
Ça serait pas ça ?

Merci pour ta réponse, Maïeul (comment vas? ici dani, depuis l’Uruguay) Sans vouloir faire mon Louis XIV, le fournisseur, c’est moi: https://spip.alfa.cielito.uy/

Sauf erreur, j’ai activé les erreurs php. Lors du téléchargement et décompression de SPIP, j’ai deux alertes PHP (PharData::__construct(): open_basedir restriction in effect.), je viens de réessayer:

[Sun May 12 08:54:34.752903 2024] [proxy_fcgi:error] [pid 361629:tid 140385183569600] [client 10.20.0.24:0] AH01071: Got error 'PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106'
[Sun May 12 08:54:38.199343 2024] [proxy_fcgi:error] [pid 361629:tid 140385183569600] [client 10.20.0.24:0] AH01071: Got error 'PHP message: PHP Warning:  PharData::__construct(): open_basedir restriction in effect. File(/home/daniel/web/spip.alfa.cielito.uy) is not within the allowed path(s): (/home/daniel/.composer:/home/daniel/web/spip.alfa.cielito.uy/public_html:/home/daniel/web/spip.alfa.cielito.uy/private:/home/daniel/web/spip.alfa.cielito.uy/public_shtml:/home/daniel/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php on line 106PHP message: PHP Warning:  Cannot modify header information - headers already sent by (output started at phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Cleaner.php:106) in phar:///home/daniel/web/spip.alfa.cielito.uy/public_html/spip_loader.php/src/Session.php on line 63'

spip_loader.php télécharge et décompresse le code spip sans problème, et lance l’installation (/ecrire/). Le choix de la langue et la première étape de connexion à la base se déroule bien, il passe à l’étape 2 où il me montre ma base, mais, lorsque je la choisis, il donne l’erreur que je copiais:
Installation SPIP, étape 2: L'opération a échoué

Sans qu’il y ait de nouvelle erreur PHP.

Bonjour Benitron. Merci pour ton message. Pardon, je ne l’ai pas dit: j’essaie d’installer SPIP 3.2, pour migrer et actualiser des sites que j’ai, hébergés sur des AlternC, que malheureusement je n’arrive plus à actualiser. Le spip_loader.php assure très bien ce point:

spip_loader.php: avertissement version php

Quant à .htaccess, lorsque j’avais réussi l’install (avant un upgrade de hestia et de la debian a bookworm) j’avais essayé de le renommer comme il faut le fichier, mais l’installation n’était pas fonctionnelle. (je n’arrivais pas à me loguer).

Mais maintenant je vois, contrairement à ce que je disais, des logs SPIP avec des erreurs mysql. Vais regarder…

Je crois que j’ai trouvé: ma base est en charset utf8mb4, qui requiert 4 byte par CHAR, en mysql n’arrive pas à créer une table avec une clé de type VARCHAR(255), qui est plus grande que la limite de 1000 bytes. Du log SPIP:

2024-05-12 14:07:49 10.20.0.24 (pid 417038) :Pri:WARNING: SPIP ne connait pas les Charsets disponibles sur le serveur mysql. Le serveur choisira seul.
2024-05-12 14:07:49 10.20.0.24 (pid 417038) :Pri:ERREUR: Erreur mysql 1071
2024-05-12 14:07:49 10.20.0.24 (pid 417038) :Pri:ERREUR: Erreur mysql 1071
2024-05-12 14:07:49 10.20.0.24 (pid 417038) :Pri:ERREUR: Erreur mysql 1071
2024-05-12 14:07:49 10.20.0.24 (pid 417038) :Pri:ERREUR: Erreur 1071 de mysql: Specified key was too long; max key length is 1000 bytes
in /home/daniel/web/spip.alfa.cielito.uy/public_html/ecrire/base/create.php L74 [sql_create(),creer_ou_upgrader_table(),alterer_base(),creer_base(),install_bases(),install_etape_3_dist(),exec_install_dist()]
CREATE  TABLE IF NOT EXISTS `daniel_spip`.spip_meta (
                nom VARCHAR (255)  NOT NULL,
                valeur text  DEFAULT '',
                impt ENUM('non', 'oui') DEFAULT 'oui' NOT NULL,
                maj TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
                PRIMARY KEY (nom)) ENGINE=MyISAM

Je vais essayer avec une base utf8 (qui, si j’ai bien compris, ne requiert que 3 bytes par char), mais ce serait pas mal que SPIP s’installe sans modifier les valeurs par omission actuelles, que les millenials puissent faire des SPIP avec emojis…

ah oui c’est un bug connu.

Cela étant les milleniales peuvent faire du SPIP avec emoji : SPIP converti automatiquement en entité HTML lorsque cle point de code est trop important.

1 « J'aime »

C’était bien cela! Avec une base utf8, ca marche. Et pas de warning htaccess (là je crois que c’est Hestia qui a clarifié un peu son archi de proxy nginx devant apache).

Heureux pour les millenials, puissent ces échanges aider les newbies qui s’essayeraient à SPIP.

Encore merci! Ca faisait un bail que je traînais ce truc à moitié pas fini, je vais pouvoir actualiser mes sites spip qui malheureusement ont été usurpés par un sale bot…

Le pb avec l’utf8mb4 est réglé en SPIP 4.2

Attention de bien nettoyer les fichiers corrompus… Souvent le mieux est de tout virer sauf IMG et squelettes (mais de vérifier ces dossiers aussi) et de refaire une install au propre.

1 « J'aime »