Vid*_*her 2 nginx chroot php-fpm
我正在尝试在新的 CentOS 6.3 机器上设置 PHP-FPM Chroot jail。我可以让 chroot 正常工作,从某种意义上说,我可以让 php 脚本做出响应并回显出来。但是,每次使用 date 函数时,都会收到一条错误消息,指出时区数据库已损坏。
我所做的只是将 php-fpm conf 中 chroot 指令的值更改为 nginx 中指定的文档根目录。
这是测试脚本:
https://gist.github.com/3199578
这是 nginx 虚拟主机
https://gist.github.com/3199552
这是我转到 localhost 时得到的输出
小智 5
你在 chroot 文件夹中有 TZ 东西的副本吗?
/etc/localtime
Run Code Online (Sandbox Code Playgroud)
-和-
/usr/share/zoneinfo
Run Code Online (Sandbox Code Playgroud)
到
/chroot/path/etc/localtime
Run Code Online (Sandbox Code Playgroud)
-和-
/chroot/path/usr/share/zoneinfo
Run Code Online (Sandbox Code Playgroud)
也可能添加
在此处的 nginx 配置详细信息中添加 TZ=CST(或任何您的 TZ):http : //wiki.nginx.org/CoreModule#env