typecho跳坑指南

in 跳坑 with 2 comments

花了八个小时安装typecho,真是喵了个鸡的~一坑又一坑,坑坑套路深,记录如下,希望后来人不要步我后尘。

安装

报500错误

跳转空白页,不建表

不管是mysql还是sqlite,都是空白页,查看数据库表,没有创建表。
查看日志

cd /var/log/nginx
vi error.log

2018/10/09 17:07:31 [error] 19550#0: *94 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: open(/var/lib/php/session/sess_xxxxxxxxxxxxx, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP message: PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0" while reading upstream, client: xxx.xxx.xxx.xxx, server: www.4kai.com, request: "POST /install.php?config HTTP/1.1", upstream: "fastcgi://127.0.0.1:xxxx", host: "www.4kai.com", referrer: "http://www.4kai.com/install.php"

无法打开内容

查看日志

2018/10/10 08:24:31 [error] 20311#0: *74 FastCGI sent in stderr: "Access to the script '/xxx/xxx/index.php/index.php/archives/1/' has been denied (see security.limit_extensions)" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: www.4kai.com, request: "GET /index.php/archives/1/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:xxxx", host: "www.4kai.com", referrer: "http://www.4kai.com/index.php"

解决方案

vi /etc/php.ini
cgi.fix_pathinfo=1  #修改这里
service php-fpm restart

后记

安装了php5.6,终于用上1.1-17.10.30了。
typecho大大的写着要求php5.4以上,是我瞎!

配置

主题Pinghsu使用Google Analytics

要改footer.php,具体见
https://blog.mzying.com/index.php/archives/77/

Responses
  1. 推荐尝试一下 docker 的方式安装,会简便很多哦!

    Reply
    1. @mzying

      确实是,docker是运维的好方法

      Reply