Ce qui peut provoquer une erreur ERR_CONNECTION_RESET, sur xampp lors de l’utilisation de la session

J’ai un problème avec xampp (Windows) où j’ai session_start(); dans mon fichier, mais comme gouttes cette demande …

Quand j’essaie d’accéder à la page avec localhost/folder/index.php cela fonctionne mais quand j’essaye external ip/folder/index.php ou 127.0.0.1/folder/index.php ou [::1]/folder/index.php il ne fait que ERR_CONNECTION_RESET connexion (essayé plusieurs navigateurs et chrome donne ERR_CONNECTION_RESET … je suis désemparé et j’ai désespérément besoin d’aide … Cela a fonctionné quand j’ai enlevé session_start(); de mon fichier … Quand je fais un nouveau fichier avec session_start(); ça ne marche toujours pas …

Quelques lignes error.log

 [Sun Jan 10 19:33:45.805036 2016] [:error] [pid 3176:tid 1888] [client myip:50143] script 'C:/xampp/htdocs/h3x1t/i\xc2\xb4\xc2\xb4.php' not found or unable to stat [Sun Jan 10 20:02:40.330149 2016] [ssl:warn] [pid 24588:tid 552] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:02:40.373728 2016] [mpm_winnt:notice] [pid 24588:tid 552] AH00354: Child: Starting 150 worker threads. [Sun Jan 10 20:04:25.949925 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00428: Parent: child process 24588 exited with status 3221225477 -- Restarting. [Sun Jan 10 20:04:26.568746 2016] [ssl:warn] [pid 29460:tid 564] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:26.615700 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.1 configured -- resuming normal operations [Sun Jan 10 20:04:26.615700 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39 [Sun Jan 10 20:04:26.615700 2016] [core:notice] [pid 29460:tid 564] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Sun Jan 10 20:04:26.622190 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00418: Parent: Created child process 26200 [Sun Jan 10 20:04:27.302705 2016] [ssl:warn] [pid 26200:tid 560] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:27.475560 2016] [ssl:warn] [pid 26200:tid 560] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:27.518770 2016] [mpm_winnt:notice] [pid 26200:tid 560] AH00354: Child: Starting 150 worker threads. [Sun Jan 10 20:04:28.693791 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00428: Parent: child process 26200 exited with status 3221225477 -- Restarting. [Sun Jan 10 20:04:29.379751 2016] [ssl:warn] [pid 29460:tid 564] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:29.425188 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.1 configured -- resuming normal operations [Sun Jan 10 20:04:29.425188 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39 [Sun Jan 10 20:04:29.425188 2016] [core:notice] [pid 29460:tid 564] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Sun Jan 10 20:04:29.430191 2016] [mpm_winnt:notice] [pid 29460:tid 564] AH00418: Parent: Created child process 30668 [Sun Jan 10 20:04:30.081357 2016] [ssl:warn] [pid 30668:tid 608] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:30.254197 2016] [ssl:warn] [pid 30668:tid 608] AH01909: www.example.com:443:0 server certificatee does NOT include an ID which matches the server name [Sun Jan 10 20:04:30.297173 2016] [mpm_winnt:notice] [pid 30668:tid 608] AH00354: Child: Starting 150 worker threads. [Sun Jan 10 20:06:24.444492 2016] [:error] [pid 30668:tid 1896] [client ::1:60405] script 'C:/xampp/htdocs/h3x1t/contracts.php' not found or unable to stat, referer: http://localhost/h3x1t/index 

J’ai XAMPP avec PHP7 et le même problème …

J’ai changé dans php.ini: session.use_only_cookies de 0 à 1 et tous les travaux.

J’ai réinstallé xampp avec une version antérieure de PHP …

On dirait que le coupable était PHP 7.0.0

EDIT: trouvé quelque chose probablement lié à cela https://community.apachefriends.org/viewtopic.php?p=248070&sid=0b7559defe15317f41699d1ce9194e3f

EDIT2: Trouvé cela (développeurs bitnami)

nous avons vérifié la configuration de XAMPP et nous avons constaté que le problème est lié à la variable use_only_cookies que vous pouvez trouver dans la section Session du fichier php.ini. Apache se bloquera si la variable use_only_cookies de la section Session est définie sur 0 et que tout va bien s’il est défini sur 1.

http://php.net/manual/en/session.configuration.php#ini.session.use-only-cookies

Nous avons également vérifié que le paramètre use_ssortingct_mode devait être défini sur 1.

https://wiki.php.net/rfc/ssortingct_sessions http://php.net/manual/en/session.configuration.php#ini.session.use-ssortingct-mode

Nous inclurons ces modifications dans la prochaine version de XAMPP avec PHP 7. Nous construisons les installateurs avec la version 7.0.2 et nous les publierons dès que possible.

Dans mon cas, Windows Event Viewer a montré plus de données utiles. Il a indiqué que VCRUNTIME140.dll plantait constamment Apache (ce qui a amené la console à afficher ERR_CONNECTION_RESET). J’ai donc mis à jour les bibliothèques sur https://www.microsoft.com/en-us/download/confirmation.aspx?id=52685 – alors, il a montré le module défectueux comme php7ts.dll – j’ai donc suivi les instructions de http://ibraransari.blogspot.com/2017/01/how-to-solve-apache-crash-fault-module.html et j’étais bon pour aller.