- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我最近从多年的 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/
我有一个顶部导航栏,位于外部 PHP 文件内,该文件通过包含“topnav.php”链接到主页上的适当位置;这样,当我需要更改 href=""时,我不需要浏览每个页面。我还用它来显示 -> 登录身份:
我正在尝试将 Sessions 与 PHP 一起使用,我在 index.php 的开头使用 session_start(); 启动它们,但收到以下错误消息: Warning: session_star
我开始一个新 session :session_start();然后我像这样设置一些 session 变量: $_SESSION['name']=$_POST['name']; 和一些其他变量。 在页
我已经环顾了这个问题 - 但似乎我能找到的只是那些在连接到本地数据库或其他东西时遇到问题的人(不太确定)。我在我的网站上遇到了问题(任何时候我对具有 session_start() 的文件进行 aja
我正在编写一个登录脚本,但是由于我没有对/tmp 文件夹的写权限,所以我又创建了一个并将 session.dave_path 设置为新文件夹。 我一直在终端上测试脚本,文件夹获得了一个新条目,但是当我
我应该在何时何地使用 PHP 中的 session_start()? 例如,假设我有一个登录脚本,它设置了一个 session 变量来判断用户是否登录。然后我必须将 session_start() 放
我有一个启动 session 的 php 文件,后面是一些 html。后来我使用 include "some_file.php" 包含另一个文件。 some_file.php 具有 php 和 mys
我目前正在尝试将我的网站从我机器上的本地主机移动到我的网络服务器。还有一个问题。 一切正常,除了用于管理的登录表单。 起初我以为是 not-saving-as-utf-8-without-BOM 问题
我应该在何时何地使用 PHP 中的 session_start()? 例如,假设我有一个登录脚本,它设置了一个 session 变量来判断用户是否登录。然后我必须将 session_start() 放
当我在代码中使用 session_start() 时,我的 session 设置正确,当我运行代码并登录时,它使我保持登录状态并且一切正常,但是当我在位于顶部的 PHP 代码下面添加 HTML 时页面
我的代码有问题。这是我按照教程制作的登录/注册脚本。 我遇到的问题是,我希望脚本仅在用户输入正确的登录详细信息时回显“已登录”,但即使我没有输入任何登录详细信息,它仍然会回显“已登录”。我检查了它,如
我使用 php 和 mysql 创建了一个登录表单, 这是登录后应该出现的页面: 我添加了此代码以在用户未登录时禁用对该页面的访问。我的问题是,添加此代码后,我无法使用以前可以登录的用户登录。我
我希望你做得很好,我显然正在用登录帐户制作这个网站,我已经在本地数据库和服务器数据库中注册了我的用户。我的 HTML/PHP 代码在运行时没有显示任何错误。我已经检查了我的数据库连接。这是正确的。该网
我正在尝试使用 php 启动 session ,但我总是收到此错误: Fatal error: Call to undefined function session_start() in /www/t
我对 session_start() 有一些问题; 我知道在 session_start() 之前不应该输出任何东西;声明 但是我在我的脚本中找不到问题 索引.php: 但我总是 g
我一直在经历一些 $_SESSION示例,我有点困惑,我应该使用 session_start()每次访问或设置之前 $_SESSION['variable']或者我应该只使用 session_star
请解释如何session_start()功能有效。 我不明白在 php 中启动 session 时的操作顺序。尝试解释。 HTTP 是一种客户端-服务器架构。这意味着浏览器发送请求,服务器处理请求并返
我正在寻找一种处理 session_start 错误的通用方法,而不是一种处理特定错误的方法。可能会发生许多错误,例如 session 目录已满,这会导致 fatal error 。我想要一种方法来捕
有点奇怪的问题,好的,这是我的设置... domain.com 调用从 sub.domain.com 上的 Iframe 读取数据 sub.domain.com 对 sub.domain.com/ca
我正尝试在我网站的标题页中开始 session 。但似乎可能存在某种错误,因为它失败并出现以下错误: Warning: session_start() [function.session-start]
我是一名优秀的程序员,十分优秀!