Je ne sais pas ce que j'ai fais, mais j'ai 4 sites sur mon réseau local, et sur chacun des sites, lorsque je clique sur envoyer sur un formulaire (post), il m'affiche une page :
[Sat Oct 15 18:37:09.331810 2016] [:error] [pid 16357] [client ::1:34874] PHP Notice: Undefined index: logout in /srv/http/mon_site/include/header.php on line 100
[Sat Oct 15 18:37:09.332105 2016] [:error] [pid 16357] [client ::1:34874] PHP Notice: A session had already been started - ignoring session_start() in /srv/http/mon_site/include/header.php on line 114
[Sat Oct 15 18:37:09.356145 2016] [:error] [pid 16357] [client ::1:34874] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/news/index.php(175): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4
[Sat Oct 15 18:37:09.430304 2016] [:error] [pid 16357] [client ::1:34874] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.434323 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.443760 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.447607 2016] [:error] [pid 9174] [client ::1:34878] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.451120 2016] [:error] [pid 10299] [client ::1:34880] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.454676 2016] [:error] [pid 24541] [client ::1:34882] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.458396 2016] [:error] [pid 12066] [client ::1:34884] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.462315 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.466229 2016] [:error] [pid 16357] [client ::1:34874] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.684786 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.690773 2016] [:error] [pid 12066] [client ::1:34884] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.696528 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.702125 2016] [:error] [pid 24541] [client ::1:34882] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.707419 2016] [:error] [pid 10299] [client ::1:34880] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.713796 2016] [:error] [pid 9174] [client ::1:34878] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.719285 2016] [:error] [pid 12066] [client ::1:34884] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.723691 2016] [:error] [pid 16357] [client ::1:34874] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:09.729022 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/admin/error.php(35): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:10.596217 2016] [:error] [pid 9562] [client ::1:34876] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /srv/http/mon_site/fonction/connectes.php:4\nStack trace:\n#0 /srv/http/mon_site/include/footer.php(8): connectes()\n#1 /srv/http/mon_site/news/form.php(88): include('/srv/http/mon_site/i...')\n#2 {main}\n thrown in /srv/http/mon_site/fonction/connectes.php on line 4, referer: http://localhost/mon_site/news/index.php
[Sat Oct 15 18:37:14.646320 2016] [:error] [pid 9174] [client ::1:34878] PHP Fatal error: Uncaught Error: Call to a member function fetch() on boolean in /srv/http/mon_site/news/proc.php:44\nStack trace:\n#0 {main}\n thrown in /srv/http/mon_site/news/proc.php on line 44, referer: http://localhost/mon_site/news/form.php
Si je comprend bien, il a l'air de ne pas connaître la fonction mysql_connect().
Bizzare, puisqu'il y a 3 jours, ca marchait nickel...
Je ne vois pas comment il y a 3 jours cela pouvait fonctionner... Cette fonction n'existe plus en PHP 7, à moins de ne pas avoir fait de mise à jour régulière...
[Sat Oct 15 19:07:16.058823 2016] [:error] [pid 18772] [client ::1:35380] PHP Fatal error: Uncaught Error: Call to a member function fetch() on boolean in /srv/http/mon_site/news/proc.php:44\nStack trace:\n#0 {main}\n thrown in /srv/http/mon_site/news/proc.php on line 44, referer: http://localhost/mon_site/news/form.php
Cela n'a rien à voir avec Arch Linux... La fonction fetch n'existe pas en php...
Je ne sais pas ce que tu attends ici comme aide, surtout que tu ne donnes pas de code source, et que tu donnes toi même la raison du problème... Après pour le corriger tu es le seul à le pouvoir, donc comment veux tu que l'on t'aide. De toute façon ce n'est pas vraiment le bon forum pour ce genre de question/problème
Je pose la question ici, parce que mon site ne marche PLUS sur mon réseau locale, mais marche sur les serveur d'ovh (c'est exactement le même).
Du coup je pense que c'est un problème de Arch de config. Surement quelque chose qui a sauté lors d'une maj. Mais comme il y a des maj toutes les heures sous Arch, ben je ne sais pas ce que c'est.
Comme déjà indiqué, Arch Linux utilise php 7, qui est une énorme évolution de php 5 (encore utilisé chez OVH) ! Donc aucun problème de configuration ici, tu utilisais juste du code marqué comme déprécié depuis très longtemps !
Et pour le fetch, l'erreur t'indique que tu essayes d'appeler la fonction fetch sur un boolean. Sans voir le code complet c'est impossible d'aider, ton code est juste invalide !!!
Pour information
PDO::query() retourne un objet PDOStatement, ou FALSE si une erreur survient.
Donc je pense que la fonction query retourne FALSE. ce n'est pas bien de ne pas faire de gestion d'erreur...
Sinon migrer de l'ancienne API de mysql vers l'API PDO n'est pas ce qu'il y a de plus simple, pourquoi ne pas avoir utilisé l'API mysqli ?