当我做phpinfo()时,我正在试图
警告:phpinfo():依赖系统的时区设置是不安全的.您需要使用date.timezone设置或date_default_timezone_set()函数.如果您使用了这些方法中的任何一种并且仍然收到此警告,则很可能拼错了时区标识符.我们在第8行的/myadmin/i.php中选择'EET/2.0/no DST'的'Europe/Helsinki'
这是i.php:
<?php
//echo date_default_timezone_get();
date_default_timezone_set("Europe/Kiev");
//echo date("l");
phpinfo();
?>
Run Code Online (Sandbox Code Playgroud)
正如你所看到的,当我做date_default_timezone_set("欧洲/基辅")时,我得到:
注意:date_default_timezone_set():时区ID'Europe/Kiev'在第4行的/myadmin/i.php中无效
我确定我从这里使用有效的时区字符串,我确实设置了:
date.timezone =欧洲/基辅
在php.ini文件中.
环境:CentOS 6,nginx/1.1.11,PHP 5.3.8(fpm-fcgi)
我真的无法理解什么是问题.谢谢.
我的 Web 应用程序(进一步是 myApp)嵌入在单个第三方网页的 iframe 中。MyApp 设置 cookieSet-Cookie: JSESSIONID=38FE580EE7D8CACA581532DD37A19182; Path=/myapi; Secure; HttpOnly
以维护用户会话。前一段时间它停止在 Chrome 中工作,因为https://blog.chromium.org/2020/02/samesite-cookie-changes-in-february.html更新更改了处理没有SameSite
属性的cookie 的默认行为from None
to Lax
。
我将从 myApp 主机发送 cookie 与SameSite=None; Secure
. X-CSRF-TOKEN
每个响应中还包含标头。myApp javascript 获取X-CSRF-TOKEN
并将其放入对 myApp 主机的每个 XHR 请求的标头中。这足以防止CSRF攻击吗?
是否应该Access-Control-Allow-Origin: third-party-webpage
在响应中添加标头?
我的 .ssh 下有默认密钥对,并在https://gitlab.com/profile/keys中添加了 id_rsa.pub但仍然无法使用此密钥访问 gitlab。
ssh -vT git@gitlab.com
无法登录:
$ ssh -vT git@gitlab.com
OpenSSH_7.9p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to gitlab.com [35.231.145.151] port 22.
debug1: Connection established.
debug1: identity file /Users/denysobukhov/.ssh/id_rsa type 0
debug1: identity file /Users/denysobukhov/.ssh/id_rsa-cert type -1
debug1: identity file /Users/denysobukhov/.ssh/id_dsa type -1
debug1: identity file /Users/denysobukhov/.ssh/id_dsa-cert type -1
debug1: identity file /Users/denysobukhov/.ssh/id_ecdsa type -1
debug1: identity file /Users/denysobukhov/.ssh/id_ecdsa-cert type -1
debug1: identity file …
Run Code Online (Sandbox Code Playgroud)