Typecho安装常见问题汇总,记录一下,帮助有缘人

1.File not found.

访问首页,出现以下以下错误
2023-07-28T06:39:26.png
检查日志发现
2023-07-28T06:39:54.png
解决办法:配置PHP文件根目录
2023-07-28T06:40:05.png

2.Mysql is not available

2023-07-28T06:43:54.png
解决办法:安装php-pdo_mysql扩展

3.ctype 未定义

2023-07-28T06:45:51.png
解决办法:安装php-ctype扩展

4.mb_strlen 未定义

2023-07-28T06:47:11.png
解决办法:安装php-mbstring扩展

5.只有首页能打开,其他页面无法打开

2023-07-28T06:48:24.png
解决办法:在nginx配置文件配置pathinfo
2023-07-28T06:49:20.png

6.session 未定义

2023-07-28T06:51:33.png
解决办法:安装php-session扩展

7.token 未定义

2023-07-28T06:52:28.png
解决办法:安装php-tokenizer扩展

总结:需要安装的php扩展:

php82-ctype
php82-gd
php82-mbstring
php82-mysqlnd
php82-pdo_mysql
php82-session
php82-tokenizer

nginx相关键配置文件:

server {
    listen       80;
    listen  [::]:80;
    server_name  localhost;

    access_log  /var/log/nginx/host.access.log  main;

    location / {
        root   /var/www/html;
        index  index.php index.html index.htm;  #增加索引页
        if (!-f $request_filename) {  #rewrite相关配置
            rewrite (.*) /index.php;
        }
    }
    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php(\/.*)*$ {
        root           /var/www/html; #文档根目录
        fastcgi_pass   php3:9000;
        fastcgi_index  index.php;
        #脚本路径
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;  
        include        fastcgi_params;
    }
}

标签: typecho, 安装

添加新评论