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 07/09/2016, à 09:32

weetoz

[Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Bonjour à toutes et à tous,

après avoir réussi à régler les divers problèmes que l’on rencontre lorsque l’on installe son premier serveur sur une VM, j’ai maintenant un souci pour récupérer les éléments d’une table de sql.

Il est vrai que ma config n’est idéal, l’adresse de mon serveur est toujours en DHCP, cependant dans l’immédiat, ce n’est pas très contraignant, un coup de ‘ifconfig’ pour vérifier l’adresse de mon serveur, et le tour est joué.

Mon souci est qu’ avec ma page PHP, je n’arrive pas à récupérer des données sur une table.
Voici le code utilisé :

<?php

		$bdd = new PDO('mysql:host=192.168.0.13;dbname=testOPC','root','monMDP');
		echo'jeannot';
		$reponse = $bdd->query('SELECT * FROM jeux_video');

		while ($donnes = $reponse->fetch()) {
			echo '<p>'.$donnes['nom'].'</p>';

		}
		?>

Je suppose que le PDO n’est pas activé, et je n’ai pas encore réussi à le trouver. Je n’ai pas fait une installation avec LAMPP, mais une installation ‘pièce par pièce’, à comprendre que j’ ai installé Appache2, mysql, myAdminphp, php7 de manière indépendante (à la façon de Kholo).

Si quelqu’un pouvait m’aider à trouver et configurer ce fichier, ce serai très sympa.

Merci.

Dernière modification par weetoz (Le 07/09/2016, à 11:31)

Hors ligne

#2 Le 07/09/2016, à 09:44

pires57

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Tu as quoi dans les logs?
PS : au niveau de ton code pense à utiliser les try  - catch.


Utilisateur d'Archlinux, Ubuntu et Kali Linux
Administrateur système et réseau spécialisé Linux.
LinkedIn

Hors ligne

#3 Le 07/09/2016, à 10:10

weetoz

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Bonjour pires57,
voici le fichier error.log d'apache2:

[Wed Aug 10 18:10:11.176133 2016] [mpm_prefork:notice] [pid 2269] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 18:10:11.176329 2016] [core:notice] [pid 2269] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:21:40.241072 2016] [mpm_prefork:notice] [pid 2269] 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
[Wed Aug 10 19:21:40.369552 2016] [mpm_prefork:notice] [pid 2269] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:21:40.369575 2016] [core:notice] [pid 2269] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:21:51.966045 2016] [mpm_prefork:notice] [pid 2269] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 19:21:53.110766 2016] [mpm_prefork:notice] [pid 10982] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:21:53.110853 2016] [core:notice] [pid 10982] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:24:45.149731 2016] [mpm_prefork:notice] [pid 10982] 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
[Wed Aug 10 19:24:45.409551 2016] [mpm_prefork:notice] [pid 10982] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:24:45.409575 2016] [core:notice] [pid 10982] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:24:45.755674 2016] [mpm_prefork:notice] [pid 10982] 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
[Wed Aug 10 19:24:45.911013 2016] [mpm_prefork:notice] [pid 10982] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:24:45.911036 2016] [core:notice] [pid 10982] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:41:16.150243 2016] [mpm_prefork:notice] [pid 10982] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 19:40:13.318490 2016] [mpm_prefork:notice] [pid 2303] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:40:13.339723 2016] [core:notice] [pid 2303] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 19:55:27.214801 2016] [mpm_prefork:notice] [pid 2303] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 19:55:54.030805 2016] [mpm_prefork:notice] [pid 2311] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 19:55:54.039766 2016] [core:notice] [pid 2311] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 20:04:52.636772 2016] [mpm_prefork:notice] [pid 2311] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 20:05:19.522757 2016] [mpm_prefork:notice] [pid 2311] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 20:05:19.555584 2016] [core:notice] [pid 2311] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 20:17:22.313981 2016] [mpm_prefork:notice] [pid 2311] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 20:17:53.117316 2016] [mpm_prefork:notice] [pid 2375] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 20:17:53.133582 2016] [core:notice] [pid 2375] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 20:45:35.846199 2016] [mpm_prefork:notice] [pid 2375] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 20:46:05.072200 2016] [mpm_prefork:notice] [pid 2372] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 20:46:05.094129 2016] [core:notice] [pid 2372] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 20:52:29.569616 2016] [:error] [pid 2390] [client 192.168.0.10:38922] script '/var/www/html/index.php' not found or unable to stat
[Wed Aug 10 20:53:59.454931 2016] [:error] [pid 2547] [client 192.168.0.10:38926] script '/var/www/html/info.php' not found or unable to stat
[Wed Aug 10 21:00:50.359120 2016] [mpm_prefork:notice] [pid 2372] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 21:00:51.536942 2016] [mpm_prefork:notice] [pid 2628] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 21:00:51.537034 2016] [core:notice] [pid 2628] AH00094: Command line: '/usr/sbin/apache2'
[Wed Aug 10 21:01:08.422464 2016] [:error] [pid 2633] [client 192.168.0.10:38980] script '/var/www/html/info.php' not found or unable to stat
[Wed Aug 10 21:01:10.295349 2016] [:error] [pid 2633] [client 192.168.0.10:38980] script '/var/www/html/info.php' not found or unable to stat
[Wed Aug 10 21:15:01.904841 2016] [:error] [pid 2647] [client 192.168.0.10:39052] script '/var/www/html/test.php' not found or unable to stat
[Wed Aug 10 21:28:59.357357 2016] [mpm_prefork:notice] [pid 2628] AH00169: caught SIGTERM, shutting down
[Wed Aug 10 21:29:00.541485 2016] [mpm_prefork:notice] [pid 2782] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Aug 10 21:29:00.541578 2016] [core:notice] [pid 2782] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 12:26:56.996436 2016] [mpm_prefork:notice] [pid 2782] AH00169: caught SIGTERM, shutting down
[Thu Aug 11 12:26:58.167021 2016] [mpm_prefork:notice] [pid 4999] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 12:26:58.167109 2016] [core:notice] [pid 4999] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 12:27:30.157980 2016] [mpm_prefork:notice] [pid 4999] AH00169: caught SIGTERM, shutting down
[Thu Aug 11 12:34:17.398071 2016] [mpm_prefork:notice] [pid 2376] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 12:34:17.424967 2016] [core:notice] [pid 2376] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 13:25:27.209056 2016] [mpm_prefork:notice] [pid 2385] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 13:25:27.225079 2016] [core:notice] [pid 2385] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 13:28:35.933111 2016] [mpm_prefork:notice] [pid 2393] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 13:28:35.955212 2016] [core:notice] [pid 2393] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 13:54:23.760076 2016] [mpm_prefork:notice] [pid 2379] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 13:54:23.802978 2016] [core:notice] [pid 2379] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 14:25:43.153116 2016] [mpm_prefork:notice] [pid 2436] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 14:25:43.174726 2016] [core:notice] [pid 2436] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 14:37:29.204765 2016] [mpm_prefork:notice] [pid 2436] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 14:37:29.232155 2016] [core:notice] [pid 2436] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 14:39:13.192932 2016] [mpm_prefork:notice] [pid 2464] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 14:39:13.240032 2016] [core:notice] [pid 2464] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 14:42:48.281089 2016] [mpm_prefork:notice] [pid 2447] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 14:42:48.311395 2016] [core:notice] [pid 2447] AH00094: Command line: '/usr/sbin/apache2'
[Thu Aug 11 14:47:27.559596 2016] [mpm_prefork:notice] [pid 2448] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Thu Aug 11 14:47:27.586539 2016] [core:notice] [pid 2448] AH00094: Command line: '/usr/sbin/apache2'
[Fri Aug 12 13:01:52.129554 2016] [mpm_prefork:notice] [pid 2517] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Fri Aug 12 13:01:52.150869 2016] [core:notice] [pid 2517] AH00094: Command line: '/usr/sbin/apache2'
[Sat Aug 13 09:04:24.117986 2016] [mpm_prefork:notice] [pid 2498] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Sat Aug 13 09:04:24.147125 2016] [core:notice] [pid 2498] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 09:30:13.993951 2016] [mpm_prefork:notice] [pid 2520] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 09:30:14.003329 2016] [core:notice] [pid 2520] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 09:51:20.829563 2016] [:error] [pid 2525] [client 192.168.0.10:37012] PHP Parse error:  syntax error, unexpected '<', expecting end of file in /var/www/html/html/W4STM32V2/index.php on line 23, referer: http://192.168.0.15/html/
[Mon Sep 05 09:51:24.320796 2016] [:error] [pid 2705] [client 192.168.0.10:37014] PHP Parse error:  syntax error, unexpected '<', expecting end of file in /var/www/html/html/W4STM32V2/index.php on line 23, referer: http://192.168.0.15/html/
[Mon Sep 05 09:58:01.370714 2016] [:error] [pid 2523] [client 192.168.0.10:37114] PHP Parse error:  syntax error, unexpected '\\' (T_NS_SEPARATOR), expecting ',' or ';' in /var/www/html/html/W4STM32V2/index.php on line 21, referer: http://192.168.0.15/html/
[Mon Sep 05 10:07:19.116355 2016] [:error] [pid 2525] [client 192.168.0.10:37246] PHP Parse error:  syntax error, unexpected '=' in /var/www/html/html/W4STM32V2/index.php on line 28, referer: http://192.168.0.15/html/
[Mon Sep 05 10:07:33.724522 2016] [:error] [pid 2526] [client 192.168.0.10:37248] PHP Parse error:  syntax error, unexpected '=' in /var/www/html/html/W4STM32V2/index.php on line 28, referer: http://192.168.0.15/html/
[Mon Sep 05 10:08:20.328294 2016] [:error] [pid 2703] [client 192.168.0.10:37250] PHP Parse error:  syntax error, unexpected '=' in /var/www/html/html/W4STM32V2/index.php on line 28, referer: http://192.168.0.15/html/
[Mon Sep 05 10:09:19.146763 2016] [:error] [pid 2524] [client 192.168.0.10:37252] PHP Parse error:  syntax error, unexpected '=' in /var/www/html/html/W4STM32V2/index.php on line 28, referer: http://192.168.0.15/html/
[Mon Sep 05 10:45:21.358145 2016] [:error] [pid 2708] [client 192.168.0.10:37668] PHP Warning:  date() expects parameter 2 to be integer, string given in /var/www/html/html/W4STM32V2/index.php on line 20, referer: http://192.168.0.15/html/
[Mon Sep 05 11:14:19.938325 2016] [:error] [pid 2523] [client 192.168.0.10:38020] PHP Parse error:  syntax error, unexpected ''<br/>'' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /var/www/html/html/W4STM32V2/index.php on line 27, referer: http://192.168.0.15/html/
[Mon Sep 05 11:21:00.043414 2016] [:error] [pid 2526] [client 192.168.0.10:38032] PHP Notice:  Array to string conversion in /var/www/html/html/W4STM32V2/index.php on line 42, referer: http://192.168.0.15/html/
[Mon Sep 05 11:21:00.043538 2016] [:error] [pid 2526] [client 192.168.0.10:38032] PHP Notice:  Array to string conversion in /var/www/html/html/W4STM32V2/index.php on line 42, referer: http://192.168.0.15/html/
[Mon Sep 05 11:21:00.043560 2016] [:error] [pid 2526] [client 192.168.0.10:38032] PHP Notice:  Array to string conversion in /var/www/html/html/W4STM32V2/index.php on line 42, referer: http://192.168.0.15/html/
[Mon Sep 05 11:47:54.022834 2016] [:error] [pid 2525] [client 192.168.0.10:38254] script '/var/www/html/html/opc/PHP_SQL/Partie2/Bonjour.php' not found or unable to stat, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/
[Mon Sep 05 11:48:08.389758 2016] [:error] [pid 2526] [client 192.168.0.10:38256] script '/var/www/html/html/opc/PHP_SQL/Partie2/Bonjour.php' not found or unable to stat, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/
[Mon Sep 05 11:49:55.749535 2016] [:error] [pid 2524] [client 192.168.0.10:38260] PHP Parse error:  syntax error, unexpected '$_GET' (T_VARIABLE), expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/bonjour.php on line 12, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/
[Mon Sep 05 11:49:59.575936 2016] [:error] [pid 2705] [client 192.168.0.10:38262] PHP Parse error:  syntax error, unexpected '$_GET' (T_VARIABLE), expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/bonjour.php on line 12, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/
[Mon Sep 05 11:50:13.958569 2016] [:error] [pid 2527] [client 192.168.0.10:38264] PHP Parse error:  syntax error, unexpected '$_GET' (T_VARIABLE), expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/bonjour.php on line 12, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/
[Mon Sep 05 12:32:16.777025 2016] [:error] [pid 2708] [client 192.168.0.10:38488] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:32:58.464544 2016] [:error] [pid 2523] [client 192.168.0.10:38490] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:33:08.104510 2016] [:error] [pid 2772] [client 192.168.0.10:38492] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 17, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:33:12.867839 2016] [:error] [pid 2706] [client 192.168.0.10:38494] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 17, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:33:45.693986 2016] [:error] [pid 2525] [client 192.168.0.10:38496] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 17, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:33:50.101862 2016] [:error] [pid 2526] [client 192.168.0.10:38498] PHP Parse error:  syntax error, unexpected '}', expecting ',' or ';' in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 17, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/index.php
[Mon Sep 05 12:49:46.701068 2016] [:error] [pid 2524] [client 192.168.0.10:38672] script '/var/www/html/html/opc/PHP_SQL/Partie2/TP/cible.php' not found or unable to stat, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/TP/formulaire.php
[Mon Sep 05 12:51:10.699587 2016] [:error] [pid 2527] [client 192.168.0.10:38676] script '/var/www/html/html/opc/PHP_SQL/Partie2/TP/cible.php' not found or unable to stat, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/TP/formulaire.php
[Mon Sep 05 12:58:27.151530 2016] [:error] [pid 2527] [client 192.168.0.10:38704] PHP Parse error:  syntax error, unexpected '!' in /var/www/html/html/opc/PHP_SQL/Partie2/TP/secret.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/TP/formulaire.php
[Mon Sep 05 13:27:26.135037 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fopen(compteur.txt): failed to open stream: Permission denied in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 11, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:26.135089 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fgets() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:26.135098 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fseek() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:26.135103 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fputs() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:26.135123 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 18, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:27.262428 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fopen(compteur.txt): failed to open stream: Permission denied in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 11, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:27.262466 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fgets() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:27.262475 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fseek() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:27.262480 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fputs() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:27.262486 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 18, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:28.528864 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fopen(compteur.txt): failed to open stream: Permission denied in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 11, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:28.528955 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fgets() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:28.528985 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fseek() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:28.529005 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fputs() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:28.529025 2016] [:error] [pid 2772] [client 192.168.0.10:38970] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 18, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:35.283361 2016] [:error] [pid 2706] [client 192.168.0.10:38972] PHP Warning:  fopen(compteur.txt): failed to open stream: Permission denied in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 11, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:35.283488 2016] [:error] [pid 2706] [client 192.168.0.10:38972] PHP Warning:  fgets() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:35.283516 2016] [:error] [pid 2706] [client 192.168.0.10:38972] PHP Warning:  fseek() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:35.283562 2016] [:error] [pid 2706] [client 192.168.0.10:38972] PHP Warning:  fputs() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:27:35.283583 2016] [:error] [pid 2706] [client 192.168.0.10:38972] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 18, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:28:11.638419 2016] [:error] [pid 2525] [client 192.168.0.10:38974] PHP Warning:  fopen(compteur.txt): failed to open stream: Permission denied in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 11, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:28:11.638475 2016] [:error] [pid 2525] [client 192.168.0.10:38974] PHP Warning:  fgets() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:28:11.638484 2016] [:error] [pid 2525] [client 192.168.0.10:38974] PHP Warning:  fseek() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:28:11.638491 2016] [:error] [pid 2525] [client 192.168.0.10:38974] PHP Warning:  fputs() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 16, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:28:11.638496 2016] [:error] [pid 2525] [client 192.168.0.10:38974] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/html/html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php on line 18, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:53:05.262770 2016] [core:error] [pid 2525] (71)Protocol error: [client 192.168.0.10:39222] AH00036: access to /html/opc/PHP_SQL/Partie2/SessionEtFichier/accueil.php failed (filesystem path '/var/www/html'), referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/SessionEtFichier/
[Mon Sep 05 13:54:10.546319 2016] [mpm_prefork:notice] [pid 2453] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 13:54:10.554448 2016] [core:notice] [pid 2453] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 13:57:13.460357 2016] [mpm_prefork:notice] [pid 2461] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 13:57:13.478531 2016] [core:notice] [pid 2461] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 14:00:46.510908 2016] [mpm_prefork:notice] [pid 2452] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 14:00:46.518558 2016] [core:notice] [pid 2452] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 14:03:07.329768 2016] [mpm_prefork:notice] [pid 2458] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 14:03:07.348734 2016] [core:notice] [pid 2458] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 14:08:49.345007 2016] [mpm_prefork:notice] [pid 2454] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 14:08:49.350045 2016] [core:notice] [pid 2454] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 14:17:59.586781 2016] [mpm_prefork:notice] [pid 2449] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Mon Sep 05 14:17:59.598207 2016] [core:notice] [pid 2449] AH00094: Command line: '/usr/sbin/apache2'
[Mon Sep 05 14:24:11.169871 2016] [:error] [pid 2584] [client 192.168.0.10:39408] PHP Parse error:  syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/2index.php
[Mon Sep 05 14:24:42.053171 2016] [:error] [pid 2454] [client 192.168.0.10:39410] PHP Notice:  Undefined index: vegetarien in /var/www/html/html/opc/PHP_SQL/Partie2/cible.php on line 15, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie2/2index.php
[Mon Sep 05 15:26:04.037203 2016] [:error] [pid 2457] [client 192.168.0.10:40062] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:30:24.289895 2016] [:error] [pid 2653] [client 192.168.0.10:40064] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:30:27.380186 2016] [:error] [pid 2655] [client 192.168.0.10:40066] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:31:04.659862 2016] [:error] [pid 2656] [client 192.168.0.10:40068] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:31:29.063495 2016] [:error] [pid 2455] [client 192.168.0.10:40070] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:32:50.589897 2016] [:error] [pid 2453] [client 192.168.0.10:40076] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:32:51.977325 2016] [:error] [pid 2454] [client 192.168.0.10:40078] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:33:04.666964 2016] [:error] [pid 2584] [client 192.168.0.10:40080] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:33:25.233014 2016] [:error] [pid 2651] [client 192.168.0.10:40082] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:33:36.719169 2016] [:error] [pid 2456] [client 192.168.0.10:40084] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:33:49.023774 2016] [:error] [pid 2457] [client 192.168.0.10:40086] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:2\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(2): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 2, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:34:40.510520 2016] [:error] [pid 2653] [client 192.168.0.10:40088] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:35:00.041010 2016] [:error] [pid 2656] [client 192.168.0.10:40092] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'wyz', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:35:19.558388 2016] [:error] [pid 2453] [client 192.168.0.10:40096] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:35:21.964524 2016] [:error] [pid 2454] [client 192.168.0.10:40098] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:47:44.514995 2016] [:error] [pid 2456] [client 192.168.0.10:40514] PHP Fatal error:  Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n\nNext PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:48:17.742193 2016] [:error] [pid 2653] [client 192.168.0.10:40518] PHP Fatal error:  Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n\nNext PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:50:27.566327 2016] [:error] [pid 2656] [client 192.168.0.10:40522] PHP Fatal error:  Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n\nNext PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:50:29.936511 2016] [:error] [pid 2455] [client 192.168.0.10:40524] PHP Fatal error:  Uncaught PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n\nNext PDOException: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 15:50:45.876486 2016] [:error] [pid 2454] [client 192.168.0.10:40528] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Mon Sep 05 16:06:32.141642 2016] [mpm_prefork:notice] [pid 2449] AH00169: caught SIGTERM, shutting down
[Tue Sep 06 12:29:18.774048 2016] [mpm_prefork:notice] [pid 2506] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Tue Sep 06 12:29:18.803502 2016] [core:notice] [pid 2506] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 06 19:14:47.476818 2016] [:error] [pid 2522] [client 192.168.0.10:59982] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Tue Sep 06 20:41:56.248514 2016] [:error] [pid 2523] [client 192.168.0.10:35760] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.15/html/opc/PHP_SQL/Partie3(sql)/
[Wed Sep 07 07:29:30.786161 2016] [mpm_prefork:notice] [pid 2469] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Sep 07 07:29:30.806093 2016] [core:notice] [pid 2469] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 07 07:50:39.320366 2016] [mpm_prefork:notice] [pid 2469] AH00169: caught SIGTERM, shutting down
[Wed Sep 07 07:51:11.218274 2016] [mpm_prefork:notice] [pid 2455] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Sep 07 07:51:11.248931 2016] [core:notice] [pid 2455] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 07 08:57:11.630215 2016] [mpm_prefork:notice] [pid 2448] AH00163: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
[Wed Sep 07 08:57:11.672608 2016] [core:notice] [pid 2448] AH00094: Command line: '/usr/sbin/apache2'
[Wed Sep 07 09:04:30.851675 2016] [:error] [pid 2455] [client 192.168.0.12:34224] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [2002] No route to host in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'root')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/
[Wed Sep 07 09:05:50.204037 2016] [:error] [pid 2583] [client 192.168.0.12:34228] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1130] Host '192.168.0.13' is not allowed to connect to this MySQL server in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/
[Wed Sep 07 09:20:34.411328 2016] [:error] [pid 2452] [client 192.168.0.12:34280] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1130] Host '192.168.0.13' is not allowed to connect to this MySQL server in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:13\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(13): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 13, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/
[Wed Sep 07 09:21:00.213842 2016] [:error] [pid 2454] [client 192.168.0.12:34284] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1130] Host '192.168.0.13' is not allowed to connect to this MySQL server in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:14\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(14): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 14, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/
[Wed Sep 07 09:21:31.137369 2016] [:error] [pid 2456] [client 192.168.0.12:34288] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1130] Host '192.168.0.13' is not allowed to connect to this MySQL server in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:14\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(14): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 14, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/
pires57 a écrit :

PS : au niveau de ton code pense à utiliser les try  - catch.

Je ne vois pas ce que c'est, ni comment ça s'utilise...

Merci.

Hors ligne

#4 Le 07/09/2016, à 10:13

weetoz

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Je remet ici le dernier log, ce sera plus clair...

[Wed Sep 07 09:21:31.137369 2016] [:error] [pid 2456] [client 192.168.0.12:34288] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1130] Host '192.168.0.13' is not allowed to connect to this MySQL server in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php:14\nStack trace:\n#0 /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php(14): PDO->__construct('mysql:host=192....', 'root', 'jeanjean')\n#1 {main}\n  thrown in /var/www/html/html/opc/PHP_SQL/Partie3(sql)/jeux_video.php on line 14, referer: http://192.168.0.13/html/opc/PHP_SQL/Partie3(sql)/

[edit] J'ai trouvé le fichier php.ini, il est dans: /etc/php/7.0/apache2/php.ini [/edit]

Dernière modification par weetoz (Le 07/09/2016, à 10:18)

Hors ligne

#5 Le 07/09/2016, à 10:59

bruno

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

À lire impérativement :
http://php.net/manual/fr/pdo.construct.php

Et même quand on fait des tests, il est bon de prendre l'habitude d'éviter de se connecter à une base de donnée avec l'utilisateur 'root'. Ta base 'testOPC' devrait avoir son propre utilisateur qui n'a de droits que sur elle même.

Sinon l'erreur est un refus de connexion au serveur MySQL : Host '192.168.0.13' is not allowed to connect to this MySQL server; Demande-toi pourquoi wink

Hors ligne

#6 Le 07/09/2016, à 11:30

weetoz

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Merci Bruno,

maintenant ça fonctionne!!
Merci beaucoup pour le lien, les deux autres méthodes paraissent bien plus intéressantes d'ailleurs...

Également merci à pires57 qui m'a aidé à chercher là où je n'aurais pas été!

Dernière modification par weetoz (Le 07/09/2016, à 11:33)

Hors ligne

#7 Le 07/09/2016, à 14:08

pires57

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Hello,

Les try - catch servent à gérer les exceptions.
Dans ton cas tu n'as pas de message d'erreur parce que ton code de connexion à la base n'a pas fonctionné.
Avec un try - catch tu aurais eu un message de retour comme quoi il y a une erreur de connexion.
Regarde le fonctionnement des try - catch avec PHP, c'est pas difficile a mettre en place smile


Utilisateur d'Archlinux, Ubuntu et Kali Linux
Administrateur système et réseau spécialisé Linux.
LinkedIn

Hors ligne

#8 Le 07/09/2016, à 18:29

weetoz

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Merci pires57,

un truc comme ça:

try{
			$bdd = new PDO('mysql:host=192.168.0.13;dbname=testOPC;charset=utf8', 'jeannot','salut', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
		}
		catch (Exception $e){
			die('erreur: ' .$e->getMessage());
		}

Trop de tuto tue le tuto, c'est aussi dans les cours OpenClassRoom!

Hors ligne

#9 Le 07/09/2016, à 19:50

pires57

Re : [Résolu] Problème de récupération d' éléments d’une table mysql en PHP

Oui un truc comme cela:)


Utilisateur d'Archlinux, Ubuntu et Kali Linux
Administrateur système et réseau spécialisé Linux.
LinkedIn

Hors ligne