开发者社区> 问答> 正文

zabbix安装部署?报错

各位好,本人近期在搭建lnmp平台下的zabbix.遇到php时间的问题,请帮忙看看

time zone for  PHP is not set(图片上传不了,就是这个报错,没设置PHP时间)

 vi /etc/php.ini 

1.[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Asia/Shanghai"

2.nginx的配置

 vi /usr/local/nginx-1.8.0/conf/nginx.conf 


  server {
        listen       80;
        server_name  localhost;


        #charset koi8-r;


        #access_log  logs/host.access.log  main;


        location / {
            root   html;
            index  index.html index.htm index.php;
        }
        #error_page  404              /404.html;


        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }


        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}


        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
           root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME /scripts$fastcgi_script_name;
            include        fastcgi_params;
            include     fastcgi.conf;
        }





展开
收起
爱吃鱼的程序员 2020-06-09 11:51:04 435 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
    报错如上
    1. 确认zabbix在用的php会使用/etc/php.ini这个文件作为配置
    2. 改完配置之后要重启php-fpm
    谢谢,问题得到了解决。
    2020-06-09 11:51:23
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
《Zabbix 监控常用手册》 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载

相关镜像