7.0.1 XAMPP当我使用session_start Apache的崩溃() [英] Xampp 7.0.1 Apache crashes when I use session_start()
问题描述
当我用在session_start()在PHP我的Apache服务器刚刚停止工作启动一个会话。
When I start a session using session_start() in PHP my Apache server just stops working.
我使用Xampp时7.0.1适用于Windows。
I am using Xampp 7.0.1 for Windows.
我的配置文件是这样的:
My config file looks like this:
<?php
error_reporting(E_ALL);
//session_start();
//ob_start();
header('Content-Type: text/html; charset=utf-8');
//Rest of the code
?>
即使我把它放在它不工作文件的第一行。
Even if I put it on the first line of the file it doesn't work.
有谁知道如何解决这个问题?
Does anybody know how to fix this?
奇怪的是,它只有在这个特定的地图结构发生了。
The weird thing is that it is only happening in this specific map structure.
即
C:\xampp\htdocs\functions\*
在例如:
C:\xampp\htdocs\test\*
它工作正常。
推荐答案
<一个href=\"https://community.apachefriends.org/viewtopic.php?p=248203&sid=0d197e14e20a9a920f0de8e11a662f41\"相对=nofollow>此处是解决方案,它的XAMPP错误,他们目前正在修复它。如果没有工作,试图等待XAMPP 7.0.2或降级,直到补丁出来。
Here is the solution, it's XAMPP bug and they are currently fixing it. If that didn't work, try to wait for XAMPP 7.0.2 or downgrade until fix comes out.
我们已经检查XAMPP的结构,我们发现
问题是关系到use_only_cookies变量,你可以找到在
php.ini文件中的Session的部分。 Apache会崩溃,如果该
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/manual/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_sessions
的http://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.
这篇关于7.0.1 XAMPP当我使用session_start Apache的崩溃()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!