gpt4 book ai didi

php - 如果它有 session_start(),页面将不会加载;在里面

转载 作者:可可西里 更新时间:2023-11-01 00:13:17 25 4
gpt4 key购买 nike

我最近从多年的 WAMP 切换到 XAMPP,因为我想要 PHP 7,但我注意到一些我以前从未经历过的事情,它不会加载具有 session_start(); 在他们身上。我刚刚在 Chrome/IE/FF 中收到“正在等待本地主机...”。一旦我删除该行,页面就会加载。

在 wamp 中工作正常。

基本上每个包含 session_start(); 的页面都不会加载, super 奇怪。但如果我删除它,它们就会加载并显示。

为什么?

错误日志只是通知

[Sun Dec 27 02:52:19.346602 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations
[Sun Dec 27 02:52:19.346602 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Sun Dec 27 02:52:19.346602 2015] [core:notice] [pid 3272:tid 372] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sun Dec 27 02:52:19.348604 2015] [mpm_winnt:notice] [pid 3272:tid 372] AH00418: Parent: Created child process 2744
[Sun Dec 27 02:52:19.607869 2015] [ssl:warn] [pid 2744:tid 380] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Dec 27 02:52:19.674491 2015] [ssl:warn] [pid 2744:tid 380] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Dec 27 02:52:19.699518 2015] [mpm_winnt:notice] [pid 2744:tid 380] AH00354: Child: Starting 150 worker threads.

编辑:刚刚发现这个,我有完全同样的问题。他从来没有找到解决办法

session_start() keeps the file load forever

EDIT2:我回到 WAMP 并自己安装了 php7

最佳答案

在php.ini中查找:

session.use_only_cookies=0 

更改为:

session.use_only_cookies=1

我在使用 php7 的最新 XAMPP 7.0.1 版时遇到了同样的问题。

根据 Bitnami 开发人员通过 Apache Friends Support 的说法:

The issue is related to the use_only_cookies variable that you canfind in the Session's section of the php.ini file. Apache will crashif the use_only_cookies variable in the Session's section is set to 0and everything is fine if it's set to 1.

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'llrelease them as soon as possible.

希望这对您有所帮助。

关于php - 如果它有 session_start(),页面将不会加载;在里面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34476922/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com