duankuaiwang2706 2015-06-03 09:55
浏览 30

Cakephp cron作业失败 - Shell脚本在服务器上的logfile中记录为错误

We written a shell script for sending email. But the cronjob fails and it logged the following error in logfile.txt on the server.Which is nothing but the code of /home/user/public_html/app/Console/cake. Where it wrongs?

logfile.txt

  X-Powered-By: PHP/5.4.36
  Content-type: text/html


 # Canonicalize by following every symlink of the given name recursively
 canonicalize() {
  NAME="$1"
  if [ -f "$NAME" ]
  then
     DIR=$(dirname -- "$NAME")
     NAME=$(cd -P "$DIR" > /dev/null && pwd -P)/$(basename -- "$NAME")
  fi
  while [ -h "$NAME" ]; do
    DIR=$(dirname -- "$NAME")
    SYM=$(readlink "$NAME")
    NAME=$(cd "$DIR" > /dev/null && cd $(dirname -- "$SYM") > /dev/null          && pwd)/$(basename -- "$SYM")
    done
    echo "$NAME"
   }

    CONSOLE=$(dirname -- "$(canonicalize "$0")")
    APP=`pwd`

    exec php -q "$CONSOLE"/cake.php -working "$APP" "$@"
    exit
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度