tp6+nginx配置出错

浏览:2458 发布日期:2020/01/10 分类:求助交流
报500错误,同样得配置再tp5上能使用
nginx报错信息:
FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected ':', expecting '{' in /home/www/tp6/vendor/topthink/think-helper/src/helper.php on line 233" while reading response header from upstream, client: 192.168.199.1, server: r.tpt.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "r.tpt.com"

nginx配置:server {
        charset utf-8;
        client_max_body_size 128M;
        listen 80;
        server_name r.tpt.com;
    
        root  /home/www/tp6/public;
        index  index.php;
    
        location ~* \.(eot|otf|ttf|woff)$ {
            add_header Access-Control-Allow-Origin *;
        }
    
        
        location / {
            index    index.html index.php;
            if ( -f $request_filename) {
                break;
            }

            if ( !-e $request_filename) {
                rewrite ^/(.*)$ /index.php/$1 last;
                break;
            }
        }
    
        location ~ \.php {
            set $script $uri;
            set $path_info "";
            if ($uri ~ "^(.+\.php)(/.+)") {
                set $script $1;
                set $path_info $2;
            }
            include   fastcgi_params;
            fastcgi_index    index.php?IF_REWRITE=1;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param    PATH_INFO    $path_info;
            fastcgi_param    SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            fastcgi_param    SCRIPT_NAME    $script;
            try_files $uri =404;
        }

}
最佳答案
评论( 相关
后面还有条评论,点击查看>>