Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 04/04/2021, à 15:40

MissTKali

[Résolu] Install Lamp -> localhost renvoie une page blanche

Bonjour à tous,

Nouveau pc, ubuntu fraichement réinstallé et maintenant au tour de Lamp...
Et oui j'ai bien installé Lamp avec la doc Ubuntu mais localhoste et phpmyadmin me renvoient tous deux une jolie page blanche.

Les logs d'apache me renvoient :

e 0
[Sun Apr 04 15:21:17.164287 2021] [php7:warn] [pid 2852] [client 127.0.0.1:47714] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[Sun Apr 04 15:21:17.164337 2021] [php7:error] [pid 2852] [client 127.0.0.1:47714] PHP Fatal error:  Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/php') in Unknown on line 0
[Sun Apr 04 15:22:58.027925 2021] [mpm_prefork:notice] [pid 2833] AH00171: Graceful restart requested, doing restart
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
[Sun Apr 04 15:22:58.078097 2021] [mpm_prefork:notice] [pid 2833] AH00163: Apache/2.4.29 (Ubuntu) configured -- resuming normal operations
[Sun Apr 04 15:22:58.078121 2021] [core:notice] [pid 2833] AH00094: Command line: '/usr/sbin/apache2'
[Sun Apr 04 15:23:23.549309 2021] [php7:warn] [pid 3513] [client 127.0.0.1:47730] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[Sun Apr 04 15:23:23.549394 2021] [php7:error] [pid 3513] [client 127.0.0.1:47730] PHP Fatal error:  Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/php') in Unknown on line 0
[Sun Apr 04 15:25:54.464797 2021] [php7:error] [pid 3514] [client 127.0.0.1:47752] script '/var/www/html/phpinfo.php' not found or unable to stat
[Sun Apr 04 15:30:13.909209 2021] [php7:error] [pid 3515] [client 127.0.0.1:47778] script '/var/www/html/phpinfo.php' not found or unable to stat
[Sun Apr 04 15:30:16.571797 2021] [php7:warn] [pid 3515] [client 127.0.0.1:47778] PHP Warning:  Unknown: failed to open stream: Permission denied in Unknown on line 0
[Sun Apr 04 15:30:16.571870 2021] [php7:error] [pid 3515] [client 127.0.0.1:47778] PHP Fatal error:  Unknown: Failed opening required '/var/www/html/index.php' (include_path='.:/usr/share/php') in Unknown on line 0

J'ai aussi créé une page phpinfo.php contenant :

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

Mais rien non plus lorsque je consulte l'adresse : localhost/phpinfo.php

erreur :
Not Found
The requested URL was not found on this server.
Apache/2.4.29 (Ubuntu) Server at localhost Port 80

Je vais de ce pas mettre à jour ma signature contenant mes infos matériel.

J'espère que quelqu'un pourra m'éclairer. Merci par avance.

Dernière modification par MissTKali (Le 04/04/2021, à 16:39)


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#2 Le 04/04/2021, à 15:45

Vobul

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

"Permission denied" signifie que tu as un problème de permissions. Sois sûr que www-data peut accéder au dossier /var/www/html en lecture.


Vobul
Utilisez le retour utilisable de commandes !!!
J'aime la langue française, mais je parle franglais, deal with it.
RTFM

Hors ligne

#3 Le 04/04/2021, à 15:50

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Moi j'ai fait sudo chmod -R 777 /var/www/ pour accéder au répertoire en mode super utilisateur.
J'y ai effacé le dossier html et l'ai remplacé par mon dossier de sauvegarde, c'est pas bon ?

Dernière modification par MissTKali (Le 04/04/2021, à 15:51)


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#4 Le 04/04/2021, à 15:52

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Dois-je préférer cette méthode : https://forum.ubuntu-fr.org/viewtopic.php?id=936071 ??


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#5 Le 04/04/2021, à 15:55

bruno

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

JAMAIS de sudo chmod -R 777 !

Retours complets de ces commandes :

ls -al /var/www/html
sudo apache2ctl -t
sudo apache2ctl --t -D DUMP_VHOSTS

Dernière modification par bruno (Le 04/04/2021, à 15:56)

Hors ligne

#6 Le 04/04/2021, à 16:00

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Bonjour et merci Vobul, Bruno.

ls -al /var/www/html
retourne bien le contenu de mon répertoire html

sudo apache2ctl -t

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

sudo apache2ctl --t -D DUMP_VHOSTS

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80                   127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1)

Dernière modification par MissTKali (Le 04/04/2021, à 16:44)


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#7 Le 04/04/2021, à 16:09

bruno

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Les fichiers (index.php et .htaccess) ne peuvent pas être lus par www-data.
Déjà on va commencer par remettre des droits d'accès corrects sur le dossier web (cf. la doc apache2) :

sudo chmod -R a-x /var/www/html
sudo chmod -R a+rX  /var/www/html
sudo chown -R misstkali:www-data /var/www/html

Si après cela ne fonctionne toujours pas il faudra nous monter le contenu de /etc/apache2/sites-available/000-default.conf et de tout autre fichier de configuration que tu as modifié.

Hors ligne

#8 Le 04/04/2021, à 16:27

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Merci Bruno, ça fonctionne nickel.
Donc la prochaine fois j'oublie sudo chmod -R 777 et je mets quoi à la place pour faire les choses bien?

Ps : J'aime beaucoup "Être radical c’est prendre les choses par la racine."


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#9 Le 04/04/2021, à 16:37

bruno

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

MissTKali a écrit :

Donc la prochaine fois j'oublie sudo chmod -R 777 et je mets quoi à la place pour faire les choses bien?

Tu relis la doc apache2, notamment le point 10.1

Hors ligne

#10 Le 04/04/2021, à 16:39

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Oui ok regardons ça.

Merci encore

[Résolu]


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne

#11 Le 04/04/2021, à 17:07

Bwice

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Salut!
Pour le chmod 777 tu n’es pas toute seule à faire l’erreur rassure-toi!
Une planche de Commit Strip big_smile


Ubuntu-Mate 18.04 LTS 64-bit Debian Buster | HP-Pavilion-15-Notebook-PC | AMD A4-6210 apu with amd radeon r3 graphics × 4
Upgrade => 1x Crucial SO-DIMM DDR3L 8 Go 1600 MHz 1,35 Volts | SSD Corsair Force Series LE - 480 Go SATA 3 (6 Gb/s)

Hors ligne

#12 Le 04/04/2021, à 23:25

MissTKali

Re : [Résolu] Install Lamp -> localhost renvoie une page blanche

Bwice a écrit :

Salut!
Pour le chmod 777 tu n’es pas toute seule à faire l’erreur rassure-toi!
Une planche de Commit Strip big_smile

Sympa les planches!


Ubuntu 18
Firefox 104 (64bits)
--------------------------------------------------------------------------------------------------------------------------------
Un monde libre sans bienveillance est une nouvelle prison. En seras-tu le geôlier ou l'affranchi ?

Hors ligne