在服务器上装了一个cacti监控,设置了sendmail,也装了飞信机器人插件,down机后服务器执行thold_functions.php,但是并没有收到短信通知,我测试过,飞信可以发送短信到我手机上,查了一下发现无法执行一句话exec("echo $subject >>/var/www/html/plugins/thold/alert.log");  请各位帮忙看看是什么原因,附件已上传

解决方案 »

  1.   

    有没有返回什么错误,检查exec的返回值,并确定/var/www/html/plugins/thold/目录的访问权限
      

  2.   

    没有错误返回值, /var/www/html/plugins/thold/的权限是777
      

  3.   

    没有错误返回值, /var/www/html/plugins/thold/的权限是777
      

  4.   

    $subject 的内容是什么,有没有特殊字符
      

  5.   

    exec("echo $subject >>/var/www/html/plugins/thold/alert.log");
    =>
    exec("echo $subject >/var/www/html/plugins/thold/alert.log");
    多个>
      

  6.   

    一个和2个在linux都可以的,我试过
      

  7.   

    实在不行,就写文件吧.
    file_put_contents
      

  8.   

    //exec("echo $subject >>/var/www/html/plugins/thold/alert.log");
    不运行这句试试...
      

  9.   

    是没有执行到这句话exec("echo $subject >>/var/www/html/plugins/thold/alert.log"); 
      

  10.   

    把ini里的DisplayErrors或LogErrors打开,看看错因