使用会话时在 xampp 上可能导致 ERR_CONNECTION_RESET 错误的原因 [英] What may cause an ERR_CONNECTION_RESET error, on xampp while using session

查看:43
本文介绍了使用会话时在 xampp 上可能导致 ERR_CONNECTION_RESET 错误的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 xampp (Windows) 时遇到问题,我的文件中有 session_start(); 但它就像丢弃该请求...

I have problem with xampp (Windows) where I have session_start(); in my file but it like drops that request...

当我尝试使用 localhost/folder/index.php 访问页面时,它可以工作,但是当我尝试external ip/folder/index.php or 127.0.0.1/folder/index.php or [::1]/folder/index.php> 它只是断开连接(尝试了多个浏览器,chrome 给出了 ERR_CONNECTION_RESET...我一无所知,我迫切需要帮助...当我从我的文件中删除 session_start(); 时它起作用了......当我使用 session_start(); 创建新文件时,它仍然不起作用...

When I try to access page with localhost/folder/index.php it works but when i try external ip/folder/index.php or 127.0.0.1/folder/index.php or [::1]/folder/index.php it just drops connection (tried multiple browsers and chrome gives ERR_CONNECTION_RESET... I am clueless and I desperately need help... It worked when I removed session_start(); from my file... When I make new file with session_start(); it still doesn't work...

一些错误日志行

[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 certificate 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 certificate 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 certificate 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 certificate 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 certificate 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 certificate 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 certificate 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

推荐答案

我用旧的 PHP 版本重新安装了 xampp...

I reinstalled xampp with older PHP Version...

看起来罪魁祸首是 PHP 7.0.0

Looks like culprit was PHP 7.0.0

找到可能与之相关的内容https://community.apachefriends.org/viewtopic.php?p=248070;sid=0b7559defe15317f41699d1ce9194e3f

Found something probably linked to it https://community.apachefriends.org/viewtopic.php?p=248070&sid=0b7559defe15317f41699d1ce9194e3f

发现这个(bitnami 开发者)

Found this (bitnami developers)

我们一直在检查 XAMPP 的配置,我们发现问题与您可以在其中找到的 use_only_cookies 变量有关php.ini 文件的会话部分.Apache 将崩溃,如果Session 部分中的 use_only_cookies 变量设置为 0 并且如果设置为 1,一切都很好.

we have been checking the configuration of XAMPP and we found that the issue is related to the use_only_cookies variable that you can find in the Session's section of the php.ini file. Apache will crash if the use_only_cookies variable in the Session's section is set to 0 and everything is fine if it's set to 1.

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

我们还检查了 use_strict_mode 应该设置为 1.

We also checked that the use_strict_mode should be set to 1.

https://wiki.php.net/rfc/strict_sessionshttp://php.net/manual/en/session.configuration.php#ini.session.use-strict-mode

我们将在下一个版本的 XAMPP 和 PHP 7 中包含这些更改.我们正在使用 7.0.2 版本构建安装程序,我们将尽快释放它们.

We'll include those changes in the next version of XAMPP with PHP 7. We are building the installers with the version 7.0.2 and we'll release them as soon as possible.

这篇关于使用会话时在 xampp 上可能导致 ERR_CONNECTION_RESET 错误的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆